@@ -236,7 +236,7 @@ public function isCLI(): bool
236236 * @param int|null $filter A filter name to apply.
237237 * @param array<string, mixed>|int|null $flags
238238 *
239- * @return array{}|null
239+ * @return ($index is string ? null : array{})
240240 */
241241 public function getGet ($ index = null , $ filter = null , $ flags = null )
242242 {
@@ -250,7 +250,7 @@ public function getGet($index = null, $filter = null, $flags = null)
250250 * @param int|null $filter A filter name to apply
251251 * @param array<string, mixed>|int|null $flags
252252 *
253- * @return array{}|null
253+ * @return ($index is string ? null : array{})
254254 */
255255 public function getPost ($ index = null , $ filter = null , $ flags = null )
256256 {
@@ -264,7 +264,7 @@ public function getPost($index = null, $filter = null, $flags = null)
264264 * @param int|null $filter A filter name to apply
265265 * @param array<string, mixed>|int|null $flags
266266 *
267- * @return array{}|null
267+ * @return ($index is string ? null : array{})
268268 */
269269 public function getPostGet ($ index = null , $ filter = null , $ flags = null )
270270 {
@@ -278,7 +278,7 @@ public function getPostGet($index = null, $filter = null, $flags = null)
278278 * @param int|null $filter A filter name to apply
279279 * @param array<string, mixed>|int|null $flags
280280 *
281- * @return array{}|null
281+ * @return ($index is string ? null : array{})
282282 */
283283 public function getGetPost ($ index = null , $ filter = null , $ flags = null )
284284 {
@@ -292,7 +292,7 @@ public function getGetPost($index = null, $filter = null, $flags = null)
292292 * @param int|null $filter A filter name to be applied
293293 * @param mixed $flags
294294 *
295- * @return array{}|null
295+ * @return ($index is string ? null : array{})
296296 */
297297 public function getCookie ($ index = null , $ filter = null , $ flags = null )
298298 {
@@ -302,7 +302,7 @@ public function getCookie($index = null, $filter = null, $flags = null)
302302 /**
303303 * @param list<string>|string|null $index
304304 *
305- * @return array{}|null
305+ * @return ($index is string ? null : array{})
306306 */
307307 private function returnNullOrEmptyArray ($ index )
308308 {
0 commit comments