File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 31
31
use Detection \Cache \CacheException ;
32
32
use Detection \Exception \MobileDetectException ;
33
33
use Psr \Cache \InvalidArgumentException ;
34
+ use Psr \SimpleCache \CacheInterface ;
34
35
35
36
/**
36
37
* Auto-generated isXXXX() magic methods.
@@ -231,7 +232,7 @@ class MobileDetect
231
232
*
232
233
* Replace this with your own implementation.
233
234
*/
234
- protected Cache $ cache ;
235
+ protected CacheInterface $ cache ;
235
236
236
237
/**
237
238
* Stores the version number of the current release.
@@ -1028,7 +1029,7 @@ class MobileDetect
1028
1029
* Construct an instance of this class.
1029
1030
*/
1030
1031
public function __construct (
1031
- ?Cache $ cache = null ,
1032
+ ?CacheInterface $ cache = null ,
1032
1033
array $ config = [],
1033
1034
) {
1034
1035
// If no custom cache provided then use our own.
@@ -1508,7 +1509,7 @@ public function is(string $ruleName): bool
1508
1509
try {
1509
1510
$ cacheKey = $ this ->createCacheKey ($ ruleName );
1510
1511
$ cacheItem = $ this ->cache ->get ($ cacheKey );
1511
- if (! is_null ( $ cacheItem) ) {
1512
+ if ($ cacheItem ) {
1512
1513
return $ cacheItem ->get ();
1513
1514
}
1514
1515
You can’t perform that action at this time.
0 commit comments