diff --git a/system/API/ResponseTrait.php b/system/API/ResponseTrait.php index b2627f684093..6bc2745968d4 100644 --- a/system/API/ResponseTrait.php +++ b/system/API/ResponseTrait.php @@ -13,7 +13,6 @@ use CodeIgniter\Format\FormatterInterface; use CodeIgniter\HTTP\IncomingRequest; -use CodeIgniter\HTTP\Response; use CodeIgniter\HTTP\ResponseInterface; use Config\Services; @@ -22,8 +21,8 @@ * consistent HTTP responses under a variety of common * situations when working as an API. * - * @property IncomingRequest $request - * @property Response $response + * @property IncomingRequest $request + * @property ResponseInterface $response */ trait ResponseTrait { diff --git a/system/HTTP/CURLRequest.php b/system/HTTP/CURLRequest.php index 2ecf69cc0242..217899863aa7 100644 --- a/system/HTTP/CURLRequest.php +++ b/system/HTTP/CURLRequest.php @@ -96,8 +96,6 @@ class CURLRequest extends Request * - baseURI * - timeout * - any other request options to use as defaults. - * - * @param ResponseInterface $response */ public function __construct(App $config, URI $uri, ?ResponseInterface $response = null, array $options = []) { diff --git a/system/RESTful/ResourcePresenter.php b/system/RESTful/ResourcePresenter.php index 3b832a2412be..5aedb28d4ad8 100644 --- a/system/RESTful/ResourcePresenter.php +++ b/system/RESTful/ResourcePresenter.php @@ -11,7 +11,7 @@ namespace CodeIgniter\RESTful; -use CodeIgniter\HTTP\Response; +use CodeIgniter\HTTP\ResponseInterface; /** * An extendable controller to help provide a UI for a resource. @@ -21,7 +21,7 @@ class ResourcePresenter extends BaseResource /** * Present a view of resource objects * - * @return Response|string|void + * @return ResponseInterface|string|void */ public function index() { @@ -33,7 +33,7 @@ public function index() * * @param int|string|null $id * - * @return Response|string|void + * @return ResponseInterface|string|void */ public function show($id = null) { @@ -43,7 +43,7 @@ public function show($id = null) /** * Present a view to present a new single resource object * - * @return Response|string|void + * @return ResponseInterface|string|void */ public function new() { @@ -54,7 +54,7 @@ public function new() * Process the creation/insertion of a new resource object. * This should be a POST. * - * @return Response|string|void + * @return ResponseInterface|string|void */ public function create() { @@ -66,7 +66,7 @@ public function create() * * @param int|string|null $id * - * @return Response|string|void + * @return ResponseInterface|string|void */ public function edit($id = null) { @@ -79,7 +79,7 @@ public function edit($id = null) * * @param int|string|null $id * - * @return Response|string|void + * @return ResponseInterface|string|void */ public function update($id = null) { @@ -91,7 +91,7 @@ public function update($id = null) * * @param int|string|null $id * - * @return Response|string|void + * @return ResponseInterface|string|void */ public function remove($id = null) { @@ -103,7 +103,7 @@ public function remove($id = null) * * @param int|string|null $id * - * @return Response|string|void + * @return ResponseInterface|string|void */ public function delete($id = null) { diff --git a/system/Security/Security.php b/system/Security/Security.php index bc24c0605e30..ba70e3ec24f0 100644 --- a/system/Security/Security.php +++ b/system/Security/Security.php @@ -15,7 +15,6 @@ use CodeIgniter\HTTP\IncomingRequest; use CodeIgniter\HTTP\Request; use CodeIgniter\HTTP\RequestInterface; -use CodeIgniter\HTTP\Response; use CodeIgniter\Security\Exceptions\SecurityException; use CodeIgniter\Session\Session; use Config\App; @@ -571,7 +570,6 @@ private function saveHashInCookie(): void ] ); - /** @var Response $response */ $response = Services::response(); $response->setCookie($this->cookie); } diff --git a/system/Session/Session.php b/system/Session/Session.php index f864a09b6f19..1ac80e40f02f 100644 --- a/system/Session/Session.php +++ b/system/Session/Session.php @@ -12,7 +12,6 @@ namespace CodeIgniter\Session; use CodeIgniter\Cookie\Cookie; -use CodeIgniter\HTTP\Response; use Config\App; use Config\Cookie as CookieConfig; use Config\Services; @@ -930,7 +929,6 @@ protected function setCookie() $expiration = $this->sessionExpiration === 0 ? 0 : time() + $this->sessionExpiration; $this->cookie = $this->cookie->withValue(session_id())->withExpires($expiration); - /** @var Response $response */ $response = Services::response(); $response->setCookie($this->cookie); }