Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function testPruneFiltersCollectionInPlace() |
||
21 | { |
||
22 | $coll = Factory::create($this->fixtures['names']); |
||
23 | $this->assertCount(10, $coll); |
||
24 | $this->assertSame( |
||
25 | $coll, |
||
26 | $coll->prune( |
||
27 | function ($value, $key) { |
||
28 | return $key % 2 == 0; |
||
29 | } |
||
30 | ) |
||
31 | ); |
||
32 | $this->assertCount(5, $coll); |
||
33 | $this->assertSame( |
||
34 | $coll, |
||
35 | $coll->prune( |
||
36 | function ($value, $key) { |
||
|
|||
37 | return strlen($value) >= 6; |
||
38 | } |
||
39 | ) |
||
40 | ); |
||
41 | $this->assertCount(3, $coll); |
||
42 | } |
||
43 | } |
||
44 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.