@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | use \danielgp\io_operations\InputOutputCurl; |
25 | 25 | use \danielgp\efactura\TraitBasic; |
26 | 26 | |
27 | - private array $arraystandardMesageFilters = [ |
|
27 | + private array $arraystandardMesageFilters = [ |
|
28 | 28 | [ |
29 | 29 | 'Code' => 'E', |
30 | 30 | 'Detail' => 'raspuns cu erorile si semnatura MF, livrat in urma transmiterii unei facturi' |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | $arrayErrorMessages = []; |
106 | 106 | foreach ($arrayAssignedChecks as $strLabelCheck => $elementChecked) { |
107 | - switch($strLabelCheck) { |
|
107 | + switch ($strLabelCheck) { |
|
108 | 108 | case 'Empty Environment': |
109 | 109 | if ($elementChecked == '') { |
110 | 110 | $arrayErrorMessages[] = 'Environment is NOT allowed to be empty' |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $strContentBranch = ''; |
211 | 211 | $arrayFinalParameterValues = []; |
212 | 212 | $strFilter = ''; |
213 | - switch($strType) { |
|
213 | + switch ($strType) { |
|
214 | 214 | case 'ListAll': |
215 | 215 | $strContentBranch = 'ListAllMessages'; |
216 | 216 | $arrayFinalParameterValues[] = $arrayParameters['Days']; |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $strRelevantUrl, |
238 | 238 | ])); |
239 | 239 | // sent XML content using CURL and capture feedback |
240 | - $arrayFeedback = $this->getContentFromUrlThroughCurl($strRelevantUrl, [ |
|
240 | + $arrayFeedback = $this->getContentFromUrlThroughCurl($strRelevantUrl, [ |
|
241 | 241 | 'HttpHeader' => $this->buildHeaderAsArray(), |
242 | 242 | ]); |
243 | 243 | if ($arrayFeedback['errNo'] === 0) { |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | 'Empty Environment' => $this->arraySolutionCustomSettings['StringElectronicInvoiceEnvironment'], |
317 | 317 | 'Non-Standard Environment Value' => $this->arraySolutionCustomSettings['StringElectronicInvoiceEnvironment'], |
318 | 318 | ]; |
319 | - $arrayValidations = $arrayUniversalValidations; |
|
319 | + $arrayValidations = $arrayUniversalValidations; |
|
320 | 320 | if ($arrayAdditionalValidations != []) { |
321 | 321 | $arrayValidations = array_merge($arrayValidations, $arrayAdditionalValidations); |
322 | 322 | } |
@@ -338,12 +338,12 @@ discard block |
||
338 | 338 | 'Mandatory' => ['LoadingId'], |
339 | 339 | ], |
340 | 340 | }; |
341 | - $arrayAllowedCombined = $arrayAllowedParameters['Mandatory']; |
|
341 | + $arrayAllowedCombined = $arrayAllowedParameters['Mandatory']; |
|
342 | 342 | if (array_key_exists('Optional', $arrayAllowedParameters)) { |
343 | 343 | $arrayAllowedCombined = array_merge($arrayAllowedParameters['Mandatory'], $arrayAllowedParameters['Optional']); |
344 | 344 | } |
345 | 345 | $arrayGivenKeys = array_keys($arrayParameters); |
346 | - $arrayErrors = []; |
|
346 | + $arrayErrors = []; |
|
347 | 347 | if (array_diff($arrayAllowedParameters['Mandatory'], $arrayGivenKeys) != []) { |
348 | 348 | $arrayErrors[] = vsprintf('Provided parameters %s does contain all mandatory ones: %s...', [ |
349 | 349 | json_encode($arrayGivenKeys), |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | } else { |
358 | 358 | // here we have to validate actual value passed as parameters |
359 | 359 | foreach ($arrayParameters as $strParameterKey => $strParameterValue) { |
360 | - switch($strParameterKey) { |
|
360 | + switch ($strParameterKey) { |
|
361 | 361 | case 'Days': |
362 | 362 | case 'LoadingId': |
363 | 363 | case 'Page': |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | 'LoadingId' => '1-' . strval(9 * pow(10, 10)), |
367 | 367 | 'Page' => '0-' . strval(9 * pow(10, 6)), |
368 | 368 | }); |
369 | - $regs = null; |
|
369 | + $regs = null; |
|
370 | 370 | preg_match('/[0-9]{1,20}/', $strParameterValue, $regs, PREG_UNMATCHED_AS_NULL); |
371 | 371 | if (is_array($regs) && ($regs !== []) && ($regs[0] != $strParameterValue)) { |
372 | 372 | $arrayErrors[] = vsprintf('Parameter "%s" is expected to be of integer type' |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | . '|' . strval((new \DateTime('now', new \DateTimeZone('UTC')))->format('U') * 1000)); |
401 | 401 | $arrayRangeAllowedPiecesForHumans = explode('|', (\DateTime::createFromFormat('U', intval(($arrayRangeAllowedPieces[0] / 1000)), new \DateTimeZone('UTC')))->format('Y-m-d H:i:s') |
402 | 402 | . '|' . (\DateTime::createFromFormat('U', intval(($arrayRangeAllowedPieces[1] / 1000)), new \DateTimeZone('UTC')))->format('Y-m-d H:i:s')); |
403 | - $arrayErrors = []; |
|
403 | + $arrayErrors = []; |
|
404 | 404 | if (is_integer($strParameterValue) && (($strParameterValue < $arrayRangeAllowedPieces[0]) || ($strParameterValue > $arrayRangeAllowedPieces[1]))) { |
405 | 405 | $arrayErrors[] = vsprintf('Parameter "%s" is given as an integer value %s (which translate in %s) ' |
406 | 406 | . ' but that is NOT within allowed range, which is between %s and %s...', [ |
@@ -443,10 +443,10 @@ discard block |
||
443 | 443 | 'File base name end with', |
444 | 444 | 'File base name starts with', |
445 | 445 | ]; |
446 | - $strLabel = ''; |
|
446 | + $strLabel = ''; |
|
447 | 447 | foreach ($arrayKnownLabels as $strCurrentLabel) { |
448 | 448 | $arrayPieces = explode('|', $this->arraySolutionCustomSettings['ArrayStrategyForUpload'][$strCurrentLabel]); |
449 | - switch($arrayPieces[0]) { |
|
449 | + switch ($arrayPieces[0]) { |
|
450 | 450 | case 'File base name end with': |
451 | 451 | if (str_ends_with($strFileName, $arrayPieces[1])) { |
452 | 452 | $strLabel = $strCurrentLabel; |