@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | private function getButtonForLocalisation(string $strLanguageCountry): string |
32 | 32 | { |
33 | - $arrayMapFlags = [ |
|
33 | + $arrayMapFlags = [ |
|
34 | 34 | 'ro_RO' => 'ro', |
35 | 35 | 'it_IT' => 'it', |
36 | 36 | 'en_US' => 'us', |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | return $arrayDocument; |
102 | 102 | } |
103 | 103 | |
104 | - private function getHeaderComponents(array $arrayParams, string $key, string $value): array|string |
|
104 | + private function getHeaderComponents(array $arrayParams, string $key, string $value): array | string |
|
105 | 105 | { |
106 | 106 | $arrayDocument = []; |
107 | 107 | if ($value === 'SingleCompany') { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | ]) |
114 | 114 | ]; |
115 | 115 | } else { |
116 | - $arrayMapping = [ |
|
116 | + $arrayMapping = [ |
|
117 | 117 | 'Multiple' => [ |
118 | 118 | 'getMultipleElementsByKey' |
119 | 119 | , $arrayParams['data']->children('cac', true)->$key |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | 'data' => $objFile->children($strMap['cbc'], true), |
159 | 159 | 'namespace_cbc' => $arrayDocument['DocumentNameSpaces'][$strMap['cbc']], |
160 | 160 | ]); |
161 | - $arrayAggregates = $this->getHeader([ |
|
161 | + $arrayAggregates = $this->getHeader([ |
|
162 | 162 | 'CAC' => $objFile->children($strMap['cac'], true), |
163 | 163 | 'data' => $objFile, |
164 | 164 | ]); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $this->getBasicOrAggregateKey($arrayDocument['DocumentNameSpaces'], $strMap['cbc']) => $arrayBasics, |
167 | 167 | $this->getBasicOrAggregateKey($arrayDocument['DocumentNameSpaces'], $strMap['cac']) => $arrayAggregates, |
168 | 168 | ]; |
169 | - $arrayDocument['Lines'] = $this->getDocumentLines($objFile, $arrayDocument['DocumentTagName']); |
|
169 | + $arrayDocument['Lines'] = $this->getDocumentLines($objFile, $arrayDocument['DocumentTagName']); |
|
170 | 170 | return $arrayDocument; |
171 | 171 | } |
172 | 172 |
@@ -126,11 +126,11 @@ discard block |
||
126 | 126 | return $strValueToReturn; |
127 | 127 | } |
128 | 128 | |
129 | - private function handleResponseFile(\SplFileInfo|string $strFile): array |
|
129 | + private function handleResponseFile(\SplFileInfo | string $strFile): array |
|
130 | 130 | { |
131 | 131 | $arrayToReturn = []; |
132 | 132 | $strFileMime = mime_content_type($strFile->getRealPath()); |
133 | - switch($strFileMime) { |
|
133 | + switch ($strFileMime) { |
|
134 | 134 | case 'application/json': |
135 | 135 | $arrayError = $this->getArrayFromJsonFile($strFile->getPath(), $strFile->getFilename()); |
136 | 136 | $arrayToReturn = $this->setStandardizedFeedbackArray([ |
@@ -267,9 +267,9 @@ discard block |
||
267 | 267 | $appR = new \danielgp\efactura\ClassElectronicInvoiceRead(); |
268 | 268 | $objFile = $appR->readElectronicXmlHeader($arrayData['strInvoiceContent']); |
269 | 269 | $documentHeaderTag = $appR->getDocumentRoot($objFile); |
270 | - switch($documentHeaderTag['DocumentTagName']) { |
|
270 | + switch ($documentHeaderTag['DocumentTagName']) { |
|
271 | 271 | case 'header': |
272 | - switch($documentHeaderTag['DocumentNameSpaces']['']) { |
|
272 | + switch ($documentHeaderTag['DocumentNameSpaces']['']) { |
|
273 | 273 | case 'mfp:anaf:dgti:efactura:mesajEroriFactuta:v1': |
274 | 274 | $arrayTemp = $this->setErrorsFromExtendedMarkupLaguage($arrayData, $strErrorTag); |
275 | 275 | $arrayToReturn = array_merge($arrayToReturn, $arrayTemp); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | use \danielgp\efactura\TraitBasic; |
25 | 25 | |
26 | - private array $arraystandardMesageFilters = [ |
|
26 | + private array $arraystandardMesageFilters = [ |
|
27 | 27 | [ |
28 | 28 | 'Code' => 'E', |
29 | 29 | 'Detail' => 'raspuns cu erorile si semnatura MF, livrat in urma transmiterii unei facturi' |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $strRelevantUrl, |
232 | 232 | ])); |
233 | 233 | // sent XML content using CURL and capture feedback |
234 | - $arrayFeedback = $this->getContentFromUrlThroughCurl($strRelevantUrl, [ |
|
234 | + $arrayFeedback = $this->getContentFromUrlThroughCurl($strRelevantUrl, [ |
|
235 | 235 | 'HttpHeader' => $this->buildHeaderAsArray(), |
236 | 236 | ]); |
237 | 237 | if ($arrayFeedback['errNo'] === 0) { |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | 'Empty Environment' => $this->arraySolutionCustomSettings['StringElectronicInvoiceEnvironment'], |
311 | 311 | 'Non-Standard Environment Value' => $this->arraySolutionCustomSettings['StringElectronicInvoiceEnvironment'], |
312 | 312 | ]; |
313 | - $arrayValidations = $arrayUniversalValidations; |
|
313 | + $arrayValidations = $arrayUniversalValidations; |
|
314 | 314 | if ($arrayAdditionalValidations != []) { |
315 | 315 | $arrayValidations = array_merge($arrayValidations, $arrayAdditionalValidations); |
316 | 316 | } |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | 'Mandatory' => ['LoadingId'], |
333 | 333 | ], |
334 | 334 | }; |
335 | - $arrayAllowedCombined = $arrayAllowedParameters['Mandatory']; |
|
335 | + $arrayAllowedCombined = $arrayAllowedParameters['Mandatory']; |
|
336 | 336 | if (array_key_exists('Optional', $arrayAllowedParameters)) { |
337 | 337 | $arrayAllowedCombined = array_merge($arrayAllowedParameters['Mandatory'], $arrayAllowedParameters['Optional']); |
338 | 338 | } |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | 'LoadingId' => '1-' . strval(9 * pow(10, 10)), |
361 | 361 | 'Page' => '0-' . strval(9 * pow(10, 6)), |
362 | 362 | }); |
363 | - $regs = null; |
|
363 | + $regs = null; |
|
364 | 364 | preg_match('/[0-9]{1,20}/', $strParameterValue, $regs, PREG_UNMATCHED_AS_NULL); |
365 | 365 | if (is_array($regs) && ($regs !== []) && ($regs[0] != $strParameterValue)) { |
366 | 366 | $strErrors[] = vsprintf('Parameter "%s" is expected to be of integer type' |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | 'File base name end with', |
438 | 438 | 'File base name starts with', |
439 | 439 | ]; |
440 | - $strLabel = ''; |
|
440 | + $strLabel = ''; |
|
441 | 441 | foreach ($arrayKnownLabels as $strCurrentLabel) { |
442 | 442 | $arrayPieces = explode('|', $this->arraySolutionCustomSettings['ArrayStrategyForUpload'][$strCurrentLabel]); |
443 | 443 | switch ($arrayPieces[0]) { |