@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function itau() |
31 | 31 | { |
32 | - $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/extrato_itau.ofx'); |
|
32 | + $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/extrato_itau.ofx'); |
|
33 | 33 | $this->assertInstanceOf(Ofx::class, $ofx); |
34 | 34 | $this->assertInternalType('array', $ofx->jsonSerialize()); |
35 | 35 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function santander() |
43 | 43 | { |
44 | - $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/extrato_santander.ofx'); |
|
44 | + $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/extrato_santander.ofx'); |
|
45 | 45 | $this->assertInstanceOf(Ofx::class, $ofx); |
46 | 46 | $this->assertInternalType('array', $ofx->jsonSerialize()); |
47 | 47 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function caixa() |
55 | 55 | { |
56 | - $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/extrato_caixa.ofx'); |
|
56 | + $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/extrato_caixa.ofx'); |
|
57 | 57 | $this->assertInstanceOf(Ofx::class, $ofx); |
58 | 58 | $this->assertInternalType('array', $ofx->jsonSerialize()); |
59 | 59 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function faturaCC() |
67 | 67 | { |
68 | - $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/fatura_cc_1.ofx'); |
|
68 | + $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/fatura_cc_1.ofx'); |
|
69 | 69 | $this->assertInstanceOf(Ofx::class, $ofx); |
70 | 70 | $this->assertInternalType('array', $ofx->jsonSerialize()); |
71 | 71 |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | libxml_use_internal_errors(true); |
31 | 31 | $xml = simplexml_load_string($xml); |
32 | 32 | $errors = libxml_get_errors(); |
33 | - if (! empty($errors)) { |
|
34 | - throw new \Exception('Failed to parse OFX: ' . var_export($errors, true)); |
|
33 | + if (!empty($errors)) { |
|
34 | + throw new \Exception('Failed to parse OFX: '.var_export($errors, true)); |
|
35 | 35 | } |
36 | 36 | return new Ofx($xml); |
37 | 37 | } |
@@ -48,19 +48,19 @@ discard block |
||
48 | 48 | $pos = strpos($read, '>'); |
49 | 49 | $tag = substr($read, 1, $pos); |
50 | 50 | $value = trim(substr($read, $pos + 1)); |
51 | - $line = '<' . $tag; |
|
51 | + $line = '<'.$tag; |
|
52 | 52 | if ($value != '') { |
53 | 53 | $line .= $value; |
54 | - if (strpos($value, '</' . $tag) === false) { |
|
55 | - $lastClosedTag = '/' . $tag; |
|
56 | - $line .= '<' . $lastClosedTag; |
|
54 | + if (strpos($value, '</'.$tag) === false) { |
|
55 | + $lastClosedTag = '/'.$tag; |
|
56 | + $line .= '<'.$lastClosedTag; |
|
57 | 57 | } |
58 | 58 | } else { |
59 | 59 | if ($lastClosedTag == $tag) { |
60 | 60 | $line = ''; |
61 | 61 | } |
62 | 62 | } |
63 | - $xml .= $line . "\n"; |
|
63 | + $xml .= $line."\n"; |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | return $xml; |