@@ -225,7 +225,7 @@ |
||
225 | 225 | |
226 | 226 | protected function serializeVatInclusivePricing() |
227 | 227 | { |
228 | - $flag =$this->getVatInclusivePricingFlag(); |
|
228 | + $flag = $this->getVatInclusivePricingFlag(); |
|
229 | 229 | if ($flag === true || $flag === false) { |
230 | 230 | $flag = $this->convertBooleanToString($flag); |
231 | 231 | return "<VATInclusivePricing>$flag</VATInclusivePricing>"; |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | $this->optionalExtractionPaths = array_merge( |
52 | 52 | $this->optionalExtractionPaths, |
53 | - ['calculationError' => 'x:CalculationError'] |
|
53 | + [ 'calculationError' => 'x:CalculationError' ] |
|
54 | 54 | ); |
55 | 55 | } |
56 | 56 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | $this->optionalExtractionPaths = array_merge( |
47 | 47 | $this->optionalExtractionPaths, |
48 | - ['unitPrice' => 'x:UnitPrice'] |
|
48 | + [ 'unitPrice' => 'x:UnitPrice' ] |
|
49 | 49 | ); |
50 | 50 | } |
51 | 51 |
@@ -45,10 +45,10 @@ |
||
45 | 45 | */ |
46 | 46 | public function validate(Payload\IPayload $payload) |
47 | 47 | { |
48 | - $invalidDataAccessors = []; |
|
48 | + $invalidDataAccessors = [ ]; |
|
49 | 49 | foreach ($this->requiredDataAccessors as $method) { |
50 | 50 | if (is_null($payload->$method())) { |
51 | - $invalidDataAccessors[] = $method; |
|
51 | + $invalidDataAccessors[ ] = $method; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | if ($invalidDataAccessors) { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | /** |
28 | 28 | * @param string[] Accessor methods to get subpayloads of the payload being validated |
29 | 29 | */ |
30 | - public function __construct(array $subpayloadAccessors = []) |
|
30 | + public function __construct(array $subpayloadAccessors = [ ]) |
|
31 | 31 | { |
32 | 32 | $this->subpayloadAccessors = $subpayloadAccessors; |
33 | 33 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | libxml_use_internal_errors(false); |
39 | 39 | if ($errors) { |
40 | 40 | $messages = implode(', ', array_filter(array_map( |
41 | - function ($libxmlError) { |
|
41 | + function($libxmlError) { |
|
42 | 42 | return trim($libxmlError->message); |
43 | 43 | }, |
44 | 44 | $errors |
@@ -91,10 +91,10 @@ |
||
91 | 91 | * @param \libXMLError[] $libxmlErrors |
92 | 92 | * @return string |
93 | 93 | */ |
94 | - protected function formatErrors(array $libxmlErrors = []) |
|
94 | + protected function formatErrors(array $libxmlErrors = [ ]) |
|
95 | 95 | { |
96 | 96 | return 'XSD validation failed with following messages:' . PHP_EOL . implode('', array_map( |
97 | - function (\libXMLError $xmlError) { |
|
97 | + function(\libXMLError $xmlError) { |
|
98 | 98 | return sprintf( |
99 | 99 | '[%s:%d] %s', |
100 | 100 | $xmlError->file, |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | class ValidatorIterator implements IValidatorIterator |
23 | 23 | { |
24 | 24 | /** @var IValidator[] */ |
25 | - protected $validators = []; |
|
25 | + protected $validators = [ ]; |
|
26 | 26 | /** @var int */ |
27 | 27 | protected $offset = 0; |
28 | 28 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | protected function add(IValidator $validator) |
50 | 50 | { |
51 | - $this->validators[] = $validator; |
|
51 | + $this->validators[ ] = $validator; |
|
52 | 52 | return $this; |
53 | 53 | } |
54 | 54 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function current() |
60 | 60 | { |
61 | - return $this->validators[$this->offset]; |
|
61 | + return $this->validators[ $this->offset ]; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->schemaValidator = $schemaValidator; |
52 | 52 | $this->parentPayload = $parentPayload; |
53 | 53 | $this->payloadMap = $payloadMap; |
54 | - $this->payloadFactory = new PayloadFactory(); |
|
54 | + $this->payloadFactory = new PayloadFactory(); |
|
55 | 55 | $this->setOrderSummaries($this->buildPayloadForInterface( |
56 | 56 | static::ORDER_SUMMARY_ITERABLE_INTERFACE |
57 | 57 | )); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | protected function getRootAttributes() |
121 | 121 | { |
122 | - return ['xmlns' => $this->getXmlNamespace()]; |
|
122 | + return [ 'xmlns' => $this->getXmlNamespace() ]; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |