Test Failed
Push — master ( e8c6fd...f30885 )
by Yılmaz
13:11
created
src/Color.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
 
39 39
     public function __construct(?string $hex = null)
40 40
     {
41
-        if (! $hex) {
41
+        if (!$hex) {
42 42
             return;
43 43
         }
44 44
 
45 45
         $hex = $this->normalize($hex);
46 46
 
47
-        if (! $this->isValidHex($hex)) {
47
+        if (!$this->isValidHex($hex)) {
48 48
             throw new InvalidArgumentException(sprintf('Given hex value %s is invalid', $hex));
49 49
         }
50 50
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function toHex() : string
58 58
     {
59
-        return ($this->color) ? '#' . $this->color : '';
59
+        return ($this->color) ? '#'.$this->color : '';
60 60
     }
61 61
 
62 62
     /**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $rgb = $this->toRGB();
84 84
 
85
-        return 'rgb(' . implode(',', $rgb) . ')';
85
+        return 'rgb('.implode(',', $rgb).')';
86 86
     }
87 87
 
88 88
     /**
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public static function fromRGB(int $r, int $g, int $b) : Color
134 134
     {
135
-        $hex = dechex($r) . dechex($g) . dechex($b);
135
+        $hex = dechex($r).dechex($g).dechex($b);
136 136
 
137 137
         return new self($hex);
138 138
     }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 
223 223
         if (strlen($hex) === 3) {
224 224
             // Convert to 6 digit version
225
-            $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
225
+            $hex = $hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2];
226 226
         }
227 227
 
228 228
         return strtoupper($hex);
Please login to merge, or discard this patch.
src/IpRange.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
     public static function fromCIDR(string $cidr) : IpRange
65 65
     {
66 66
         [$subnet, $bits] = explode('/', $cidr);
67
-        $start               = long2ip((ip2long($subnet)) & ((-1 << (32 - (int)$bits))));
68
-        $end                 = long2ip((ip2long($subnet)) + pow(2, (32 - (int)$bits))-1);
67
+        $start               = long2ip((ip2long($subnet)) & ((-1 << (32 - (int) $bits))));
68
+        $end                 = long2ip((ip2long($subnet)) + pow(2, (32 - (int) $bits)) - 1);
69 69
 
70 70
         return new IpRange(new IpAddress($start), new IpAddress($end));
71 71
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function __toString() : string
79 79
     {
80
-        return $this->isEmpty() ? '' : $this->startIp . ' - ' . $this->endIp;
80
+        return $this->isEmpty() ? '' : $this->startIp.' - '.$this->endIp;
81 81
     }
82 82
 
83 83
     /**
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         return [
93
-            'startIp' => (string)$this->getStartIp(),
94
-            'endIp' => (string)$this->getEndIp(),
93
+            'startIp' => (string) $this->getStartIp(),
94
+            'endIp' => (string) $this->getEndIp(),
95 95
         ];
96 96
     }
97 97
 
Please login to merge, or discard this patch.
src/EmailAddress.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
     {
28 28
         // This is only a soft validation to reduce headaches earlier.
29 29
         // You SHOULD sanitize & validate actual email according to your needs, before using it as a value object!
30
-        if ($email && ! filter_var($email, FILTER_VALIDATE_EMAIL)) {
31
-            throw new InvalidArgumentException('Given e-mail address ' . $email . ' is not a valid');
30
+        if ($email && !filter_var($email, FILTER_VALIDATE_EMAIL)) {
31
+            throw new InvalidArgumentException('Given e-mail address '.$email.' is not a valid');
32 32
         }
33 33
 
34 34
         $this->address = $email;
Please login to merge, or discard this patch.
src/FullName.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public const TITLES = [
30 30
         'Mr.',
31
-        'Ms.',   // for women regardless of their marital status
31
+        'Ms.', // for women regardless of their marital status
32 32
         'Mrs.',
33 33
         'Miss',
34
-        'Mx.',   // a title that does not indicate gender
35
-        'Adv.',  // advocate
34
+        'Mx.', // a title that does not indicate gender
35
+        'Adv.', // advocate
36 36
         'Capt.', // captain
37 37
         'Dr.',
38 38
         'Prof.', // professor
@@ -96,13 +96,13 @@  discard block
 block discarded – undo
96 96
      */
97 97
     private function setTitle(string $title) : void
98 98
     {
99
-        if (! str_ends_with($title, '.')) {
99
+        if (!str_ends_with($title, '.')) {
100 100
             // Allow titles without dots too
101 101
             $title .= '.';
102 102
         }
103 103
 
104
-        if (! in_array($title, self::TITLES)) {
105
-            throw new InvalidArgumentException('Given title is invalid: ' . $title);
104
+        if (!in_array($title, self::TITLES)) {
105
+            throw new InvalidArgumentException('Given title is invalid: '.$title);
106 106
         }
107 107
 
108 108
         $this->title = $title;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                     $this->surname = $word;
127 127
                 } else {
128 128
                     // merge all middle names
129
-                    $this->middleName = trim($this->middleName . ' ' . $word);
129
+                    $this->middleName = trim($this->middleName.' '.$word);
130 130
                 }
131 131
             }
132 132
 
Please login to merge, or discard this patch.
src/IpAddress.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@
 block discarded – undo
36 36
      */
37 37
     public function __construct(string $addr = null)
38 38
     {
39
-        if (! $addr) {
39
+        if (!$addr) {
40 40
             return;
41 41
         }
42 42
 
43 43
         $filtered = filter_var($addr, FILTER_VALIDATE_IP);
44 44
         if ($filtered === false) {
45
-            throw new InvalidArgumentException('Given IP ' . $addr . ' is not a valid IP address');
45
+            throw new InvalidArgumentException('Given IP '.$addr.' is not a valid IP address');
46 46
         }
47 47
 
48 48
         $this->address = $filtered;
Please login to merge, or discard this patch.
src/DateRange.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
     /**
85 85
      * Returns duration of the date range in seconds.
86 86
      */
87
-    public function getDurationInSeconds() : float|int
87
+    public function getDurationInSeconds() : float | int
88 88
     {
89 89
         if (!$this->dateFrom) {
90 90
             return 0;
Please login to merge, or discard this patch.