aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common')
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitArray.php372
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitMatrix.php313
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitUtils.php41
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/CharacterSetEci.php180
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/EcBlock.php49
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/EcBlocks.php74
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/ErrorCorrectionLevel.php63
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/FormatInformation.php203
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/Mode.php76
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/ReedSolomonCodec.php468
-rw-r--r--srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/Version.php596
11 files changed, 0 insertions, 2435 deletions
diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitArray.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitArray.php
deleted file mode 100644
index 158384f..0000000
--- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitArray.php
+++ /dev/null
@@ -1,372 +0,0 @@
-<?php
-declare(strict_types = 1);
-
-namespace BaconQrCode\Common;
-
-use BaconQrCode\Exception\InvalidArgumentException;
-use SplFixedArray;
-
-/**
- * A simple, fast array of bits.
- */
-final class BitArray
-{
- /**
- * Bits represented as an array of integers.
- *
- * @var SplFixedArray<int>
- */
- private $bits;
-
- /**
- * Size of the bit array in bits.
- *
- * @var int
- */
- private $size;
-
- /**
- * Creates a new bit array with a given size.
- */
- public function __construct(int $size = 0)
- {
- $this->size = $size;
- $this->bits = SplFixedArray::fromArray(array_fill(0, ($this->size + 31) >> 3, 0));
- }
-
- /**
- * Gets the size in bits.
- */
- public function getSize() : int
- {
- return $this->size;
- }
-
- /**
- * Gets the size in bytes.
- */
- public function getSizeInBytes() : int
- {
- return ($this->size + 7) >> 3;
- }
-
- /**
- * Ensures that the array has a minimum capacity.
- */
- public function ensureCapacity(int $size) : void
- {
- if ($size > count($this->bits) << 5) {
- $this->bits->setSize(($size + 31) >> 5);
- }
- }
-
- /**
- * Gets a specific bit.
- */
- public function get(int $i) : bool
- {
- return 0 !== ($this->bits[$i >> 5] & (1 << ($i & 0x1f)));
- }
-
- /**
- * Sets a specific bit.
- */
- public function set(int $i) : void
- {
- $this->bits[$i >> 5] = $this->bits[$i >> 5] | 1 << ($i & 0x1f);
- }
-
- /**
- * Flips a specific bit.
- */
- public function flip(int $i) : void
- {
- $this->bits[$i >> 5] ^= 1 << ($i & 0x1f);
- }
-
- /**
- * Gets the next set bit position from a given position.
- */
- public function getNextSet(int $from) : int
- {
- if ($from >= $this->size) {
- return $this->size;
- }
-
- $bitsOffset = $from >> 5;
- $currentBits = $this->bits[$bitsOffset];
- $bitsLength = count($this->bits);
- $currentBits &= ~((1 << ($from & 0x1f)) - 1);
-
- while (0 === $currentBits) {
- if (++$bitsOffset === $bitsLength) {
- return $this->size;
- }
-
- $currentBits = $this->bits[$bitsOffset];
- }
-
- $result = ($bitsOffset << 5) + BitUtils::numberOfTrailingZeros($currentBits);
- return $result > $this->size ? $this->size : $result;
- }
-
- /**
- * Gets the next unset bit position from a given position.
- */
- public function getNextUnset(int $from) : int
- {
- if ($from >= $this->size) {
- return $this->size;
- }
-
- $bitsOffset = $from >> 5;
- $currentBits = ~$this->bits[$bitsOffset];
- $bitsLength = count($this->bits);
- $currentBits &= ~((1 << ($from & 0x1f)) - 1);
-
- while (0 === $currentBits) {
- if (++$bitsOffset === $bitsLength) {
- return $this->size;
- }
-
- $currentBits = ~$this->bits[$bitsOffset];
- }
-
- $result = ($bitsOffset << 5) + BitUtils::numberOfTrailingZeros($currentBits);
- return $result > $this->size ? $this->size : $result;
- }
-
- /**
- * Sets a bulk of bits.
- */
- public function setBulk(int $i, int $newBits) : void
- {
- $this->bits[$i >> 5] = $newBits;
- }
-
- /**
- * Sets a range of bits.
- *
- * @throws InvalidArgumentException if end is smaller than start
- */
- public function setRange(int $start, int $end) : void
- {
- if ($end < $start) {
- throw new InvalidArgumentException('End must be greater or equal to start');
- }
-
- if ($end === $start) {
- return;
- }
-
- --$end;
-
- $firstInt = $start >> 5;
- $lastInt = $end >> 5;
-
- for ($i = $firstInt; $i <= $lastInt; ++$i) {
- $firstBit = $i > $firstInt ? 0 : $start & 0x1f;
- $lastBit = $i < $lastInt ? 31 : $end & 0x1f;
-
- if (0 === $firstBit && 31 === $lastBit) {
- $mask = 0x7fffffff;
- } else {
- $mask = 0;
-
- for ($j = $firstBit; $j < $lastBit; ++$j) {
- $mask |= 1 << $j;
- }
- }
-
- $this->bits[$i] = $this->bits[$i] | $mask;
- }
- }
-
- /**
- * Clears the bit array, unsetting every bit.
- */
- public function clear() : void
- {
- $bitsLength = count($this->bits);
-
- for ($i = 0; $i < $bitsLength; ++$i) {
- $this->bits[$i] = 0;
- }
- }
-
- /**
- * Checks if a range of bits is set or not set.
-
- * @throws InvalidArgumentException if end is smaller than start
- */
- public function isRange(int $start, int $end, bool $value) : bool
- {
- if ($end < $start) {
- throw new InvalidArgumentException('End must be greater or equal to start');
- }
-
- if ($end === $start) {
- return true;
- }
-
- --$end;
-
- $firstInt = $start >> 5;
- $lastInt = $end >> 5;
-
- for ($i = $firstInt; $i <= $lastInt; ++$i) {
- $firstBit = $i > $firstInt ? 0 : $start & 0x1f;
- $lastBit = $i < $lastInt ? 31 : $end & 0x1f;
-
- if (0 === $firstBit && 31 === $lastBit) {
- $mask = 0x7fffffff;
- } else {
- $mask = 0;
-
- for ($j = $firstBit; $j <= $lastBit; ++$j) {
- $mask |= 1 << $j;
- }
- }
-
- if (($this->bits[$i] & $mask) !== ($value ? $mask : 0)) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Appends a bit to the array.
- */
- public function appendBit(bool $bit) : void
- {
- $this->ensureCapacity($this->size + 1);
-
- if ($bit) {
- $this->bits[$this->size >> 5] = $this->bits[$this->size >> 5] | (1 << ($this->size & 0x1f));
- }
-
- ++$this->size;
- }
-
- /**
- * Appends a number of bits (up to 32) to the array.
-
- * @throws InvalidArgumentException if num bits is not between 0 and 32
- */
- public function appendBits(int $value, int $numBits) : void
- {
- if ($numBits < 0 || $numBits > 32) {
- throw new InvalidArgumentException('Num bits must be between 0 and 32');
- }
-
- $this->ensureCapacity($this->size + $numBits);
-
- for ($numBitsLeft = $numBits; $numBitsLeft > 0; $numBitsLeft--) {
- $this->appendBit((($value >> ($numBitsLeft - 1)) & 0x01) === 1);
- }
- }
-
- /**
- * Appends another bit array to this array.
- */
- public function appendBitArray(self $other) : void
- {
- $otherSize = $other->getSize();
- $this->ensureCapacity($this->size + $other->getSize());
-
- for ($i = 0; $i < $otherSize; ++$i) {
- $this->appendBit($other->get($i));
- }
- }
-
- /**
- * Makes an exclusive-or comparision on the current bit array.
- *
- * @throws InvalidArgumentException if sizes don't match
- */
- public function xorBits(self $other) : void
- {
- $bitsLength = count($this->bits);
- $otherBits = $other->getBitArray();
-
- if ($bitsLength !== count($otherBits)) {
- throw new InvalidArgumentException('Sizes don\'t match');
- }
-
- for ($i = 0; $i < $bitsLength; ++$i) {
- $this->bits[$i] = $this->bits[$i] ^ $otherBits[$i];
- }
- }
-
- /**
- * Converts the bit array to a byte array.
- *
- * @return SplFixedArray<int>
- */
- public function toBytes(int $bitOffset, int $numBytes) : SplFixedArray
- {
- $bytes = new SplFixedArray($numBytes);
-
- for ($i = 0; $i < $numBytes; ++$i) {
- $byte = 0;
-
- for ($j = 0; $j < 8; ++$j) {
- if ($this->get($bitOffset)) {
- $byte |= 1 << (7 - $j);
- }
-
- ++$bitOffset;
- }
-
- $bytes[$i] = $byte;
- }
-
- return $bytes;
- }
-
- /**
- * Gets the internal bit array.
- *
- * @return SplFixedArray<int>
- */
- public function getBitArray() : SplFixedArray
- {
- return $this->bits;
- }
-
- /**
- * Reverses the array.
- */
- public function reverse() : void
- {
- $newBits = new SplFixedArray(count($this->bits));
-
- for ($i = 0; $i < $this->size; ++$i) {
- if ($this->get($this->size - $i - 1)) {
- $newBits[$i >> 5] = $newBits[$i >> 5] | (1 << ($i & 0x1f));
- }
- }
-
- $this->bits = $newBits;
- }
-
- /**
- * Returns a string representation of the bit array.
- */
- public function __toString() : string
- {
- $result = '';
-
- for ($i = 0; $i < $this->size; ++$i) {
- if (0 === ($i & 0x07)) {
- $result .= ' ';
- }
-
- $result .= $this->get($i) ? 'X' : '.';
- }
-
- return $result;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitMatrix.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitMatrix.php
deleted file mode 100644
index 10bf8fe..0000000
--- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitMatrix.php
+++ /dev/null
@@ -1,313 +0,0 @@
-<?php
-declare(strict_types = 1);
-
-namespace BaconQrCode\Common;
-
-use BaconQrCode\Exception\InvalidArgumentException;
-use SplFixedArray;
-
-/**
- * Bit matrix.
- *
- * Represents a 2D matrix of bits. In function arguments below, and throughout
- * the common module, x is the column position, and y is the row position. The
- * ordering is always x, y. The origin is at the top-left.
- */
-class BitMatrix
-{
- /**
- * Width of the bit matrix.
- *
- * @var int
- */
- private $width;
-
- /**
- * Height of the bit matrix.
- *
- * @var int
- */
- private $height;
-
- /**
- * Size in bits of each individual row.
- *
- * @var int
- */
- private $rowSize;
-
- /**
- * Bits representation.
- *
- * @var SplFixedArray<int>
- */
- private $bits;
-
- /**
- * @throws InvalidArgumentException if a dimension is smaller than zero
- */
- public function __construct(int $width, int $height = null)
- {
- if (null === $height) {
- $height = $width;
- }
-
- if ($width < 1 || $height < 1) {
- throw new InvalidArgumentException('Both dimensions must be greater than zero');
- }
-
- $this->width = $width;
- $this->height = $height;
- $this->rowSize = ($width + 31) >> 5;
- $this->bits = SplFixedArray::fromArray(array_fill(0, $this->rowSize * $height, 0));
- }
-
- /**
- * Gets the requested bit, where true means black.
- */
- public function get(int $x, int $y) : bool
- {
- $offset = $y * $this->rowSize + ($x >> 5);
- return 0 !== (BitUtils::unsignedRightShift($this->bits[$offset], ($x & 0x1f)) & 1);
- }
-
- /**
- * Sets the given bit to true.
- */
- public function set(int $x, int $y) : void
- {
- $offset = $y * $this->rowSize + ($x >> 5);
- $this->bits[$offset] = $this->bits[$offset] | (1 << ($x & 0x1f));
- }
-
- /**
- * Flips the given bit.
- */
- public function flip(int $x, int $y) : void
- {
- $offset = $y * $this->rowSize + ($x >> 5);
- $this->bits[$offset] = $this->bits[$offset] ^ (1 << ($x & 0x1f));
- }
-
- /**
- * Clears all bits (set to false).
- */
- public function clear() : void
- {
- $max = count($this->bits);
-
- for ($i = 0; $i < $max; ++$i) {
- $this->bits[$i] = 0;
- }
- }
-
- /**
- * Sets a square region of the bit matrix to true.
- *
- * @throws InvalidArgumentException if left or top are negative
- * @throws InvalidArgumentException if width or height are smaller than 1
- * @throws InvalidArgumentException if region does not fit into the matix
- */
- public function setRegion(int $left, int $top, int $width, int $height) : void
- {
- if ($top < 0 || $left < 0) {
- throw new InvalidArgumentException('Left and top must be non-negative');
- }
-
- if ($height < 1 || $width < 1) {
- throw new InvalidArgumentException('Width and height must be at least 1');
- }
-
- $right = $left + $width;
- $bottom = $top + $height;
-
- if ($bottom > $this->height || $right > $this->width) {
- throw new InvalidArgumentException('The region must fit inside the matrix');
- }
-
- for ($y = $top; $y < $bottom; ++$y) {
- $offset = $y * $this->rowSize;
-
- for ($x = $left; $x < $right; ++$x) {
- $index = $offset + ($x >> 5);
- $this->bits[$index] = $this->bits[$index] | (1 << ($x & 0x1f));
- }
- }
- }
-
- /**
- * A fast method to retrieve one row of data from the matrix as a BitArray.
- */
- public function getRow(int $y, BitArray $row = null) : BitArray
- {
- if (null === $row || $row->getSize() < $this->width) {
- $row = new BitArray($this->width);
- }
-
- $offset = $y * $this->rowSize;
-
- for ($x = 0; $x < $this->rowSize; ++$x) {
- $row->setBulk($x << 5, $this->bits[$offset + $x]);
- }
-
- return $row;
- }
-
- /**
- * Sets a row of data from a BitArray.
- */
- public function setRow(int $y, BitArray $row) : void
- {
- $bits = $row->getBitArray();
-
- for ($i = 0; $i < $this->rowSize; ++$i) {
- $this->bits[$y * $this->rowSize + $i] = $bits[$i];
- }
- }
-
- /**
- * This is useful in detecting the enclosing rectangle of a 'pure' barcode.
- *
- * @return int[]|null
- */
- public function getEnclosingRectangle() : ?array
- {
- $left = $this->width;
- $top = $this->height;
- $right = -1;
- $bottom = -1;
-
- for ($y = 0; $y < $this->height; ++$y) {
- for ($x32 = 0; $x32 < $this->rowSize; ++$x32) {
- $bits = $this->bits[$y * $this->rowSize + $x32];
-
- if (0 !== $bits) {
- if ($y < $top) {
- $top = $y;
- }
-
- if ($y > $bottom) {
- $bottom = $y;
- }
-
- if ($x32 * 32 < $left) {
- $bit = 0;
-
- while (($bits << (31 - $bit)) === 0) {
- $bit++;
- }
-
- if (($x32 * 32 + $bit) < $left) {
- $left = $x32 * 32 + $bit;
- }
- }
- }
-
- if ($x32 * 32 + 31 > $right) {
- $bit = 31;
-
- while (0 === BitUtils::unsignedRightShift($bits, $bit)) {
- --$bit;
- }
-
- if (($x32 * 32 + $bit) > $right) {
- $right = $x32 * 32 + $bit;
- }
- }
- }
- }
-
- $width = $right - $left;
- $height = $bottom - $top;
-
- if ($width < 0 || $height < 0) {
- return null;
- }
-
- return [$left, $top, $width, $height];
- }
-
- /**
- * Gets the most top left set bit.
- *
- * This is useful in detecting a corner of a 'pure' barcode.
- *
- * @return int[]|null
- */
- public function getTopLeftOnBit() : ?array
- {
- $bitsOffset = 0;
-
- while ($bitsOffset < count($this->bits) && 0 === $this->bits[$bitsOffset]) {
- ++$bitsOffset;
- }
-
- if (count($this->bits) === $bitsOffset) {
- return null;
- }
-
- $x = intdiv($bitsOffset, $this->rowSize);
- $y = ($bitsOffset % $this->rowSize) << 5;
-
- $bits = $this->bits[$bitsOffset];
- $bit = 0;
-
- while (0 === ($bits << (31 - $bit))) {
- ++$bit;
- }
-
- $x += $bit;
-
- return [$x, $y];
- }
-
- /**
- * Gets the most bottom right set bit.
- *
- * This is useful in detecting a corner of a 'pure' barcode.
- *
- * @return int[]|null
- */
- public function getBottomRightOnBit() : ?array
- {
- $bitsOffset = count($this->bits) - 1;
-
- while ($bitsOffset >= 0 && 0 === $this->bits[$bitsOffset]) {
- --$bitsOffset;
- }
-
- if ($bitsOffset < 0) {
- return null;
- }
-
- $x = intdiv($bitsOffset, $this->rowSize);
- $y = ($bitsOffset % $this->rowSize) << 5;
-
- $bits = $this->bits[$bitsOffset];
- $bit = 0;
-
- while (0 === BitUtils::unsignedRightShift($bits, $bit)) {
- --$bit;
- }
-
- $x += $bit;
-
- return [$x, $y];
- }
-
- /**
- * Gets the width of the matrix,
- */
- public function getWidth() : int
- {
- return $this->width;
- }
-
- /**
- * Gets the height of the matrix.
- */
- public function getHeight() : int
- {
- return $this->height;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitUtils.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitUtils.php
deleted file mode 100644
index 0c575b4..0000000
--- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/BitUtils.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-declare(strict_types = 1);
-
-namespace BaconQrCode\Common;
-
-/**
- * General bit utilities.
- *
- * All utility methods are based on 32-bit integers and also work on 64-bit
- * systems.
- */
-final class BitUtils
-{
- private function __construct()
- {
- }
-
- /**
- * Performs an unsigned right shift.
- *
- * This is the same as the unsigned right shift operator ">>>" in other
- * languages.
- */
- public static function unsignedRightShift(int $a, int $b) : int
- {
- return (
- $a >= 0
- ? $a >> $b
- : (($a & 0x7fffffff) >> $b) | (0x40000000 >> ($b - 1))
- );
- }
-
- /**
- * Gets the number of trailing zeros.
- */
- public static function numberOfTrailingZeros(int $i) : int
- {
- $lastPos = strrpos(str_pad(decbin($i), 32, '0', STR_PAD_LEFT), '1');
- return $lastPos === false ? 32 : 31 - $lastPos;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/CharacterSetEci.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/CharacterSetEci.php
deleted file mode 100644
index 6dfff17..0000000
--- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/CharacterSetEci.php
+++ /dev/null
@@ -1,180 +0,0 @@
-<?php
-declare(strict_types = 1);
-
-namespace BaconQrCode\Common;
-
-use BaconQrCode\Exception\InvalidArgumentException;
-use DASPRiD\Enum\AbstractEnum;
-
-/**
- * Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 of ISO 18004.
- *
- * @method static self CP437()
- * @method static self ISO8859_1()
- * @method static self ISO8859_2()
- * @method static self ISO8859_3()
- * @method static self ISO8859_4()
- * @method static self ISO8859_5()
- * @method static self ISO8859_6()
- * @method static self ISO8859_7()
- * @method static self ISO8859_8()
- * @method static self ISO8859_9()
- * @method static self ISO8859_10()
- * @method static self ISO8859_11()
- * @method static self ISO8859_12()
- * @method static self ISO8859_13()
- * @method static self ISO8859_14()
- * @method static self ISO8859_15()
- * @method static self ISO8859_16()
- * @method static self SJIS()
- * @method static self CP1250()
- * @method static self CP1251()
- * @method static self CP1252()
- * @method static self CP1256()
- * @method static self UNICODE_BIG_UNMARKED()
- * @method static self UTF8()
- * @method static self ASCII()
- * @method static self BIG5()
- * @method static self GB18030()
- * @method static self EUC_KR()
- */
-final class CharacterSetEci extends AbstractEnum
-{
- protected const CP437 = [[0, 2]];
- protected const ISO8859_1 = [[1, 3], 'ISO-8859-1'];
- protected const ISO8859_2 = [[4], 'ISO-8859-2'];
- protected const ISO8859_3 = [[5], 'ISO-8859-3'];
- protected const ISO8859_4 = [[6], 'ISO-8859-4'];
- protected const ISO8859_5 = [[7], 'ISO-8859-5'];
- protected const ISO8859_6 = [[8], 'ISO-8859-6'];
- protected const ISO8859_7 = [[9], 'ISO-8859-7'];
- protected const ISO8859_8 = [[10], 'ISO-8859-8'];
- protected const ISO8859_9 = [[11], 'ISO-8859-9'];
- protected const ISO8859_10 = [[12], 'ISO-8859-10'];
- protected const ISO8859_11 = [[13], 'ISO-8859-11'];
- protected const ISO8859_12 = [[14], 'ISO-8859-12'];
- protected const ISO8859_13 = [[15], 'ISO-8859-13'];
- protected const ISO8859_14 = [[16], 'ISO-8859-14'];
- protected const ISO8859_15 = [[17], 'ISO-8859-15'];
- protected const ISO8859_16 = [[18], 'ISO-8859-16'];
- protected const SJIS = [[20], 'Shift_JIS'];
- protected const CP1250 = [[21], 'windows-1250'];
- protected const CP1251 = [[22], 'windows-1251'];
- protected const CP1252 = [[23], 'windows-1252'];
- protected const CP1256 = [[24], 'windows-1256'];
- protected const UNICODE_BIG_UNMARKED = [[25], 'UTF-16BE', 'UnicodeBig'];
- protected const UTF8 = [[26], 'UTF-8'];
- protected const ASCII = [[27, 170], 'US-ASCII'];
- protected const BIG5 = [[28]];
- protected const GB18030 = [[29], 'GB2312', 'EUC_CN', 'GBK'];
- protected const EUC_KR = [[30], 'EUC-KR'];
-
- /**
- * @var int[]
- */
- private $values;
-
- /**
- * @var string[]
- */
- private $otherEncodingNames;
-
- /**
- * @var array<int, self>|null
- */
- private static $valueToEci;
-
- /**
- * @var array<string, self>|null
- */
- private static $nameToEci;
-
- public function __construct(array $values, string ...$otherEncodingNames)
- {
- $this->values = $values;
- $this->otherEncodingNames = $otherEncodingNames;
- }
-
- /**
- * Returns the primary value.
- */
- public function getValue() : int
- {
- return $this->values[0];
- }
-
- /**
- * Gets character set ECI by value.
- *
- * Returns the representing ECI of a given value, or null if it is legal but unsupported.
- *
- * @throws InvalidArgumentException if value is not between 0 and 900
- */
- public static function getCharacterSetEciByValue(int $value) : ?self
- {
- if ($value < 0 || $value >= 900) {
- throw new InvalidArgumentException('Value must be between 0 and 900');
- }
-
- $valueToEci = self::valueToEci();
-
- if (! array_key_exists($value, $valueToEci)) {
- return null;
- }
-
- return $valueToEci[$value];
- }
-
- /**
- * Returns character set ECI by name.
- *
- * Returns the representing ECI of a given name, or null if it is legal but unsupported
- */
- public static function getCharacterSetEciByName(string $name) : ?self
- {
- $nameToEci = self::nameToEci();
- $name = strtolower($name);
-
- if (! array_key_exists($name, $nameToEci)) {
- return null;
- }
-
- return $nameToEci[$name];
- }
-
- private static function valueToEci() : array
- {
- if (null !== self::$valueToEci) {
- return self::$valueToEci;
- }
-
- self::$valueToEci = [];
-
- foreach (self::values() as $eci) {
- foreach ($eci->values as $value) {
- self::$valueToEci[$value] = $eci;
- }
- }
-
- return self::$valueToEci;
- }
-
- private static function nameToEci() : array
- {
- if (null !== self::$nameToEci) {
- return self::$nameToEci;
- }
-
- self::$nameToEci = [];
-
- foreach (self::values() as $eci) {
- self::$nameToEci[strtolower($eci->name())] = $eci;
-
- foreach ($eci->otherEncodingNames as $name) {
- self::$nameToEci[strtolower($name)] = $eci;
- }
- }
-
- return self::$nameToEci;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/EcBlock.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/EcBlock.php
deleted file mode 100644
index a9a1d07..0000000
--- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/EcBlock.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-declare(strict_types = 1);
-
-namespace BaconQrCode\Common;
-
-/**
- * Encapsulates the parameters for one error-correction block in one symbol version.
- *
- * This includes the number of data codewords, and the number of times a block with these parameters is used
- * consecutively in the QR code version's format.
- */
-final class EcBlock
-{
- /**
- * How many times the block is used.
- *
- * @var int
- */
- private $count;
-
- /**
- * Number of data codewords.
- *
- * @var int
- */
- private $dataCodewords;
-
- public function __construct(int $count, int $dataCodewords)
- {
- $this->count = $count;
- $this->dataCodewords = $dataCodewords;
- }
-
- /**
- * Returns how many times the block is used.
- */
- public function getCount() : int
- {
- return $this->count;
- }
-
- /**
- * Returns the number of data codewords.
- */
- public function getDataCodewords() : int
- {
- return $this->dataCodewords;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/EcBlocks.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/EcBlocks.php
deleted file mode 100644
index 172b5f2..0000000
--- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/EcBlocks.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-declare(strict_types = 1);
-
-namespace BaconQrCode\Common;
-
-/**
- * Encapsulates a set of error-correction blocks in one symbol version.
- *
- * Most versions will use blocks of differing sizes within one version, so, this encapsulates the parameters for each
- * set of blocks. It also holds the number of error-correction codewords per block since it will be the same across all
- * blocks within one version.
- */
-final class EcBlocks
-{
- /**
- * Number of EC codewords per block.
- *
- * @var int
- */
- private $ecCodewordsPerBlock;
-
- /**
- * List of EC blocks.
- *
- * @var EcBlock[]
- */
- private $ecBlocks;
-
- public function __construct(int $ecCodewordsPerBlock, EcBlock ...$ecBlocks)
- {
- $this->ecCodewordsPerBlock = $ecCodewordsPerBlock;
- $this->ecBlocks = $ecBlocks;
- }
-
- /**
- * Returns the number of EC codewords per block.
- */
- public function getEcCodewordsPerBlock() : int
- {
- return $this->ecCodewordsPerBlock;
- }
-
- /**
- * Returns the total number of EC block appearances.
- */
- public function getNumBlocks() : int
- {
- $total = 0;
-
- foreach ($this->ecBlocks as $ecBlock) {
- $total += $ecBlock->getCount();
- }
-
- return $total;
- }
-
- /**
- * Returns the total count of EC codewords.
- */
- public function getTotalEcCodewords() : int
- {
- return $this->ecCodewordsPerBlock * $this->getNumBlocks();
- }
-
- /**
- * Returns the EC blocks included in this collection.
- *
- * @return EcBlock[]
- */
- public function getEcBlocks() : array
- {
- return $this->ecBlocks;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/ErrorCorrectionLevel.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/ErrorCorrectionLevel.php
deleted file mode 100644
index 9bbf440..0000000
--- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/ErrorCorrectionLevel.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-declare(strict_types = 1);
-
-namespace BaconQrCode\Common;
-
-use BaconQrCode\Exception\OutOfBoundsException;
-use DASPRiD\Enum\AbstractEnum;
-
-/**
- * Enum representing the four error correction levels.
- *
- * @method static self L() ~7% correction
- * @method static self M() ~15% correction
- * @method static self Q() ~25% correction
- * @method static self H() ~30% correction
- */
-final class ErrorCorrectionLevel extends