Completed
Push — master ( 046d7f...f5773e )
by Adelar
02:28
created
src/OfxParser.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
tests/OfxParseTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
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
 
35 35
         $this->assertContainsOnlyInstancesOf(OfxMovement::class, $ofx->getMovements());
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function santander()
42 42
     {
43
-        $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/extrato_santander.ofx');
43
+        $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/extrato_santander.ofx');
44 44
         $this->assertInstanceOf(Ofx::class, $ofx);
45 45
 
46 46
         $this->assertContainsOnlyInstancesOf(OfxMovement::class, $ofx->getMovements());
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function caixa()
53 53
     {
54
-        $ofx = OfxParser::loadOfx(__DIR__ . '/fixtures/extrato_caixa.ofx');
54
+        $ofx = OfxParser::loadOfx(__DIR__.'/fixtures/extrato_caixa.ofx');
55 55
         $this->assertInstanceOf(Ofx::class, $ofx);
56 56
 
57 57
         $this->assertContainsOnlyInstancesOf(OfxMovement::class, $ofx->getMovements());
Please login to merge, or discard this patch.