Test Setup Failed
Branch master (2bb5c9)
by David
08:31
created
Category
src/EaselDrawing/Templates/ElementFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     {
13 13
         $type = $this->castType($type);
14 14
         $implements = class_implements($builderClass);
15
-        if (! in_array(ElementBuilderInterface::class, $implements)) {
15
+        if (!in_array(ElementBuilderInterface::class, $implements)) {
16 16
             throw new \InvalidArgumentException(
17 17
                 "Cannot register the class $builderClass since it does not implements " . ElementBuilderInterface::class
18 18
             );
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public function builderClass(string $type): string
24 24
     {
25 25
         $type = $this->castType($type);
26
-        if (! isset($this->builders[$type])) {
26
+        if (!isset($this->builders[$type])) {
27 27
             throw new \InvalidArgumentException("There are no builder class for type $type");
28 28
         }
29 29
         return $this->builders[$type];
Please login to merge, or discard this patch.
src/EaselDrawing/Canvas.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
     ) {
28 28
         $this->width = $width;
29 29
         $this->height = $height;
30
-        $this->elements = $elements ? : new Elements();
31
-        $this->background = $background ? : new Color(255, 255, 255);
30
+        $this->elements = $elements ?: new Elements();
31
+        $this->background = $background ?: new Color(255, 255, 255);
32 32
         $this->grayScale = $grayScale;
33
-        $this->orientation = $orientation ? : new Orientation(Orientation::LANDSCAPE);
33
+        $this->orientation = $orientation ?: new Orientation(Orientation::LANDSCAPE);
34 34
     }
35 35
 
36 36
     public function getWidth(): int
Please login to merge, or discard this patch.
src/EaselDrawing/Elements.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
     public function add(ElementInterface $element)
11 11
     {
12
-        if (! $this->exists($element)) {
12
+        if (!$this->exists($element)) {
13 13
             $this->elements[] = $element;
14 14
         }
15 15
     }
Please login to merge, or discard this patch.
src/EaselDrawing/TextBackground.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function setValue(string $value)
33 33
     {
34
-        if (! in_array($value, [static::NONE, static::FIT, static::BOX])) {
34
+        if (!in_array($value, [static::NONE, static::FIT, static::BOX])) {
35 35
             throw new \InvalidArgumentException('TextBackground value is not valid');
36 36
         }
37 37
         $this->value = $value;
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public static function newFromString($value, Color $color)
46 46
     {
47 47
         $value = strtoupper($value);
48
-        if (! in_array($value, [static::NONE, static::FIT, static::BOX])) {
48
+        if (!in_array($value, [static::NONE, static::FIT, static::BOX])) {
49 49
             $value = static::BOX;
50 50
         }
51 51
         return new static($value, $color);
Please login to merge, or discard this patch.