123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- declare(strict_types=1);
- namespace Endroid\QrCode;
- use BaconQrCode\Common\ErrorCorrectionLevel as BaconErrorCorrectionLevel;
- use MyCLabs\Enum\Enum;
- class ErrorCorrectionLevel extends Enum
- {
- const LOW = 'low';
- const MEDIUM = 'medium';
- const QUARTILE = 'quartile';
- const HIGH = 'high';
- public function toBaconErrorCorrectionLevel(): BaconErrorCorrectionLevel
- {
- $name = strtoupper(substr($this->getValue(), 0, 1));
- return BaconErrorCorrectionLevel::valueOf($name);
- }
- }
|