@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | { |
| 120 | 120 | $arrayToReturn = []; |
| 121 | 121 | $strFileMime = mime_content_type($strFile->getRealPath()); |
| 122 | - switch($strFileMime) { |
|
| 122 | + switch ($strFileMime) { |
|
| 123 | 123 | case 'application/json': |
| 124 | 124 | $arrayError = $this->getArrayFromJsonFile($strFile->getPath(), $strFile->getFilename()); |
| 125 | 125 | $arrayToReturn = $this->setStandardizedFeedbackArray([ |
@@ -256,9 +256,9 @@ discard block |
||
| 256 | 256 | $appR = new \danielgp\efactura\ClassElectronicInvoiceRead(); |
| 257 | 257 | $objFile = $appR->readElectronicXmlHeader($arrayData['strInvoiceContent']); |
| 258 | 258 | $documentHeaderTag = $appR->getDocumentRoot($objFile); |
| 259 | - switch($documentHeaderTag['DocumentTagName']) { |
|
| 259 | + switch ($documentHeaderTag['DocumentTagName']) { |
|
| 260 | 260 | case 'header': |
| 261 | - switch($documentHeaderTag['DocumentNameSpaces']['']) { |
|
| 261 | + switch ($documentHeaderTag['DocumentNameSpaces']['']) { |
|
| 262 | 262 | case 'mfp:anaf:dgti:efactura:mesajEroriFactuta:v1': |
| 263 | 263 | $arrayTemp = $this->setErrorsFromExtendedMarkupLaguage($arrayData, $strErrorTag); |
| 264 | 264 | $arrayToReturn = array_merge($arrayToReturn, $arrayTemp); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $arrayOutput = []; |
| 41 | 41 | foreach ($this->arrayProcessing['Lines@Read'] as $strElement => $strType) { |
| 42 | - switch($strType) { |
|
| 42 | + switch ($strType) { |
|
| 43 | 43 | case 'Item': |
| 44 | 44 | $arrayOutput[$strElement] = $this->getLineItem($child->children($this->arrayProcessing['mapping']['cac'], true)->$strElement); |
| 45 | 45 | break; |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | $arrayOutput = []; |
| 67 | 67 | foreach ($this->arrayProcessing['Lines_Item@Read'] as $key => $value) { |
| 68 | - switch($value) { |
|
| 68 | + switch ($value) { |
|
| 69 | 69 | case 'Multiple': |
| 70 | 70 | if (isset($child3->children($this->arrayProcessing['mapping']['cac'], true)->$key)) { |
| 71 | 71 | $arrayOutput[$key] = $this->getMultipleElementsByKey($child3->children($this->arrayProcessing['mapping']['cac'], true)->$key); |
@@ -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,7 +338,7 @@ 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 | } |
@@ -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 | $strErrors[] = vsprintf('Parameter "%s" is expected to be of integer type' |
@@ -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; |