| Total Complexity | 6 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class ClosuresTest extends TestCase |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @test |
||
| 16 | * @covers ::filter |
||
| 17 | */ |
||
| 18 | public function filterAllowNullAndNullValue() |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @test |
||
| 26 | * @covers ::filter |
||
| 27 | */ |
||
| 28 | public function filterAllowNullIsFalseAndNullValue() |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @test |
||
| 36 | * @covers ::filter |
||
| 37 | */ |
||
| 38 | public function filterClosure() |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @test |
||
| 49 | * @covers ::filter |
||
| 50 | */ |
||
| 51 | public function filterCallable() |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @test |
||
| 63 | * @covers ::filter |
||
| 64 | */ |
||
| 65 | public function filterNotCallableString() |
||
| 66 | { |
||
| 67 | $this->expectException(FilterException::class); |
||
| 68 | Closures::filter('string'); |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @test |
||
| 73 | * @covers ::filter |
||
| 74 | */ |
||
| 75 | public function filterNotCallableInt() |
||
| 79 | } |
||
| 80 | } |
||
| 81 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.