Completed
Push — master ( 83472f...6fbcb0 )
by Adelar
02:23
created
src/AbstractParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace Adelarcubs\OFXParser;
4 4
 
5 5
 use SimpleXMLElement;
Please login to merge, or discard this patch.
src/OfxMovement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace Adelarcubs\OFXParser;
4 4
 
5 5
 use DateTime;
Please login to merge, or discard this patch.
src/OfxParser.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Parser/BaseParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Ofx.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace Adelarcubs\OFXParser;
4 4
 
5 5
 use JsonSerializable;
Please login to merge, or discard this patch.