@@ -12,7 +12,7 @@ discard block |
||
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 |
||
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]; |
@@ -27,10 +27,10 @@ |
||
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 |
@@ -9,7 +9,7 @@ |
||
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 | } |
@@ -31,7 +31,7 @@ discard block |
||
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 |
||
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); |