From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- .../src/Renderer/PlainTextRenderer.php | 86 ---------------------- 1 file changed, 86 deletions(-) delete mode 100644 srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/PlainTextRenderer.php (limited to 'srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/PlainTextRenderer.php') diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/PlainTextRenderer.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/PlainTextRenderer.php deleted file mode 100644 index 8aa7652..0000000 --- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/PlainTextRenderer.php +++ /dev/null @@ -1,86 +0,0 @@ -margin = $margin; - } - - /** - * @throws InvalidArgumentException if matrix width doesn't match height - */ - public function render(QrCode $qrCode) : string - { - $matrix = $qrCode->getMatrix(); - $matrixSize = $matrix->getWidth(); - - if ($matrixSize !== $matrix->getHeight()) { - throw new InvalidArgumentException('Matrix must have the same width and height'); - } - - $rows = $matrix->getArray()->toArray(); - - if (0 !== $matrixSize % 2) { - $rows[] = array_fill(0, $matrixSize, 0); - } - - $horizontalMargin = str_repeat(self::EMPTY_BLOCK, $this->margin); - $result = str_repeat("\n", (int) ceil($this->margin / 2)); - - for ($i = 0; $i < $matrixSize; $i += 2) { - $result .= $horizontalMargin; - - $upperRow = $rows[$i]; - $lowerRow = $rows[$i + 1]; - - for ($j = 0; $j < $matrixSize; ++$j) { - $upperBit = $upperRow[$j]; - $lowerBit = $lowerRow[$j]; - - if ($upperBit) { - $result .= $lowerBit ? self::FULL_BLOCK : self::UPPER_HALF_BLOCK; - } else { - $result .= $lowerBit ? self::LOWER_HALF_BLOCK : self::EMPTY_BLOCK; - } - } - - $result .= $horizontalMargin . "\n"; - } - - $result .= str_repeat("\n", (int) ceil($this->margin / 2)); - - return $result; - } -} -- cgit