Added @return never to Response.php

In PHP8.1 instead of :void :never would be returned.
As this project is PHP7.4 compatible, we add it as a PHPDOC, so IDEs using this project will no longer complain and automatic checks will successfully detect dead code after calling a redirect()
This commit is contained in:
ATC-4K
2023-07-10 21:16:32 +02:00
committed by GitHub
parent cd891d5334
commit adfe70f191
+3 -1
View File
@@ -32,6 +32,8 @@ class Response
*
* @param string $url
* @param ?int $httpCode
*
* @return never
*/
public function redirect(string $url, ?int $httpCode = null): void
{
@@ -127,4 +129,4 @@ class Response
return $this;
}
}
}