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