[!!!] Added type definitions to property types

- Request: optimized getIp method and reversed the order so proxy is always checked first.
This commit is contained in:
sessingo
2023-04-02 03:10:27 +02:00
parent dc3b1fe74e
commit 5946397c15
25 changed files with 135 additions and 129 deletions
+1 -5
View File
@@ -7,7 +7,7 @@ use Pecee\Exceptions\InvalidArgumentException;
class Response
{
protected $request;
protected Request $request;
public function __construct(Request $request)
{
@@ -39,9 +39,6 @@ class Response
$this->httpCode($httpCode);
}
// Gracefully end session (avoid any changes being lost)
session_write_close();
$this->header('location: ' . $url);
exit(0);
}
@@ -68,7 +65,6 @@ class Response
public function cache(string $eTag, int $lastModifiedTime = 2592000): self
{
$this->headers([
'Cache-Control: public',
sprintf('Last-Modified: %s GMT', gmdate('D, d M Y H:i:s', $lastModifiedTime)),