Passed
Pull Request — 1.x (#46)
by Milwad
03:01
created
src/Traits/IbanTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,20 +9,20 @@  discard block
 block discarded – undo
9 9
      *
10 10
      * @return void
11 11
      */
12
-    private function setCountries(array|null $countries)
12
+    private function setCountries(array | null $countries)
13 13
     {
14 14
         if (empty($countries)) {
15
-            $this->countries = [];
15
+            $this->countries = [ ];
16 16
 
17 17
             return;
18 18
         }
19 19
 
20
-        if (is_array($countries[0])) {
21
-            $countries = $countries[0];
20
+        if (is_array($countries[ 0 ])) {
21
+            $countries = $countries[ 0 ];
22 22
         }
23 23
 
24 24
         foreach ($countries as $country) {
25
-            $this->countries[] = $country;
25
+            $this->countries[ ] = $country;
26 26
         }
27 27
     }
28 28
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     private function isIbanValid(string $iban)
35 35
     {
36
-        if (! $this->checkIbanFormat($iban)) {
36
+        if ( ! $this->checkIbanFormat($iban)) {
37 37
             return false;
38 38
         }
39 39
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     private function isCountryValid(string $country, string $ibanCountryCode)
128 128
     {
129 129
         return ! empty($country)
130
-            && isset($this->ibanLengthByCountry[$country])
130
+            && isset($this->ibanLengthByCountry[ $country ])
131 131
             && $ibanCountryCode === $country;
132 132
     }
133 133
 
@@ -138,6 +138,6 @@  discard block
 block discarded – undo
138 138
      */
139 139
     private function isIbanLengthValid(string $iban, string $ibanCountryCode)
140 140
     {
141
-        return strlen($iban) === $this->ibanLengthByCountry[$ibanCountryCode];
141
+        return strlen($iban) === $this->ibanLengthByCountry[ $ibanCountryCode ];
142 142
     }
143 143
 }
Please login to merge, or discard this patch.
src/Rules/ValidIban.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
      */
168 168
     private ?array $countries;
169 169
 
170
-    public function __construct(array|string $countries = [])
170
+    public function __construct(array | string $countries = [ ])
171 171
     {
172 172
         $this->setCountries(func_get_args());
173 173
     }
Please login to merge, or discard this patch.