Passed
Push — master ( 1d76e5...f8f36d )
by Adelar
02:15
created
src/OfxParser.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
         libxml_use_internal_errors(true);
30 30
         $xml = simplexml_load_string($xml);
31 31
         $errors = libxml_get_errors();
32
-        if (! empty($errors)) {
33
-            throw new \Exception("Failed to parse OFX: " . var_export($errors, true));
32
+        if (!empty($errors)) {
33
+            throw new \Exception("Failed to parse OFX: ".var_export($errors, true));
34 34
         }
35 35
         return new Ofx($xml);
36 36
     }
@@ -47,19 +47,19 @@  discard block
 block discarded – undo
47 47
                 $pos = strpos($read, ">");
48 48
                 $tag = substr($read, 1, $pos);
49 49
                 $value = trim(substr($read, $pos + 1));
50
-                $line = '<' . $tag;
50
+                $line = '<'.$tag;
51 51
                 if ($value != '') {
52 52
                     $line .= $value;
53
-                    if (strpos($value, '</' . $tag) === false) {
54
-                        $lastClosedTag = '/' . $tag;
55
-                        $line .= '<' . $lastClosedTag;
53
+                    if (strpos($value, '</'.$tag) === false) {
54
+                        $lastClosedTag = '/'.$tag;
55
+                        $line .= '<'.$lastClosedTag;
56 56
                     }
57 57
                 } else {
58 58
                     if ($lastClosedTag == $tag) {
59 59
                         $line = '';
60 60
                     }
61 61
                 }
62
-                $xml .= $line . "\n";
62
+                $xml .= $line."\n";
63 63
             }
64 64
         }
65 65
         return $xml;
Please login to merge, or discard this patch.
tests/OfxParseTest.php 1 patch
Spacing   +4 added lines, -4 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
         $this->assertInternalType('array', $ofx->jsonSerialize());
35 35
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.