@@ -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 | } |