@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | private function isValidIban(string $value): bool |
| 54 | 54 | { |
| 55 | 55 | // strip spaces |
| 56 | - $search = [ |
|
| 56 | + $search = [ |
|
| 57 | 57 | "\x20", // normal space |
| 58 | 58 | "\u{0001}", // start of heading |
| 59 | 59 | "\u{0002}", // start of text |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | $search = [' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']; |
| 109 | 109 | $replace = ['', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', |
| 110 | - '32', '33', '34', '35',]; |
|
| 110 | + '32', '33', '34', '35', ]; |
|
| 111 | 111 | |
| 112 | 112 | // take |
| 113 | 113 | $first = substr($value, 0, 4); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | if (null === $value) { |
| 72 | 72 | return '0'; |
| 73 | 73 | } |
| 74 | - if('' === $value) { |
|
| 74 | + if ('' === $value) { |
|
| 75 | 75 | return '0'; |
| 76 | 76 | } |
| 77 | 77 | Log::debug(sprintf('Start with amount "%s"', $value)); |
@@ -65,17 +65,17 @@ |
||
| 65 | 65 | |
| 66 | 66 | // loop each column, put in $data |
| 67 | 67 | foreach ($row as $columnIndex => $column) { |
| 68 | - if(!isset($data[$columnIndex])) { |
|
| 68 | + if (!isset($data[$columnIndex])) { |
|
| 69 | 69 | // don't need to handle this. Continue. |
| 70 | 70 | continue; |
| 71 | 71 | } |
| 72 | - if('' !== $column) { |
|
| 72 | + if ('' !== $column) { |
|
| 73 | 73 | $data[$columnIndex]['values'][] = trim($column); |
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | // loop data, clean up data: |
| 78 | - foreach($data as $index => $columnInfo) { |
|
| 78 | + foreach ($data as $index => $columnInfo) { |
|
| 79 | 79 | $data[$index]['values'] = array_unique($data[$index]['values']); |
| 80 | 80 | asort($data[$index]['values']); |
| 81 | 81 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | protected static function processTransactionDetails(array $row): array |
| 79 | 79 | { |
| 80 | - if(isset($row[9])) { |
|
| 80 | + if (isset($row[9])) { |
|
| 81 | 81 | $transactionDetails = $row[9]; |
| 82 | 82 | $row[11] = self::opposingAccountName($transactionDetails); |
| 83 | 83 | $row[12] = self::opposingAccountIban($transactionDetails); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | private static function convertStructuredDescriptionToProperFormat(string $description): string |
| 131 | 131 | { |
| 132 | 132 | preg_match('/^\*\*\*(\d{3}\/\d{4}\/\d{5})\*\*\*$/', $description, $matches); |
| 133 | - if(isset($matches[1])) { |
|
| 133 | + if (isset($matches[1])) { |
|
| 134 | 134 | return '+++' . $matches[1] . '+++'; |
| 135 | 135 | } |
| 136 | 136 | return $description; |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | private static function parseInformationFromTransactionDetails(string $transactionDetails, string $regex): string |
| 146 | 146 | { |
| 147 | - if(isset($transactionDetails)) { |
|
| 147 | + if (isset($transactionDetails)) { |
|
| 148 | 148 | preg_match($regex, $transactionDetails, $matches); |
| 149 | 149 | if (isset($matches[1])) { |
| 150 | 150 | return trim($matches[1]); |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | { |
| 79 | 79 | /** @var string $name */ |
| 80 | 80 | foreach ($specifics as $name => $enabled) { |
| 81 | - if($enabled && self::exists($name)) { |
|
| 81 | + if ($enabled && self::exists($name)) { |
|
| 82 | 82 | /** @var SpecificInterface $object */ |
| 83 | 83 | $object = app(self::fullClass($name)); |
| 84 | 84 | $row = $object->run($row); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | $this->amount = $data['amount']; |
| 58 | 58 | $this->currencyCode = $data['currency_code']; |
| 59 | 59 | $this->currencyId = $data['currency_id']; |
| 60 | - $this->currencyDecimalPlaces= $data['currency_decimal_places']; |
|
| 60 | + $this->currencyDecimalPlaces = $data['currency_decimal_places']; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | } |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | try { |
| 68 | 68 | $data = $this->authenticatedGet(); |
| 69 | - } catch (ApiException|GuzzleException $e) { |
|
| 69 | + } catch (ApiException | GuzzleException $e) { |
|
| 70 | 70 | throw new ApiHttpException($e->getMessage()); |
| 71 | 71 | } |
| 72 | 72 | $collectedRows[] = $data['data']; |
@@ -202,12 +202,12 @@ |
||
| 202 | 202 | $client = $this->getClient(); |
| 203 | 203 | $res = $client->request( |
| 204 | 204 | 'GET', $fullUri, [ |
| 205 | - 'headers' => [ |
|
| 206 | - 'Accept' => 'application/json', |
|
| 207 | - 'Authorization' => sprintf('Bearer %s', $this->getToken()), |
|
| 208 | - ], |
|
| 209 | - 'verify' => resource_path('certs/ca.cert.pem'), |
|
| 210 | - ] |
|
| 205 | + 'headers' => [ |
|
| 206 | + 'Accept' => 'application/json', |
|
| 207 | + 'Authorization' => sprintf('Bearer %s', $this->getToken()), |
|
| 208 | + ], |
|
| 209 | + 'verify' => resource_path('certs/ca.cert.pem'), |
|
| 210 | + ] |
|
| 211 | 211 | ); |
| 212 | 212 | |
| 213 | 213 | if (200 !== $res->getStatusCode()) { |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | |
| 150 | 150 | $debugOpt = $options; |
| 151 | 151 | unset($debugOpt['body']); |
| 152 | - Log::debug('Options are' , $debugOpt); |
|
| 152 | + Log::debug('Options are', $debugOpt); |
|
| 153 | 153 | Log::debug('Body is', $this->getBody()); |
| 154 | 154 | |
| 155 | 155 | $res = $client->request('POST', $fullUri, $options); |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | { |
| 62 | 62 | try { |
| 63 | 63 | $data = $this->authenticatedGet(); |
| 64 | - } catch (ApiException|GuzzleException $e) { |
|
| 64 | + } catch (ApiException | GuzzleException $e) { |
|
| 65 | 65 | throw new ApiHttpException($e->getMessage()); |
| 66 | 66 | } |
| 67 | 67 | |