1 | <?php |
||
20 | class ModelAbstractTest extends TestCaseAbstract |
||
21 | { |
||
22 | /** |
||
23 | * setUp |
||
24 | * |
||
25 | * @since 4.0.0 |
||
26 | */ |
||
27 | |||
28 | public function setUp() : void |
||
53 | |||
54 | /** |
||
55 | * tearDown |
||
56 | * |
||
57 | * @since 4.0.0 |
||
58 | */ |
||
59 | |||
60 | public function tearDown() : void |
||
64 | |||
65 | /** |
||
66 | * testGetById |
||
67 | * |
||
68 | * @since 4.0.0 |
||
69 | * |
||
70 | * @param int $id |
||
71 | * @param string $expect |
||
72 | * |
||
73 | * @dataProvider providerAutoloader |
||
74 | */ |
||
75 | |||
76 | public function testGetById(int $id = null, string $expect = null) : void |
||
90 | |||
91 | /** |
||
92 | * testGetById |
||
93 | * |
||
94 | * @since 4.0.0 |
||
95 | * |
||
96 | * @param array $expectArray |
||
97 | * |
||
98 | * @dataProvider providerAutoloader |
||
99 | */ |
||
100 | |||
101 | public function testGetAll(array $expectArray = []) : void |
||
123 | |||
124 | /** |
||
125 | * testQuery |
||
126 | * |
||
127 | * @since 4.0.0 |
||
128 | * |
||
129 | * @param array $expectArray |
||
130 | * |
||
131 | * @dataProvider providerAutoloader |
||
132 | */ |
||
133 | |||
134 | public function testQuery(array $expectArray = []) : void |
||
148 | |||
149 | /** |
||
150 | * testClearCache |
||
151 | * |
||
152 | * @since 4.0.0 |
||
153 | */ |
||
154 | |||
155 | public function testClearCache() : void |
||
169 | } |
||
170 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.