1 | <?php |
||
27 | class MissingImportTest extends AbstractTest |
||
28 | { |
||
29 | /** |
||
30 | * Get the rule under test. |
||
31 | * |
||
32 | * @return MissingImport |
||
33 | */ |
||
34 | public function getRule() |
||
40 | |||
41 | /** |
||
42 | * Tests the rule for cases where it should apply. |
||
43 | * |
||
44 | * @param string $file The test file to test against. |
||
45 | * @return void |
||
46 | * @dataProvider getApplyingCases |
||
47 | */ |
||
48 | public function testRuleAppliesTo($file) |
||
52 | |||
53 | /** |
||
54 | * Tests the rule for cases where it should not apply. |
||
55 | * |
||
56 | * @param string $file The test file to test against. |
||
57 | * @return void |
||
58 | * @dataProvider getNotApplyingCases |
||
59 | */ |
||
60 | public function testRuleDoesNotApplyTo($file) |
||
64 | |||
65 | /** |
||
66 | * Tests that it applies to a class that has fully qualified class names |
||
67 | * |
||
68 | * @return void |
||
69 | * @covers ::apply |
||
70 | * @covers ::isSelfReference |
||
71 | */ |
||
72 | public function testRuleAppliesTwiceToClassWithNotImportedDependencies() |
||
78 | |||
79 | /** |
||
80 | * Tests the rule ignores classes in global namespace with `ignore-global`. |
||
81 | * |
||
82 | * @param string $file The test file to test against. |
||
83 | * @return void |
||
84 | * @dataProvider getApplyingCases |
||
85 | */ |
||
86 | public function testRuleDoesNotApplyWithIgnoreGlobalProperty($file) |
||
92 | } |
||
93 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: