@@ -124,7 +124,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
124124            $ response  = $ this  ->_withCacheHeaders (
125125                $ response ,
126126                $ config ['cacheTime ' ],
127-                 $ modifiedTime
127+                 $ modifiedTime, 
128128            );
129129        }
130130
@@ -165,7 +165,7 @@ protected function _checkSignature(ServerRequestInterface $request): void
165165        try  {
166166            SignatureFactory::create ($ signKey )->validateRequest (
167167                $ this  ->_path ,
168-                 $ request ->getQueryParams ()
168+                 $ request ->getQueryParams (), 
169169            );
170170        } catch  (Exception   $ exception ) {
171171            throw  new  SignatureException ($ exception ->getMessage (), null , $ exception );
@@ -184,28 +184,21 @@ protected function _checkSignature(ServerRequestInterface $request): void
184184     */ 
185185    protected  function  _checkModified (ServerRequestInterface   $ request , Server   $ server ): ResponseInterface  |int |null 
186186    {
187-         $ modifiedTime  = false ;
188- 
189187        try  {
190-             /** @var string|int|false $modifiedTime */ 
191188            $ modifiedTime  = $ server ->getSource ()
192189                ->lastModified ($ server ->getSourcePath ($ this  ->_path ));
193190        } catch  (Exception   $ exception ) {
194191            return  $ this  ->_handleException ($ request , $ exception );
195192        }
196193
197-         if  ($ modifiedTime  === false ) {
198-             return  null ;
199-         }
200- 
201194        if  ($ this  ->_isNotModified ($ request , $ modifiedTime )) {
202195            $ response  = new  Response (['status '  => 304 ]);
203196            $ response  = $ this  ->_withCustomHeaders ($ response );
204197
205198            return  $ response ->withHeader ('Last-Modified ' , (string )$ modifiedTime );
206199        }
207200
208-         return  ( int ) $ modifiedTime ;
201+         return  $ modifiedTime ;
209202    }
210203
211204    /** 
@@ -306,7 +299,7 @@ protected function _isNotModified(ServerRequestInterface $request, string|int $m
306299    protected  function  _withCacheHeaders (
307300        ResponseInterface   $ response ,
308301        string  $ cacheTime ,
309-         string |int  $ modifiedTime
302+         string |int  $ modifiedTime, 
310303    ): ResponseInterface   {
311304        /** @var int $expire */ 
312305        $ expire  = strtotime ($ cacheTime );
@@ -346,7 +339,7 @@ protected function _handleException(ServerRequestInterface $request, Exception $
346339    {
347340        $ event  = $ this  ->dispatchEvent (
348341            static ::RESPONSE_FAILURE_EVENT ,
349-             compact ('request ' , 'exception ' )
342+             compact ('request ' , 'exception ' ), 
350343        );
351344        $ result  = $ event ->getResult ();
352345
0 commit comments