diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-07-27 10:05:23 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-07-27 10:05:23 +0200 |
| commit | 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab (patch) | |
| tree | 39a1a4629749056191c05dfd899f931701b7acf3 /srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/Mode.php | |
| parent | 5afd237bbd22028b85532b8c0b3fcead49a00764 (diff) | |
| download | ft_server-master.tar.gz ft_server-master.tar.bz2 ft_server-master.zip | |
Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my famillyHEADmaster
Diffstat (limited to 'srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/Mode.php')
| -rw-r--r-- | srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/Mode.php | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/Mode.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/Mode.php deleted file mode 100644 index 51e6c9a..0000000 --- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/Mode.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -declare(strict_types = 1); - -namespace BaconQrCode\Common; - -use DASPRiD\Enum\AbstractEnum; - -/** - * Enum representing various modes in which data can be encoded to bits. - * - * @method static self TERMINATOR() - * @method static self NUMERIC() - * @method static self ALPHANUMERIC() - * @method static self STRUCTURED_APPEND() - * @method static self BYTE() - * @method static self ECI() - * @method static self KANJI() - * @method static self FNC1_FIRST_POSITION() - * @method static self FNC1_SECOND_POSITION() - * @method static self HANZI() - */ -final class Mode extends AbstractEnum -{ - protected const TERMINATOR = [[0, 0, 0], 0x00]; - protected const NUMERIC = [[10, 12, 14], 0x01]; - protected const ALPHANUMERIC = [[9, 11, 13], 0x02]; - protected const STRUCTURED_APPEND = [[0, 0, 0], 0x03]; - protected const BYTE = [[8, 16, 16], 0x04]; - protected const ECI = [[0, 0, 0], 0x07]; - protected const KANJI = [[8, 10, 12], 0x08]; - protected const FNC1_FIRST_POSITION = [[0, 0, 0], 0x05]; - protected const FNC1_SECOND_POSITION = [[0, 0, 0], 0x09]; - protected const HANZI = [[8, 10, 12], 0x0d]; - - /** - * @var int[] - */ - private $characterCountBitsForVersions; - - /** - * @var int - */ - private $bits; - - protected function __construct(array $characterCountBitsForVersions, int $bits) - { - $this->characterCountBitsForVersions = $characterCountBitsForVersions; - $this->bits = $bits; - } - - /** - * Returns the number of bits used in a specific QR code version. - */ - public function getCharacterCountBits(Version $version) : int - { - $number = $version->getVersionNumber(); - - if ($number <= 9) { - $offset = 0; - } elseif ($number <= 26) { - $offset = 1; - } else { - $offset = 2; - } - - return $this->characterCountBitsForVersions[$offset]; - } - - /** - * Returns the four bits used to encode this mode. - */ - public function getBits() : int - { - return $this->bits; - } -} |
