File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515use Koded \Caching \{Cache , CacheException };
1616use Psr \Log \LoggerInterface ;
1717use function Koded \Caching \verify_key ;
18- use function Koded \Stdlib \{ now , rmdir } ;
18+ use function Koded \Stdlib \rmdir ;
1919
2020/**
2121 * @property FileClient client
@@ -89,16 +89,16 @@ public function clear()
8989 public function has ($ key , &$ filename = '' , &$ cache = null )
9090 {
9191 verify_key ($ key );
92-
9392 $ filename = $ this ->filename ($ key , false );
93+
9494 if (false === is_file ($ filename )) {
9595 return false ;
9696 }
9797
9898 /** @noinspection PhpIncludeInspection */
9999 $ cache = include $ filename ;
100100
101- if ($ cache ['timestamp ' ] <= now ()-> getTimestamp ()) {
101+ if ($ cache ['timestamp ' ] <= time ()) {
102102 unlink ($ filename );
103103
104104 return false ;
@@ -142,7 +142,7 @@ private function filename(string $key, bool $create): string
142142 *
143143 * @throws CacheException
144144 */
145- private function setDirectory (string $ directory )
145+ private function setDirectory (string $ directory ): void
146146 {
147147 // Overrule shell misconfiguration or the web server
148148 umask (umask () | 0002 );
You can’t perform that action at this time.
0 commit comments