@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function itau() |
| 34 | 34 | { |
| 35 | - $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/extrato_itau.ofx'); |
|
| 35 | + $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/extrato_itau.ofx'); |
|
| 36 | 36 | $this->assertInstanceOf(Ofx::class, $ofx); |
| 37 | 37 | // $this->assertIsString($ofx->jsonSerialize()); |
| 38 | 38 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function santander() |
| 47 | 47 | { |
| 48 | - $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/extrato_santander.ofx'); |
|
| 48 | + $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/extrato_santander.ofx'); |
|
| 49 | 49 | $this->assertInstanceOf(Ofx::class, $ofx); |
| 50 | 50 | // $this->assertInternalType('array', $ofx->jsonSerialize()); |
| 51 | 51 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function caixa() |
| 60 | 60 | { |
| 61 | - $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/extrato_caixa.ofx'); |
|
| 61 | + $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/extrato_caixa.ofx'); |
|
| 62 | 62 | $this->assertInstanceOf(Ofx::class, $ofx); |
| 63 | 63 | // $this->assertInternalType('array', $ofx->jsonSerialize()); |
| 64 | 64 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function faturaCC() |
| 73 | 73 | { |
| 74 | - $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/fatura_cc_1.ofx'); |
|
| 74 | + $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/fatura_cc_1.ofx'); |
|
| 75 | 75 | $this->assertInstanceOf(Ofx::class, $ofx); |
| 76 | 76 | // $this->assertInternalType('array', $ofx->jsonSerialize()); |
| 77 | 77 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function itauIso() |
| 86 | 86 | { |
| 87 | - $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/extrato_itau_iso.ofx'); |
|
| 87 | + $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/extrato_itau_iso.ofx'); |
|
| 88 | 88 | $this->assertInstanceOf(Ofx::class, $ofx); |
| 89 | 89 | // $this->assertInternalType('array', $ofx->jsonSerialize()); |
| 90 | 90 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | namespace Adelarcubs\OFXParser\Exception; |
| 4 | 4 | |
| 5 | 5 | use Exception; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | namespace Adelarcubs\OFXParser; |
| 4 | 4 | |
| 5 | 5 | use Adelarcubs\OFXParser\Parser\BaseParser; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | if (file_exists($ofx)) { |
| 24 | 24 | $ofx = file_get_contents($ofx); |
| 25 | 25 | } |
| 26 | - if (! $parser) { |
|
| 26 | + if (!$parser) { |
|
| 27 | 27 | $parser = new BaseParser(); |
| 28 | 28 | } |
| 29 | 29 | return OfxParser::loadFromString($ofx, $parser); |
@@ -37,8 +37,8 @@ discard block |
||
| 37 | 37 | libxml_use_internal_errors(true); |
| 38 | 38 | $xml = simplexml_load_string($xml); |
| 39 | 39 | $errors = libxml_get_errors(); |
| 40 | - if (! empty($errors)) { |
|
| 41 | - throw new OfxParseException('Failed to parse OFX: ' . var_export($errors, true)); |
|
| 40 | + if (!empty($errors)) { |
|
| 41 | + throw new OfxParseException('Failed to parse OFX: '.var_export($errors, true)); |
|
| 42 | 42 | } |
| 43 | 43 | return new Ofx($xml, $parser); |
| 44 | 44 | } |
@@ -55,19 +55,19 @@ discard block |
||
| 55 | 55 | $pos = strpos($read, '>'); |
| 56 | 56 | $tag = substr($read, 1, $pos); |
| 57 | 57 | $value = trim(substr($read, $pos + 1)); |
| 58 | - $line = '<' . $tag; |
|
| 58 | + $line = '<'.$tag; |
|
| 59 | 59 | if ($value != '') { |
| 60 | 60 | $line .= $value; |
| 61 | - if (strpos($value, '</' . $tag) === false) { |
|
| 62 | - $lastClosedTag = '/' . $tag; |
|
| 63 | - $line .= '<' . $lastClosedTag; |
|
| 61 | + if (strpos($value, '</'.$tag) === false) { |
|
| 62 | + $lastClosedTag = '/'.$tag; |
|
| 63 | + $line .= '<'.$lastClosedTag; |
|
| 64 | 64 | } |
| 65 | 65 | } else { |
| 66 | 66 | if ($lastClosedTag == $tag) { |
| 67 | 67 | $line = ''; |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | - $xml .= $line . "\n"; |
|
| 70 | + $xml .= $line."\n"; |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | return $xml; |