@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Adelarcubs\OFXParser; |
4 | 4 | |
5 | 5 | use SimpleXMLElement; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Adelarcubs\OFXParser; |
4 | 4 | |
5 | 5 | use DateTime; |
@@ -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; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | if (file_exists($ofx)) { |
23 | 23 | $ofx = file_get_contents($ofx); |
24 | 24 | } |
25 | - if (! $parser) { |
|
25 | + if (!$parser) { |
|
26 | 26 | $parser = new BaseParser(); |
27 | 27 | } |
28 | 28 | return OfxParser::loadFromString($ofx, $parser); |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | libxml_use_internal_errors(true); |
37 | 37 | $xml = simplexml_load_string($xml); |
38 | 38 | $errors = libxml_get_errors(); |
39 | - if (! empty($errors)) { |
|
40 | - throw new \Exception('Failed to parse OFX: ' . var_export($errors, true)); |
|
39 | + if (!empty($errors)) { |
|
40 | + throw new \Exception('Failed to parse OFX: '.var_export($errors, true)); |
|
41 | 41 | } |
42 | 42 | return new Ofx($xml, $parser); |
43 | 43 | } |
@@ -54,19 +54,19 @@ discard block |
||
54 | 54 | $pos = strpos($read, '>'); |
55 | 55 | $tag = substr($read, 1, $pos); |
56 | 56 | $value = trim(substr($read, $pos + 1)); |
57 | - $line = '<' . $tag; |
|
57 | + $line = '<'.$tag; |
|
58 | 58 | if ($value != '') { |
59 | 59 | $line .= $value; |
60 | - if (strpos($value, '</' . $tag) === false) { |
|
61 | - $lastClosedTag = '/' . $tag; |
|
62 | - $line .= '<' . $lastClosedTag; |
|
60 | + if (strpos($value, '</'.$tag) === false) { |
|
61 | + $lastClosedTag = '/'.$tag; |
|
62 | + $line .= '<'.$lastClosedTag; |
|
63 | 63 | } |
64 | 64 | } else { |
65 | 65 | if ($lastClosedTag == $tag) { |
66 | 66 | $line = ''; |
67 | 67 | } |
68 | 68 | } |
69 | - $xml .= $line . "\n"; |
|
69 | + $xml .= $line."\n"; |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | return $xml; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Adelarcubs\OFXParser\Parser; |
4 | 4 | |
5 | 5 | use Adelarcubs\OFXParser\AbstractParser; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Adelarcubs\OFXParser; |
4 | 4 | |
5 | 5 | use JsonSerializable; |