1 | <?php |
||
20 | class CommentTest extends TestCaseAbstract |
||
21 | { |
||
22 | /** |
||
23 | * setUp |
||
24 | * |
||
25 | * @since 4.0.0 |
||
26 | */ |
||
27 | |||
28 | public function setUp() : void |
||
100 | |||
101 | /** |
||
102 | * tearDown |
||
103 | * |
||
104 | * @since 4.0.0 |
||
105 | */ |
||
106 | |||
107 | public function tearDown() : void |
||
111 | |||
112 | /** |
||
113 | * testCountByArticleAndLanguage |
||
114 | * |
||
115 | * @since 4.0.0 |
||
116 | * |
||
117 | * @param int $articleId |
||
118 | * @param string $language |
||
119 | * @param int $expect |
||
120 | * |
||
121 | * @dataProvider providerAutoloader |
||
122 | */ |
||
123 | |||
124 | public function testCountByArticleAndLanguage(int $articleId = null, string $language = null, int $expect = null) : void |
||
138 | |||
139 | /** |
||
140 | * testGetByArticleAndLanguageAndOrderAndStep |
||
141 | * |
||
142 | * @since 4.0.0 |
||
143 | * |
||
144 | * @param int|null $articleId |
||
145 | * @param string|null $language |
||
146 | * @param string|null $orderColumn |
||
147 | * @param int|null $limitStep |
||
148 | * @param array $expectArray |
||
149 | * |
||
150 | * @dataProvider providerAutoloader |
||
151 | */ |
||
152 | |||
153 | public function testGetByArticleAndLanguageAndOrderAndStep(int $articleId = null, string $language = null, string $orderColumn = null, int $limitStep = null, array $expectArray = []) : void |
||
177 | |||
178 | /** |
||
179 | * testGetRouteById |
||
180 | * |
||
181 | * @since 4.0.0 |
||
182 | * |
||
183 | * @param int $commentId |
||
184 | * @param string $expect |
||
185 | * |
||
186 | * @dataProvider providerAutoloader |
||
187 | */ |
||
188 | |||
189 | public function testGetRouteById(int $commentId = null, string $expect = null) : void |
||
203 | |||
204 | /** |
||
205 | * testCreateByArray |
||
206 | * |
||
207 | * @since 4.0.0 |
||
208 | * |
||
209 | * @param array $createArray |
||
210 | * @param bool $expect |
||
211 | * |
||
212 | * @dataProvider providerAutoloader |
||
213 | */ |
||
214 | |||
215 | public function testCreateByArray(array $createArray = [], bool $expect = null) : void |
||
229 | } |
||
230 |
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.