@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function __construct(array $data, $type) { |
25 | 25 | $this->data = $data; |
26 | 26 | $this->type = $type; |
27 | - if(is_array($type)){ |
|
27 | + if (is_array($type)) { |
|
28 | 28 | $this->validations = $type; |
29 | 29 | } |
30 | 30 | $this->validate(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | private function validate() { |
42 | - if(!$this->validations){ |
|
42 | + if (!$this->validations) { |
|
43 | 43 | $this->validations = $this->getValidations(); |
44 | 44 | } |
45 | 45 | foreach ($this->validations as $field => $item) { |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $this->documentNumber = str_pad($rawData['documentNumber'], 5, '0', STR_PAD_LEFT); |
38 | 38 | $this->issueDate = new DateTime($parsedData['issueDate']); |
39 | 39 | $this->referenceDate = new DateTime($parsedData['referenceDate']); |
40 | - $this->documentId = $this->documentType.'-' . $this->issueDate->format('Ymd') . '-' . $this->documentNumber; |
|
40 | + $this->documentId = $this->documentType . '-' . $this->issueDate->format('Ymd') . '-' . $this->documentNumber; |
|
41 | 41 | $this->documentFileName = Company::getRUC() . '-' . $this->documentId; |
42 | 42 | $this->rawData = $rawData; |
43 | 43 | $this->parsedData = $parsedData; |
@@ -88,7 +88,7 @@ |
||
88 | 88 | $this->documentId = $this->documentSeries . '-' . $this->documentNumber; |
89 | 89 | $this->issueDate = new DateTime($data['issueDate']); |
90 | 90 | if (isset($data['dueDate'])) { |
91 | - $this->dueDate = new DateTime($data['dueDate']); |
|
91 | + $this->dueDate = new DateTime($data['dueDate']); |
|
92 | 92 | } |
93 | 93 | $this->customerDocType = $data['customerDocType']; |
94 | 94 | $this->customerDocNumber = $data['customerDocNumber']; |