@@ -61,7 +61,7 @@ public function allowCache(
6161 *
6262 * @return ResponseInterface A new PSR7 response object with `Cache-Control` header
6363 */
64- public function denyCache (ResponseInterface $ response )
64+ public function denyCache (ResponseInterface $ response ): ResponseInterface
6565 {
6666 return $ response ->withHeader ('Cache-Control ' , 'no-store,no-cache ' );
6767 }
@@ -75,7 +75,7 @@ public function denyCache(ResponseInterface $response)
7575 * @return ResponseInterface A new PSR7 response object with `Expires` header
7676 * @throws InvalidArgumentException if the expiration date cannot be parsed
7777 */
78- public function withExpires (ResponseInterface $ response , $ time )
78+ public function withExpires (ResponseInterface $ response , $ time ): ResponseInterface
7979 {
8080 if (!is_integer ($ time )) {
8181 $ time = strtotime ($ time );
@@ -97,7 +97,7 @@ public function withExpires(ResponseInterface $response, $time)
9797 * @return ResponseInterface A new PSR7 response object with `ETag` header
9898 * @throws InvalidArgumentException if the etag type is invalid
9999 */
100- public function withEtag (ResponseInterface $ response , $ value , $ type = 'strong ' )
100+ public function withEtag (ResponseInterface $ response , string $ value , string $ type = 'strong ' ): ResponseInterface
101101 {
102102 if (!in_array ($ type , ['strong ' , 'weak ' ])) {
103103 throw new InvalidArgumentException ('Invalid etag type. Must be "strong" or "weak". ' );
@@ -119,7 +119,7 @@ public function withEtag(ResponseInterface $response, $value, $type = 'strong')
119119 * @return ResponseInterface A new PSR7 response object with `Last-Modified` header
120120 * @throws InvalidArgumentException if the last modified date cannot be parsed
121121 */
122- public function withLastModified (ResponseInterface $ response , $ time )
122+ public function withLastModified (ResponseInterface $ response , $ time ): ResponseInterface
123123 {
124124 if (!is_integer ($ time )) {
125125 $ time = strtotime ($ time );
0 commit comments