@@ -30,8 +30,8 @@ discard block |
||
| 30 | 30 | libxml_use_internal_errors(true); |
| 31 | 31 | $xml = simplexml_load_string($xml); |
| 32 | 32 | $errors = libxml_get_errors(); |
| 33 | - if (! empty($errors)) { |
|
| 34 | - throw new \Exception('Failed to parse OFX: ' . var_export($errors, true)); |
|
| 33 | + if (!empty($errors)) { |
|
| 34 | + throw new \Exception('Failed to parse OFX: '.var_export($errors, true)); |
|
| 35 | 35 | } |
| 36 | 36 | return new Ofx($xml); |
| 37 | 37 | } |
@@ -48,19 +48,19 @@ discard block |
||
| 48 | 48 | $pos = strpos($read, '>'); |
| 49 | 49 | $tag = substr($read, 1, $pos); |
| 50 | 50 | $value = trim(substr($read, $pos + 1)); |
| 51 | - $line = '<' . $tag; |
|
| 51 | + $line = '<'.$tag; |
|
| 52 | 52 | if ($value != '') { |
| 53 | 53 | $line .= $value; |
| 54 | - if (strpos($value, '</' . $tag) === false) { |
|
| 55 | - $lastClosedTag = '/' . $tag; |
|
| 56 | - $line .= '<' . $lastClosedTag; |
|
| 54 | + if (strpos($value, '</'.$tag) === false) { |
|
| 55 | + $lastClosedTag = '/'.$tag; |
|
| 56 | + $line .= '<'.$lastClosedTag; |
|
| 57 | 57 | } |
| 58 | 58 | } else { |
| 59 | 59 | if ($lastClosedTag == $tag) { |
| 60 | 60 | $line = ''; |
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | - $xml .= $line . "\n"; |
|
| 63 | + $xml .= $line."\n"; |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | return $xml; |