| Total Complexity | 7 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Parser |
||
| 10 | { |
||
| 11 | public $arr; |
||
| 12 | private $data; |
||
| 13 | |||
| 14 | public function __construct() |
||
| 15 | { |
||
| 16 | $this->arr = new ArrayStore(); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function prepareLines($input) |
||
| 22 | } |
||
| 23 | |||
| 24 | public function explodeLines($data) |
||
| 25 | { |
||
| 26 | $this->data = explode("\n", str_replace(array("\r\n", "\n\r", "\r"), "\n", $data)); |
||
| 27 | |||
| 28 | if (is_array($this->data)) { |
||
|
|
|||
| 29 | |||
| 30 | foreach ($this->data as $key => $val) { |
||
| 31 | |||
| 32 | $this->arr->append($val); |
||
| 33 | |||
| 34 | $this->cleanLine($key, $val); |
||
| 35 | |||
| 36 | } |
||
| 37 | } else { |
||
| 38 | return; |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | private function cleanLine($key, $line) |
||
| 46 | } |
||
| 47 | } |
||
| 48 | } |