Passed
Push — master ( 1eeb90...3a73e7 )
by Stefan
01:29
created
SKien/Sepa/Sepa.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -169,19 +169,19 @@
 block discarded – undo
169 169
         self::addValidation('IT', 'SKien\Sepa\CntryValidation\SepaCntryValidationIT');
170 170
         
171 171
         self::$aIBANError = array(
172
-                 Sepa::ERR_IBAN_INVALID_CNTRY   => 'The country code of the IBAN is not supported!'
172
+                    Sepa::ERR_IBAN_INVALID_CNTRY   => 'The country code of the IBAN is not supported!'
173 173
                 ,Sepa::ERR_IBAN_INVALID_LENGTH  => 'Invalid length of the IBAN!'
174 174
                 ,Sepa::ERR_IBAN_INVALID_SIGN    => 'The IBAN contains invalid characters!'
175 175
                 ,Sepa::ERR_IBAN_CHECKSUM        => 'Invalid IBAN checksum!'
176 176
             );
177 177
 
178 178
         self::$aBICError = array(
179
-                 Sepa::ERR_BIC_INVALID          => 'Invalid BIC!'
179
+                    Sepa::ERR_BIC_INVALID          => 'Invalid BIC!'
180 180
                 ,Sepa::ERR_BIC_INVALID_CNTRY    => 'The country code of the BIC is not supported!'
181 181
             );
182 182
 
183 183
         self::$aCIError = array(
184
-                 Sepa::ERR_IBAN_INVALID_CNTRY   => 'The country code of the CI is not supported!'
184
+                    Sepa::ERR_IBAN_INVALID_CNTRY   => 'The country code of the CI is not supported!'
185 185
                 ,Sepa::ERR_IBAN_INVALID_LENGTH  => 'Invalid length of the CI!'
186 186
                 ,Sepa::ERR_IBAN_INVALID_SIGN    => 'The CI contains invalid characters!'
187 187
                 ,Sepa::ERR_IBAN_CHECKSUM        => 'Invalid CI checksum!'
Please login to merge, or discard this patch.
SKien/Sepa/CntryValidation/SepaCntryValidationBE.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $bAlphaNum = false;
87 87
         if (strlen($strCheck) == 17) {
88 88
             $strRegEx = '/^([A-Z]){2}([0-9]){2}([0-9A-Z]){3}([0-9]){10}?$/';
89
-        } else if(strlen($strCheck) == 20) {
89
+        } else if (strlen($strCheck) == 20) {
90 90
             $strRegEx = '/^([A-Z]){2}([0-9]){2}([0-9A-Z]){3}([0-9]){3}D([0-9]){9}?$/';
91 91
             $bAlphaNum = true;
92 92
         } else {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         if (!preg_match($strRegEx, $strCheck)) {
100 100
             return Sepa::ERR_CI_INVALID_SIGN;
101 101
         }
102
-        $strCS = substr($strCheck,  2, 2);
102
+        $strCS = substr($strCheck, 2, 2);
103 103
         // NOTE: the CBC is not taken into account when calculating the checksum!
104 104
         $strCheck = substr($strCheck, 7);
105 105
         if ($bAlphaNum) {
Please login to merge, or discard this patch.
SKien/Sepa/CntryValidation/SepaCntryValidationBase.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
         return $this->strLastCheckSum;
184 184
     }
185 185
 
186
-	/**
186
+    /**
187 187
      * calculate modulo 97 checksum for bankcode and accountnumber
188 188
      * MOD 97-10 (see ISO 7064)
189 189
      * @param string $strCheck
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
             return Sepa::ERR_CI_INVALID_SIGN;
163 163
         }
164 164
         
165
-        $strCS = substr($strCheck,  2, 2);
165
+        $strCS = substr($strCheck, 2, 2);
166 166
         // NOTE: the CBC is not taken into account when calculating the checksum!
167
-        $strCheck = substr($strCheck,  7);
167
+        $strCheck = substr($strCheck, 7);
168 168
         if ($this->bAlphaNumCI) {
169 169
             $strCheck = $this->replaceAlpha($strCheck);
170 170
         }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         // 3. subtract value from 98
200 200
         $strCS = $this->adjustFP(bcsub('98', $strCS2));
201 201
         // 4. always 2 digits...
202
-        if (strlen($strCS) < 2 ) {
202
+        if (strlen($strCS) < 2) {
203 203
             $strCS = '0' . $strCS;
204 204
         }
205 205
         $this->strLastCheckSum = $strCS;
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
      */
216 216
     protected function adjustFP(string $str) : string
217 217
     {
218
-        if( strpos( '.', $str ) !== false ) {
218
+        if (strpos('.', $str) !== false) {
219 219
             $str = substr($str, 0, strpos('.', $str));
220 220
         }
221 221
         return $str;
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
     protected function replaceAlpha(string $strCheck) : string
242 242
     {
243 243
         // account number may contains characters
244
-        foreach (range('A', 'Z') as $ch){
244
+        foreach (range('A', 'Z') as $ch) {
245 245
             $strCheck = str_replace((string)$ch, $this->convCharToNum((string)$ch), $strCheck);
246 246
         }
247 247
         return $strCheck;
Please login to merge, or discard this patch.
SKien/Sepa/SepaHelper.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
 
203 203
         //  New Year        Good Day     Easter Monday  1'stMay      1.Christmas   2.Christmas
204 204
         $aTarget2 = array(
205
-             '2019-01-01', '2019-04-18', '2019-04-21', '2019-05-01', '2019-12-25', '2019-12-26'
205
+                '2019-01-01', '2019-04-18', '2019-04-21', '2019-05-01', '2019-12-25', '2019-12-26'
206 206
             ,'2020-01-01', '2020-04-10', '2020-04-13', '2020-05-01', '2020-12-25', '2020-12-26'
207 207
             ,'2021-01-01', '2021-04-02', '2021-04-05', '2021-05-01', '2021-12-25', '2021-12-26'
208 208
             ,'2022-01-01', '2022-04-15', '2022-04-18', '2022-05-01', '2022-12-25', '2022-12-26'
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@
 block discarded – undo
39 39
      */
40 40
     public static function createUID() : string
41 41
     {
42
-        mt_srand((int) microtime(true) * 10000);
43
-        $charid = strtoupper(md5(uniqid((string) rand(), true)));
44
-        $uuid =  substr($charid, 0, 8) . chr(45)
42
+        mt_srand((int)microtime(true) * 10000);
43
+        $charid = strtoupper(md5(uniqid((string)rand(), true)));
44
+        $uuid = substr($charid, 0, 8) . chr(45)
45 45
                 .substr($charid, 8, 4) . chr(45)
46 46
                 .substr($charid, 12, 4) . chr(45)
47
-                .substr($charid, 16,12);
47
+                .substr($charid, 16, 12);
48 48
 
49 49
         return $uuid;
50 50
     }
Please login to merge, or discard this patch.