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/Renderer/RendererStyle | |
| 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/Renderer/RendererStyle')
5 files changed, 0 insertions, 400 deletions
diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/EyeFill.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/EyeFill.php deleted file mode 100644 index 46abc22..0000000 --- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/EyeFill.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -declare(strict_types = 1); - -namespace BaconQrCode\Renderer\RendererStyle; - -use BaconQrCode\Exception\RuntimeException; -use BaconQrCode\Renderer\Color\ColorInterface; - -final class EyeFill -{ - /** - * @var ColorInterface|null - */ - private $externalColor; - - /** - * @var ColorInterface|null - */ - private $internalColor; - - /** - * @var self|null - */ - private static $inherit; - - public function __construct(?ColorInterface $externalColor, ?ColorInterface $internalColor) - { - $this->externalColor = $externalColor; - $this->internalColor = $internalColor; - } - - public static function uniform(ColorInterface $color) : self - { - return new self($color, $color); - } - - public static function inherit() : self - { - return self::$inherit ?: self::$inherit = new self(null, null); - } - - public function inheritsBothColors() : bool - { - return null === $this->externalColor && null === $this->internalColor; - } - - public function inheritsExternalColor() : bool - { - return null === $this->externalColor; - } - - public function inheritsInternalColor() : bool - { - return null === $this->internalColor; - } - - public function getExternalColor() : ColorInterface - { - if (null === $this->externalColor) { - throw new RuntimeException('External eye color inherits foreground color'); - } - - return $this->externalColor; - } - - public function getInternalColor() : ColorInterface - { - if (null === $this->internalColor) { - throw new RuntimeException('Internal eye color inherits foreground color'); - } - - return $this->internalColor; - } -} diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php deleted file mode 100644 index d54268e..0000000 --- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php +++ /dev/null @@ -1,168 +0,0 @@ -<?php -declare(strict_types = 1); - -namespace BaconQrCode\Renderer\RendererStyle; - -use BaconQrCode\Exception\RuntimeException; -use BaconQrCode\Renderer\Color\ColorInterface; -use BaconQrCode\Renderer\Color\Gray; - -final class Fill -{ - /** - * @var ColorInterface - */ - private $backgroundColor; - - /** - * @var ColorInterface|null - */ - private $foregroundColor; - - /** - * @var Gradient|null - */ - private $foregroundGradient; - - /** - * @var EyeFill - */ - private $topLeftEyeFill; - - /** - * @var EyeFill - */ - private $topRightEyeFill; - - /** - * @var EyeFill - */ - private $bottomLeftEyeFill; - - /** - * @var self|null - */ - private static $default; - - private function __construct( - ColorInterface $backgroundColor, - ?ColorInterface $foregroundColor, - ?Gradient $foregroundGradient, - EyeFill $topLeftEyeFill, - EyeFill $topRightEyeFill, - EyeFill $bottomLeftEyeFill - ) { - $this->backgroundColor = $backgroundColor; - $this->foregroundColor = $foregroundColor; - $this->foregroundGradient = $foregroundGradient; - $this->topLeftEyeFill = $topLeftEyeFill; - $this->topRightEyeFill = $topRightEyeFill; - $this->bottomLeftEyeFill = $bottomLeftEyeFill; - } - - public static function default() : self - { - return self::$default ?: self::$default = self::uniformColor(new Gray(100), new Gray(0)); - } - - public static function withForegroundColor( - ColorInterface $backgroundColor, - ColorInterface $foregroundColor, - EyeFill $topLeftEyeFill, - EyeFill $topRightEyeFill, - EyeFill $bottomLeftEyeFill - ) : self { - return new self( - $backgroundColor, - $foregroundColor, - null, - $topLeftEyeFill, - $topRightEyeFill, - $bottomLeftEyeFill - ); - } - - public static function withForegroundGradient( - ColorInterface $backgroundColor, - Gradient $foregroundGradient, - EyeFill $topLeftEyeFill, - EyeFill $topRightEyeFill, - EyeFill $bottomLeftEyeFill - ) : self { - return new self( - $backgroundColor, - null, - $foregroundGradient, - $topLeftEyeFill, - $topRightEyeFill, - $bottomLeftEyeFill - ); - } - - public static function uniformColor(ColorInterface $backgroundColor, ColorInterface $foregroundColor) : self - { - return new self( - $backgroundColor, - $foregroundColor, - null, - EyeFill::inherit(), - EyeFill::inherit(), - EyeFill::inherit() - ); - } - - public static function uniformGradient(ColorInterface $backgroundColor, Gradient $foregroundGradient) : self - { - return new self( - $backgroundColor, - null, - $foregroundGradient, - EyeFill::inherit(), - EyeFill::inherit(), - EyeFill::inherit() - ); - } - - public function hasGradientFill() : bool - { - return null !== $this->foregroundGradient; - } - - public function getBackgroundColor() : ColorInterface - { - return $this->backgroundColor; - } - - public function getForegroundColor() : ColorInterface - { - if (null === $this->foregroundColor) { - throw new RuntimeException('Fill uses a gradient, thus no foreground color is available'); - } - - return $this->foregroundColor; - } - - public function getForegroundGradient() : Gradient - { - if (null === $this->foregroundGradient) { - throw new RuntimeException('Fill uses a single color, thus no foreground gradient is available'); - } - - return $this->foregroundGradient; - } - - public function getTopLeftEyeFill() : EyeFill - { - return $this->topLeftEyeFill; - } - - public function getTopRightEyeFill() : EyeFill - { - return $this->topRightEyeFill; - } - - public function getBottomLeftEyeFill() : EyeFill - { - return $this->bottomLeftEyeFill; - } -} diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Gradient.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Gradient.php deleted file mode 100644 index 3813dfd..0000000 --- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Gradient.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -declare(strict_types = 1); - -namespace BaconQrCode\Renderer\RendererStyle; - -use BaconQrCode\Renderer\Color\ColorInterface; - -final class Gradient -{ - /** - * @var ColorInterface - */ - private $startColor; - - /** - * @var ColorInterface - */ - private $endColor; - - /** - * @var GradientType - */ - private $type; - - public function __construct(ColorInterface $startColor, ColorInterface $endColor, GradientType $type) - { - $this->startColor = $startColor; - $this->endColor = $endColor; - $this->type = $type; - } - - public function getStartColor() : ColorInterface - { - return $this->startColor; - } - - public function getEndColor() : ColorInterface - { - return $this->endColor; - } - - public function getType() : GradientType - { - return $this->type; - } -} diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/GradientType.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/GradientType.php deleted file mode 100644 index c1ca754..0000000 --- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/GradientType.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -declare(strict_types = 1); - -namespace BaconQrCode\Renderer\RendererStyle; - -use DASPRiD\Enum\AbstractEnum; - -/** - * @method static self VERTICAL() - * @method static self HORIZONTAL() - * @method static self DIAGONAL() - * @method static self INVERSE_DIAGONAL() - * @method static self RADIAL() - */ -final class GradientType extends AbstractEnum -{ - protected const VERTICAL = null; - protected const HORIZONTAL = null; - protected const DIAGONAL = null; - protected const INVERSE_DIAGONAL = null; - protected const RADIAL = null; -} diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/RendererStyle.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/RendererStyle.php deleted file mode 100644 index e03e099..0000000 --- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/RendererStyle.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -declare(strict_types = 1); - -namespace BaconQrCode\Renderer\RendererStyle; - -use BaconQrCode\Renderer\Eye\EyeInterface; -use BaconQrCode\Renderer\Eye\ModuleEye; -use BaconQrCode\Renderer\Module\ModuleInterface; -use BaconQrCode\Renderer\Module\SquareModule; - -final class RendererStyle -{ - /** - * @var int - */ - private $size; - - /** - * @var int - */ - private $margin; - - /** - * @var ModuleInterface - */ - private $module; - - /** - * @var EyeInterface|null - */ - private $eye; - - /** - * @var Fill - */ - private $fill; - - public function __construct( - int $size, - int $margin = 4, - ?ModuleInterface $module = null, - ?EyeInterface $eye = null, - ?Fill $fill = null - ) { - $this->margin = $margin; - $this->size = $size; - $this->module = $module ?: SquareModule::instance(); - $this->eye = $eye ?: new ModuleEye($this->module); - $this->fill = $fill ?: Fill::default(); - } - - public function withSize(int $size) : self - { - $style = clone $this; - $style->size = $size; - return $style; - } - - public function withMargin(int $margin) : self - { - $style = clone $this; - $style->margin = $margin; - return $style; - } - - public function getSize() : int - { - return $this->size; - } - - public function getMargin() : int - { - return $this->margin; - } - - public function getModule() : ModuleInterface - { - return $this->module; - } - - public function getEye() : EyeInterface - { - return $this->eye; - } - - public function getFill() : Fill - { - return $this->fill; - } -} |
