| Conditions | 2 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 3 | public function parse(AbstractFile $file) |
|
| 26 | { |
||
| 27 | 3 | $collection = new DepositCollection(); |
|
| 28 | 3 | $fileArray = array_slice($file->toArray(), 7); |
|
| 29 | |||
| 30 | array_walk($fileArray, function ($line, $key) use (&$collection) { |
||
|
|
|||
| 31 | 2 | if (!SantaCruzValidator::validate($line)) { |
|
| 32 | 2 | return; |
|
| 33 | } |
||
| 34 | |||
| 35 | 2 | $collection->push(new Deposit($line[3], $line[0], $line[1], $line[1])); |
|
| 36 | 3 | }); |
|
| 37 | |||
| 38 | 3 | $this->failIfParsedFileIsEmpty($collection); |
|
| 39 | 2 | $this->cache($collection); |
|
| 40 | |||
| 41 | 2 | return $collection; |
|
| 42 | } |
||
| 44 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.