@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | libxml_use_internal_errors(true); |
32 | 32 | $xml = simplexml_load_string($xml); |
33 | 33 | $errors = libxml_get_errors(); |
34 | - if (! empty($errors)) { |
|
35 | - throw new \Exception("Failed to parse OFX: " . var_export($errors, true)); |
|
34 | + if (!empty($errors)) { |
|
35 | + throw new \Exception("Failed to parse OFX: ".var_export($errors, true)); |
|
36 | 36 | } |
37 | 37 | $this->ofx = new Ofx($xml); |
38 | 38 | return $this->ofx; |
@@ -50,19 +50,19 @@ discard block |
||
50 | 50 | $pos = strpos($read, ">"); |
51 | 51 | $tag = substr($read, 1, $pos); |
52 | 52 | $value = trim(substr($read, $pos + 1)); |
53 | - $line = '<' . $tag; |
|
53 | + $line = '<'.$tag; |
|
54 | 54 | if ($value != '') { |
55 | 55 | $line .= $value; |
56 | - if (strpos($value, '</' . $tag) === false) { |
|
57 | - $lastClosedTag = '/' . $tag; |
|
58 | - $line .= '<' . $lastClosedTag; |
|
56 | + if (strpos($value, '</'.$tag) === false) { |
|
57 | + $lastClosedTag = '/'.$tag; |
|
58 | + $line .= '<'.$lastClosedTag; |
|
59 | 59 | } |
60 | 60 | } else { |
61 | 61 | if ($lastClosedTag == $tag) { |
62 | 62 | $line = ''; |
63 | 63 | } |
64 | 64 | } |
65 | - $xml .= $line . "\n"; |
|
65 | + $xml .= $line."\n"; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | return $xml; |
@@ -39,16 +39,16 @@ |
||
39 | 39 | { |
40 | 40 | return [ |
41 | 41 | [ |
42 | - __DIR__ . '/fixtures/data.ofx' |
|
42 | + __DIR__.'/fixtures/data.ofx' |
|
43 | 43 | ], |
44 | 44 | [ |
45 | - __DIR__ . '/fixtures/data2.ofx' |
|
45 | + __DIR__.'/fixtures/data2.ofx' |
|
46 | 46 | ], |
47 | 47 | [ |
48 | - __DIR__ . '/fixtures/caixa_julho.ofx' |
|
48 | + __DIR__.'/fixtures/caixa_julho.ofx' |
|
49 | 49 | ], |
50 | 50 | [ |
51 | - __DIR__ . '/fixtures/extrato_itau_maio.ofx' |
|
51 | + __DIR__.'/fixtures/extrato_itau_maio.ofx' |
|
52 | 52 | ] |
53 | 53 | ]; |
54 | 54 | } |
@@ -17,6 +17,6 @@ |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | public function getDescription(){ |
20 | - return $this->description; |
|
20 | + return $this->description; |
|
21 | 21 | } |
22 | 22 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | $this->description = $xml->MEMO; |
17 | 17 | } |
18 | 18 | |
19 | - public function getDescription(){ |
|
19 | + public function getDescription() { |
|
20 | 20 | return $this->description; |
21 | 21 | } |
22 | 22 | } |
@@ -21,12 +21,12 @@ |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | public function getMovements(){ |
24 | - return $this->movements; |
|
24 | + return $this->movements; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | private function exportMovements(SimpleXMLElement $xml){ |
28 | - foreach ($xml as $value) { |
|
29 | - $this->movements[] = new OfxMovement($value); |
|
30 | - } |
|
28 | + foreach ($xml as $value) { |
|
29 | + $this->movements[] = new OfxMovement($value); |
|
30 | + } |
|
31 | 31 | } |
32 | 32 | } |
@@ -20,11 +20,11 @@ |
||
20 | 20 | $this->exportMovements($xml->BANKMSGSRSV1->STMTTRNRS->STMTRS->BANKTRANLIST->STMTTRN); |
21 | 21 | } |
22 | 22 | |
23 | - public function getMovements(){ |
|
23 | + public function getMovements() { |
|
24 | 24 | return $this->movements; |
25 | 25 | } |
26 | 26 | |
27 | - private function exportMovements(SimpleXMLElement $xml){ |
|
27 | + private function exportMovements(SimpleXMLElement $xml) { |
|
28 | 28 | foreach ($xml as $value) { |
29 | 29 | $this->movements[] = new OfxMovement($value); |
30 | 30 | } |