diff --git a/spec/PUGX/Poser/PoserSpec.php b/spec/PUGX/Poser/PoserSpec.php index cbf84fb..85665ce 100644 --- a/spec/PUGX/Poser/PoserSpec.php +++ b/spec/PUGX/Poser/PoserSpec.php @@ -86,7 +86,7 @@ public function getMatchers(): array { return [ 'beAValidSVGImageContaining' => function ($object, $subject, $status) { - $regex = '/^$/'; + $regex = '/^$/'; $matches = []; return \preg_match($regex, $object, $matches, \PREG_OFFSET_CAPTURE, 0); diff --git a/spec/PUGX/Poser/Render/SvgFlatRenderSpec.php b/spec/PUGX/Poser/Render/SvgFlatRenderSpec.php index 940b9f6..195f17c 100644 --- a/spec/PUGX/Poser/Render/SvgFlatRenderSpec.php +++ b/spec/PUGX/Poser/Render/SvgFlatRenderSpec.php @@ -26,7 +26,7 @@ public function getMatchers(): array { return [ 'beAValidSVGImage' => function ($subject) { - $regex = '/^$/'; + $regex = '/^$/'; $matches = []; return \preg_match($regex, (string) $subject, $matches, \PREG_OFFSET_CAPTURE, 0); diff --git a/spec/PUGX/Poser/Render/SvgFlatSquareRenderSpec.php b/spec/PUGX/Poser/Render/SvgFlatSquareRenderSpec.php index bb6fc3c..20108c4 100644 --- a/spec/PUGX/Poser/Render/SvgFlatSquareRenderSpec.php +++ b/spec/PUGX/Poser/Render/SvgFlatSquareRenderSpec.php @@ -26,7 +26,7 @@ public function getMatchers(): array { return [ 'beAValidSVGImage' => function ($subject) { - $regex = '/^$/'; + $regex = '/^$/'; $matches = []; return \preg_match($regex, (string) $subject, $matches, \PREG_OFFSET_CAPTURE, 0); diff --git a/spec/PUGX/Poser/Render/SvgPlasticRenderSpec.php b/spec/PUGX/Poser/Render/SvgPlasticRenderSpec.php index cfdf3a2..061f98e 100644 --- a/spec/PUGX/Poser/Render/SvgPlasticRenderSpec.php +++ b/spec/PUGX/Poser/Render/SvgPlasticRenderSpec.php @@ -42,7 +42,7 @@ public function getMatchers(): array { return [ 'beAValidSVGImage' => function ($subject) { - $regex = '/^$/'; + $regex = '/^$/'; $matches = []; return \preg_match($regex, (string) $subject, $matches, \PREG_OFFSET_CAPTURE, 0); diff --git a/src/Badge.php b/src/Badge.php index adb3cf1..4a9e722 100644 --- a/src/Badge.php +++ b/src/Badge.php @@ -141,7 +141,7 @@ private function escapeValue(string $value): string '/--+/', ]; $replacement = [ - //'$1 $2', + // '$1 $2', '$1 ', ' $1', '°§*¼', diff --git a/src/Poser.php b/src/Poser.php index 2fbc869..fe03a67 100644 --- a/src/Poser.php +++ b/src/Poser.php @@ -10,8 +10,6 @@ class Poser /** * Constructor. - * - * @param $renders */ public function __construct(array $renders) { @@ -24,12 +22,6 @@ public function __construct(array $renders) /** * Generate and Render a badge according to the style. - * - * @param $subject - * @param $status - * @param $color - * @param $style - * @param $format */ public function generate(string $subject, string $status, string $color, string $style, string $format = Badge::DEFAULT_FORMAT): Image { @@ -41,8 +33,6 @@ public function generate(string $subject, string $status, string $color, string /** * Generate and Render a badge according to the format from an URI, * eg license-MIT-blue.svg or I_m-liuggio-yellow.svg. - * - * @param $string */ public function generateFromURI(string $string): Image { diff --git a/src/Render/LocalSvgRenderer.php b/src/Render/LocalSvgRenderer.php index d4e94aa..b2e4012 100644 --- a/src/Render/LocalSvgRenderer.php +++ b/src/Render/LocalSvgRenderer.php @@ -15,7 +15,6 @@ use PUGX\Poser\Calculator\GDTextSizeCalculator; use PUGX\Poser\Calculator\TextSizeCalculatorInterface; use PUGX\Poser\Image; -use SimpleXMLElement; /** * Local SVG renderer. @@ -80,7 +79,7 @@ private function renderSvg(string $render, array $parameters, string $style): Im } try { - $xml = new SimpleXMLElement($render); + $xml = new \SimpleXMLElement($render); } catch (\Exception $e) { throw new \RuntimeException('Generated string is not a valid XML'); } diff --git a/src/Render/SvgForTheBadgeRenderer.php b/src/Render/SvgForTheBadgeRenderer.php index 1f63998..f8e2458 100644 --- a/src/Render/SvgForTheBadgeRenderer.php +++ b/src/Render/SvgForTheBadgeRenderer.php @@ -11,7 +11,6 @@ namespace PUGX\Poser\Render; -use EasySVG; use PUGX\Poser\Badge; use PUGX\Poser\Calculator\TextSizeCalculatorInterface; @@ -24,17 +23,17 @@ class SvgForTheBadgeRenderer extends LocalSvgRenderer public const TEXT_LETTER_SPACING = 0.1; public const PADDING_X = 10; - private EasySVG $easy; + private \EasySVG $easy; public function __construct( - ?EasySVG $easySVG = null, + ?\EasySVG $easySVG = null, ?TextSizeCalculatorInterface $textSizeCalculator = null, ?string $templatesDirectory = null ) { parent::__construct($textSizeCalculator, $templatesDirectory); if (null === $easySVG) { - $easySVG = new EasySVG(); + $easySVG = new \EasySVG(); } $this->easy = $easySVG;