Passed
Pull Request — master (#852)
by
unknown
03:03
created
lib/Phpfastcache/Drivers/Zenddisk/Driver.php 5 patches
Indentation   -66 removed lines patch added patch discarded remove patch
@@ -36,69 +36,3 @@
 block discarded – undo
36 36
     public function getHelp(): string
37 37
     {
38 38
         return <<<'HELP'
39
-            <p>
40
-            This driver rely on Zend Server 8.5+, see: https://www.zend.com/en/products/zend_server
41
-            </p>
42
-            HELP;
43
-    }
44
-
45
-    public function getStats(): DriverStatistic
46
-    {
47
-        $stat = new DriverStatistic();
48
-        $stat->setInfo('[ZendDisk] A void info string')
49
-            ->setSize(0)
50
-            ->setData(implode(', ', array_keys($this->itemInstances)))
51
-            ->setRawData(false);
52
-
53
-        return $stat;
54
-    }
55
-
56
-    protected function driverConnect(): bool
57
-    {
58
-        return true;
59
-    }
60
-
61
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
62
-    {
63
-        $data = zend_disk_cache_fetch($item->getKey());
64
-        if (false === $data) {
65
-            return null;
66
-        }
67
-
68
-        return $data;
69
-    }
70
-
71
-    /**
72
-     * @throws PhpfastcacheInvalidArgumentException
73
-     *
74
-     * @return mixed
75
-     */
76
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
77
-    {
78
-        $this->assertCacheItemType($item, Item::class);
79
-
80
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
81
-
82
-        return zend_disk_cache_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
83
-    }
84
-
85
-    /**
86
-     * @throws PhpfastcacheInvalidArgumentException
87
-     */
88
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
89
-    {
90
-        $this->assertCacheItemType($item, Item::class);
91
-
92
-        return (bool) zend_disk_cache_delete($item->getKey());
93
-    }
94
-
95
-    protected function driverClear(): bool
96
-    {
97
-        return @zend_disk_cache_clear();
98
-    }
99
-
100
-    public function getConfig(): Config
101
-    {
102
-        return $this->config;
103
-    }
104
-}
Please login to merge, or discard this patch.
Switch Indentation   -66 removed lines patch added patch discarded remove patch
@@ -36,69 +36,3 @@
 block discarded – undo
36 36
     public function getHelp(): string
37 37
     {
38 38
         return <<<'HELP'
39
-            <p>
40
-            This driver rely on Zend Server 8.5+, see: https://www.zend.com/en/products/zend_server
41
-            </p>
42
-            HELP;
43
-    }
44
-
45
-    public function getStats(): DriverStatistic
46
-    {
47
-        $stat = new DriverStatistic();
48
-        $stat->setInfo('[ZendDisk] A void info string')
49
-            ->setSize(0)
50
-            ->setData(implode(', ', array_keys($this->itemInstances)))
51
-            ->setRawData(false);
52
-
53
-        return $stat;
54
-    }
55
-
56
-    protected function driverConnect(): bool
57
-    {
58
-        return true;
59
-    }
60
-
61
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
62
-    {
63
-        $data = zend_disk_cache_fetch($item->getKey());
64
-        if (false === $data) {
65
-            return null;
66
-        }
67
-
68
-        return $data;
69
-    }
70
-
71
-    /**
72
-     * @throws PhpfastcacheInvalidArgumentException
73
-     *
74
-     * @return mixed
75
-     */
76
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
77
-    {
78
-        $this->assertCacheItemType($item, Item::class);
79
-
80
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
81
-
82
-        return zend_disk_cache_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
83
-    }
84
-
85
-    /**
86
-     * @throws PhpfastcacheInvalidArgumentException
87
-     */
88
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
89
-    {
90
-        $this->assertCacheItemType($item, Item::class);
91
-
92
-        return (bool) zend_disk_cache_delete($item->getKey());
93
-    }
94
-
95
-    protected function driverClear(): bool
96
-    {
97
-        return @zend_disk_cache_clear();
98
-    }
99
-
100
-    public function getConfig(): Config
101
-    {
102
-        return $this->config;
103
-    }
104
-}
Please login to merge, or discard this patch.
Spacing   -66 removed lines patch added patch discarded remove patch
@@ -36,69 +36,3 @@
 block discarded – undo
36 36
     public function getHelp(): string
37 37
     {
38 38
         return <<<'HELP'
39
-            <p>
40
-            This driver rely on Zend Server 8.5+, see: https://www.zend.com/en/products/zend_server
41
-            </p>
42
-            HELP;
43
-    }
44
-
45
-    public function getStats(): DriverStatistic
46
-    {
47
-        $stat = new DriverStatistic();
48
-        $stat->setInfo('[ZendDisk] A void info string')
49
-            ->setSize(0)
50
-            ->setData(implode(', ', array_keys($this->itemInstances)))
51
-            ->setRawData(false);
52
-
53
-        return $stat;
54
-    }
55
-
56
-    protected function driverConnect(): bool
57
-    {
58
-        return true;
59
-    }
60
-
61
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
62
-    {
63
-        $data = zend_disk_cache_fetch($item->getKey());
64
-        if (false === $data) {
65
-            return null;
66
-        }
67
-
68
-        return $data;
69
-    }
70
-
71
-    /**
72
-     * @throws PhpfastcacheInvalidArgumentException
73
-     *
74
-     * @return mixed
75
-     */
76
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
77
-    {
78
-        $this->assertCacheItemType($item, Item::class);
79
-
80
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
81
-
82
-        return zend_disk_cache_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
83
-    }
84
-
85
-    /**
86
-     * @throws PhpfastcacheInvalidArgumentException
87
-     */
88
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
89
-    {
90
-        $this->assertCacheItemType($item, Item::class);
91
-
92
-        return (bool) zend_disk_cache_delete($item->getKey());
93
-    }
94
-
95
-    protected function driverClear(): bool
96
-    {
97
-        return @zend_disk_cache_clear();
98
-    }
99
-
100
-    public function getConfig(): Config
101
-    {
102
-        return $this->config;
103
-    }
104
-}
Please login to merge, or discard this patch.
Braces   -66 removed lines patch added patch discarded remove patch
@@ -36,69 +36,3 @@
 block discarded – undo
36 36
     public function getHelp(): string
37 37
     {
38 38
         return <<<'HELP'
39
-            <p>
40
-            This driver rely on Zend Server 8.5+, see: https://www.zend.com/en/products/zend_server
41
-            </p>
42
-            HELP;
43
-    }
44
-
45
-    public function getStats(): DriverStatistic
46
-    {
47
-        $stat = new DriverStatistic();
48
-        $stat->setInfo('[ZendDisk] A void info string')
49
-            ->setSize(0)
50
-            ->setData(implode(', ', array_keys($this->itemInstances)))
51
-            ->setRawData(false);
52
-
53
-        return $stat;
54
-    }
55
-
56
-    protected function driverConnect(): bool
57
-    {
58
-        return true;
59
-    }
60
-
61
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
62
-    {
63
-        $data = zend_disk_cache_fetch($item->getKey());
64
-        if (false === $data) {
65
-            return null;
66
-        }
67
-
68
-        return $data;
69
-    }
70
-
71
-    /**
72
-     * @throws PhpfastcacheInvalidArgumentException
73
-     *
74
-     * @return mixed
75
-     */
76
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
77
-    {
78
-        $this->assertCacheItemType($item, Item::class);
79
-
80
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
81
-
82
-        return zend_disk_cache_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
83
-    }
84
-
85
-    /**
86
-     * @throws PhpfastcacheInvalidArgumentException
87
-     */
88
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
89
-    {
90
-        $this->assertCacheItemType($item, Item::class);
91
-
92
-        return (bool) zend_disk_cache_delete($item->getKey());
93
-    }
94
-
95
-    protected function driverClear(): bool
96
-    {
97
-        return @zend_disk_cache_clear();
98
-    }
99
-
100
-    public function getConfig(): Config
101
-    {
102
-        return $this->config;
103
-    }
104
-}
Please login to merge, or discard this patch.
Upper-Lower-Casing   -66 removed lines patch added patch discarded remove patch
@@ -36,69 +36,3 @@
 block discarded – undo
36 36
     public function getHelp(): string
37 37
     {
38 38
         return <<<'HELP'
39
-            <p>
40
-            This driver rely on Zend Server 8.5+, see: https://www.zend.com/en/products/zend_server
41
-            </p>
42
-            HELP;
43
-    }
44
-
45
-    public function getStats(): DriverStatistic
46
-    {
47
-        $stat = new DriverStatistic();
48
-        $stat->setInfo('[ZendDisk] A void info string')
49
-            ->setSize(0)
50
-            ->setData(implode(', ', array_keys($this->itemInstances)))
51
-            ->setRawData(false);
52
-
53
-        return $stat;
54
-    }
55
-
56
-    protected function driverConnect(): bool
57
-    {
58
-        return true;
59
-    }
60
-
61
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
62
-    {
63
-        $data = zend_disk_cache_fetch($item->getKey());
64
-        if (false === $data) {
65
-            return null;
66
-        }
67
-
68
-        return $data;
69
-    }
70
-
71
-    /**
72
-     * @throws PhpfastcacheInvalidArgumentException
73
-     *
74
-     * @return mixed
75
-     */
76
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
77
-    {
78
-        $this->assertCacheItemType($item, Item::class);
79
-
80
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
81
-
82
-        return zend_disk_cache_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
83
-    }
84
-
85
-    /**
86
-     * @throws PhpfastcacheInvalidArgumentException
87
-     */
88
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
89
-    {
90
-        $this->assertCacheItemType($item, Item::class);
91
-
92
-        return (bool) zend_disk_cache_delete($item->getKey());
93
-    }
94
-
95
-    protected function driverClear(): bool
96
-    {
97
-        return @zend_disk_cache_clear();
98
-    }
99
-
100
-    public function getConfig(): Config
101
-    {
102
-        return $this->config;
103
-    }
104
-}
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Mongodb/Driver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             $this->database->selectCollection($collectionName)
91 91
                 ->createIndex(
92 92
                     [self::DRIVER_EDATE_WRAPPER_INDEX => 1],
93
-                    ['expireAfterSeconds' => 0,  'name' => 'auto_expire_index']
93
+                    ['expireAfterSeconds' => 0, 'name' => 'auto_expire_index']
94 94
                 );
95 95
         }
96 96
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             )
214 214
         )->toArray()[0];
215 215
 
216
-        $arrayFilterRecursive = static function ($array, ?callable $callback = null) use (&$arrayFilterRecursive) {
216
+        $arrayFilterRecursive = static function($array, ?callable $callback = null) use (&$arrayFilterRecursive) {
217 217
             $array = $callback($array);
218 218
 
219 219
             if (\is_object($array) || \is_array($array)) {
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
             return $array;
226 226
         };
227 227
 
228
-        $callback = static function ($item) {
228
+        $callback = static function($item) {
229 229
             /*
230 230
              * Remove unserializable properties
231 231
              */
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         if (\count($servers) > 0) {
282 282
             $host = array_reduce(
283 283
                 $servers,
284
-                static fn ($carry, $data) => $carry . ('' === $carry ? '' : ',') . $data['host'] . ':' . $data['port'],
284
+                static fn($carry, $data) => $carry . ('' === $carry ? '' : ',') . $data['host'] . ':' . $data['port'],
285 285
                 ''
286 286
             );
287 287
             $port = false;
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Zendshm/Driver.php 5 patches
Indentation   -66 removed lines patch added patch discarded remove patch
@@ -36,69 +36,3 @@
 block discarded – undo
36 36
     public function getHelp(): string
37 37
     {
38 38
         return <<<'HELP'
39
-            <p>
40
-            This driver rely on Zend Server 8.5+, see: https://www.zend.com/en/products/zend_server
41
-            </p>
42
-            HELP;
43
-    }
44
-
45
-    public function getStats(): DriverStatistic
46
-    {
47
-        $stats = (array) zend_shm_cache_info();
48
-
49
-        return (new DriverStatistic())
50
-            ->setData(implode(', ', array_keys($this->itemInstances)))
51
-            ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total']))
52
-            ->setRawData($stats)
53
-            ->setSize($stats['memory_total']);
54
-    }
55
-
56
-    protected function driverConnect(): bool
57
-    {
58
-        return true;
59
-    }
60
-
61
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
62
-    {
63
-        $data = zend_shm_cache_fetch($item->getKey());
64
-        if (false === $data) {
65
-            return null;
66
-        }
67
-
68
-        return $data;
69
-    }
70
-
71
-    /**
72
-     * @throws PhpfastcacheInvalidArgumentException
73
-     *
74
-     * @return mixed
75
-     */
76
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
77
-    {
78
-        $this->assertCacheItemType($item, Item::class);
79
-
80
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
81
-
82
-        return zend_shm_cache_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
83
-    }
84
-
85
-    /**
86
-     * @throws PhpfastcacheInvalidArgumentException
87
-     */
88
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
89
-    {
90
-        $this->assertCacheItemType($item, Item::class);
91
-
92
-        return (bool) zend_shm_cache_delete($item->getKey());
93
-    }
94
-
95
-    protected function driverClear(): bool
96
-    {
97
-        return @zend_shm_cache_clear();
98
-    }
99
-
100
-    public function getConfig(): Config
101
-    {
102
-        return $this->config;
103
-    }
104
-}
Please login to merge, or discard this patch.
Switch Indentation   -66 removed lines patch added patch discarded remove patch
@@ -36,69 +36,3 @@
 block discarded – undo
36 36
     public function getHelp(): string
37 37
     {
38 38
         return <<<'HELP'
39
-            <p>
40
-            This driver rely on Zend Server 8.5+, see: https://www.zend.com/en/products/zend_server
41
-            </p>
42
-            HELP;
43
-    }
44
-
45
-    public function getStats(): DriverStatistic
46
-    {
47
-        $stats = (array) zend_shm_cache_info();
48
-
49
-        return (new DriverStatistic())
50
-            ->setData(implode(', ', array_keys($this->itemInstances)))
51
-            ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total']))
52
-            ->setRawData($stats)
53
-            ->setSize($stats['memory_total']);
54
-    }
55
-
56
-    protected function driverConnect(): bool
57
-    {
58
-        return true;
59
-    }
60
-
61
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
62
-    {
63
-        $data = zend_shm_cache_fetch($item->getKey());
64
-        if (false === $data) {
65
-            return null;
66
-        }
67
-
68
-        return $data;
69
-    }
70
-
71
-    /**
72
-     * @throws PhpfastcacheInvalidArgumentException
73
-     *
74
-     * @return mixed
75
-     */
76
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
77
-    {
78
-        $this->assertCacheItemType($item, Item::class);
79
-
80
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
81
-
82
-        return zend_shm_cache_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
83
-    }
84
-
85
-    /**
86
-     * @throws PhpfastcacheInvalidArgumentException
87
-     */
88
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
89
-    {
90
-        $this->assertCacheItemType($item, Item::class);
91
-
92
-        return (bool) zend_shm_cache_delete($item->getKey());
93
-    }
94
-
95
-    protected function driverClear(): bool
96
-    {
97
-        return @zend_shm_cache_clear();
98
-    }
99
-
100
-    public function getConfig(): Config
101
-    {
102
-        return $this->config;
103
-    }
104
-}
Please login to merge, or discard this patch.
Spacing   -66 removed lines patch added patch discarded remove patch
@@ -36,69 +36,3 @@
 block discarded – undo
36 36
     public function getHelp(): string
37 37
     {
38 38
         return <<<'HELP'
39
-            <p>
40
-            This driver rely on Zend Server 8.5+, see: https://www.zend.com/en/products/zend_server
41
-            </p>
42
-            HELP;
43
-    }
44
-
45
-    public function getStats(): DriverStatistic
46
-    {
47
-        $stats = (array) zend_shm_cache_info();
48
-
49
-        return (new DriverStatistic())
50
-            ->setData(implode(', ', array_keys($this->itemInstances)))
51
-            ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total']))
52
-            ->setRawData($stats)
53
-            ->setSize($stats['memory_total']);
54
-    }
55
-
56
-    protected function driverConnect(): bool
57
-    {
58
-        return true;
59
-    }
60
-
61
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
62
-    {
63
-        $data = zend_shm_cache_fetch($item->getKey());
64
-        if (false === $data) {
65
-            return null;
66
-        }
67
-
68
-        return $data;
69
-    }
70
-
71
-    /**
72
-     * @throws PhpfastcacheInvalidArgumentException
73
-     *
74
-     * @return mixed
75
-     */
76
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
77
-    {
78
-        $this->assertCacheItemType($item, Item::class);
79
-
80
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
81
-
82
-        return zend_shm_cache_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
83
-    }
84
-
85
-    /**
86
-     * @throws PhpfastcacheInvalidArgumentException
87
-     */
88
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
89
-    {
90
-        $this->assertCacheItemType($item, Item::class);
91
-
92
-        return (bool) zend_shm_cache_delete($item->getKey());
93
-    }
94
-
95
-    protected function driverClear(): bool
96
-    {
97
-        return @zend_shm_cache_clear();
98
-    }
99
-
100
-    public function getConfig(): Config
101
-    {
102
-        return $this->config;
103
-    }
104
-}
Please login to merge, or discard this patch.
Braces   -66 removed lines patch added patch discarded remove patch
@@ -36,69 +36,3 @@
 block discarded – undo
36 36
     public function getHelp(): string
37 37
     {
38 38
         return <<<'HELP'
39
-            <p>
40
-            This driver rely on Zend Server 8.5+, see: https://www.zend.com/en/products/zend_server
41
-            </p>
42
-            HELP;
43
-    }
44
-
45
-    public function getStats(): DriverStatistic
46
-    {
47
-        $stats = (array) zend_shm_cache_info();
48
-
49
-        return (new DriverStatistic())
50
-            ->setData(implode(', ', array_keys($this->itemInstances)))
51
-            ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total']))
52
-            ->setRawData($stats)
53
-            ->setSize($stats['memory_total']);
54
-    }
55
-
56
-    protected function driverConnect(): bool
57
-    {
58
-        return true;
59
-    }
60
-
61
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
62
-    {
63
-        $data = zend_shm_cache_fetch($item->getKey());
64
-        if (false === $data) {
65
-            return null;
66
-        }
67
-
68
-        return $data;
69
-    }
70
-
71
-    /**
72
-     * @throws PhpfastcacheInvalidArgumentException
73
-     *
74
-     * @return mixed
75
-     */
76
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
77
-    {
78
-        $this->assertCacheItemType($item, Item::class);
79
-
80
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
81
-
82
-        return zend_shm_cache_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
83
-    }
84
-
85
-    /**
86
-     * @throws PhpfastcacheInvalidArgumentException
87
-     */
88
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
89
-    {
90
-        $this->assertCacheItemType($item, Item::class);
91
-
92
-        return (bool) zend_shm_cache_delete($item->getKey());
93
-    }
94
-
95
-    protected function driverClear(): bool
96
-    {
97
-        return @zend_shm_cache_clear();
98
-    }
99
-
100
-    public function getConfig(): Config
101
-    {
102
-        return $this->config;
103
-    }
104
-}
Please login to merge, or discard this patch.
Upper-Lower-Casing   -66 removed lines patch added patch discarded remove patch
@@ -36,69 +36,3 @@
 block discarded – undo
36 36
     public function getHelp(): string
37 37
     {
38 38
         return <<<'HELP'
39
-            <p>
40
-            This driver rely on Zend Server 8.5+, see: https://www.zend.com/en/products/zend_server
41
-            </p>
42
-            HELP;
43
-    }
44
-
45
-    public function getStats(): DriverStatistic
46
-    {
47
-        $stats = (array) zend_shm_cache_info();
48
-
49
-        return (new DriverStatistic())
50
-            ->setData(implode(', ', array_keys($this->itemInstances)))
51
-            ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total']))
52
-            ->setRawData($stats)
53
-            ->setSize($stats['memory_total']);
54
-    }
55
-
56
-    protected function driverConnect(): bool
57
-    {
58
-        return true;
59
-    }
60
-
61
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
62
-    {
63
-        $data = zend_shm_cache_fetch($item->getKey());
64
-        if (false === $data) {
65
-            return null;
66
-        }
67
-
68
-        return $data;
69
-    }
70
-
71
-    /**
72
-     * @throws PhpfastcacheInvalidArgumentException
73
-     *
74
-     * @return mixed
75
-     */
76
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
77
-    {
78
-        $this->assertCacheItemType($item, Item::class);
79
-
80
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
81
-
82
-        return zend_shm_cache_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
83
-    }
84
-
85
-    /**
86
-     * @throws PhpfastcacheInvalidArgumentException
87
-     */
88
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
89
-    {
90
-        $this->assertCacheItemType($item, Item::class);
91
-
92
-        return (bool) zend_shm_cache_delete($item->getKey());
93
-    }
94
-
95
-    protected function driverClear(): bool
96
-    {
97
-        return @zend_shm_cache_clear();
98
-    }
99
-
100
-    public function getConfig(): Config
101
-    {
102
-        return $this->config;
103
-    }
104
-}
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Predis/Driver.php 5 patches
Indentation   -128 removed lines patch added patch discarded remove patch
@@ -45,131 +45,3 @@
 block discarded – undo
45 45
     public function getHelp(): string
46 46
     {
47 47
         return <<<'HELP'
48
-            <p>
49
-            To install the Predis library via Composer:
50
-            <code>composer require "predis/predis" "~1.1.0"</code>
51
-            </p>
52
-            HELP;
53
-    }
54
-
55
-    public function getStats(): DriverStatistic
56
-    {
57
-        $info = $this->instance->info();
58
-        $size = ($info['Memory']['used_memory'] ?? 0);
59
-        $version = ($info['Server']['redis_version'] ?? 0);
60
-        $date = (isset($info['Server']['uptime_in_seconds']) ? (new DateTimeImmutable())->setTimestamp(time() - $info['Server']['uptime_in_seconds']) : 'unknown date');
61
-
62
-        return (new DriverStatistic())
63
-            ->setData(implode(', ', array_keys($this->itemInstances)))
64
-            ->setRawData($info)
65
-            ->setSize((int) $size)
66
-            ->setInfo(
67
-                sprintf(
68
-                    "The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
69
-                    $version,
70
-                    $date->format(\DATE_RFC2822)
71
-                )
72
-            );
73
-    }
74
-
75
-    /**
76
-     * @throws PhpfastcacheDriverException
77
-     * @throws PhpfastcacheLogicException
78
-     */
79
-    protected function driverConnect(): bool
80
-    {
81
-        /*
82
-         * In case of an user-provided
83
-         * Predis client just return here
84
-         */
85
-        if ($this->getConfig()->getPredisClient() instanceof PredisClient) {
86
-            $this->instance = $this->getConfig()->getPredisClient();
87
-            if (!$this->instance->isConnected()) {
88
-                $this->instance->connect();
89
-            }
90
-
91
-            return true;
92
-        }
93
-
94
-        $options = [];
95
-
96
-        if ($this->getConfig()->getOptPrefix()) {
97
-            $options['prefix'] = $this->getConfig()->getOptPrefix();
98
-        }
99
-
100
-        if (!empty($this->getConfig()->getPath())) {
101
-            $this->instance = new PredisClient(
102
-                [
103
-                    'scheme' => $this->getConfig()->getScheme(),
104
-                    'persistent' => $this->getConfig()->isPersistent(),
105
-                    'timeout' => $this->getConfig()->getTimeout(),
106
-                    'path' => $this->getConfig()->getPath(),
107
-                ],
108
-                $options
109
-            );
110
-        } else {
111
-            $this->instance = new PredisClient($this->getConfig()->getPredisConfigArray(), $options);
112
-        }
113
-
114
-        try {
115
-            $this->instance->connect();
116
-        } catch (PredisConnectionException $e) {
117
-            throw new PhpfastcacheDriverException('Failed to connect to predis server. Check the Predis documentation: https://github.com/nrk/predis/tree/v1.1#how-to-install-and-use-predis', 0, $e);
118
-        }
119
-
120
-        return true;
121
-    }
122
-
123
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
124
-    {
125
-        $val = $this->instance->get($item->getKey());
126
-        if (false == $val) {
127
-            return null;
128
-        }
129
-
130
-        return $this->decode($val);
131
-    }
132
-
133
-    /**
134
-     * @throws PhpfastcacheInvalidArgumentException
135
-     * @throws PhpfastcacheLogicException
136
-     *
137
-     * @return mixed
138
-     */
139
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
140
-    {
141
-        $this->assertCacheItemType($item, Item::class);
142
-
143
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
144
-
145
-        /*
146
-         * @see https://redis.io/commands/setex
147
-         * @see https://redis.io/commands/expire
148
-         */
149
-        if ($ttl <= 0) {
150
-            return (bool) $this->instance->expire($item->getKey(), 0);
151
-        }
152
-
153
-        return 'OK' === $this->instance->setex($item->getKey(), $ttl, $this->encode($this->driverPreWrap($item)))->getPayload();
154
-    }
155
-
156
-    /**
157
-     * @throws PhpfastcacheInvalidArgumentException
158
-     */
159
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
160
-    {
161
-        $this->assertCacheItemType($item, Item::class);
162
-
163
-        return (bool) $this->instance->del([$item->getKey()]);
164
-    }
165
-
166
-    protected function driverClear(): bool
167
-    {
168
-        return 'OK' === $this->instance->flushdb()->getPayload();
169
-    }
170
-
171
-    public function getConfig(): Config
172
-    {
173
-        return $this->config;
174
-    }
175
-}
Please login to merge, or discard this patch.
Switch Indentation   -128 removed lines patch added patch discarded remove patch
@@ -45,131 +45,3 @@
 block discarded – undo
45 45
     public function getHelp(): string
46 46
     {
47 47
         return <<<'HELP'
48
-            <p>
49
-            To install the Predis library via Composer:
50
-            <code>composer require "predis/predis" "~1.1.0"</code>
51
-            </p>
52
-            HELP;
53
-    }
54
-
55
-    public function getStats(): DriverStatistic
56
-    {
57
-        $info = $this->instance->info();
58
-        $size = ($info['Memory']['used_memory'] ?? 0);
59
-        $version = ($info['Server']['redis_version'] ?? 0);
60
-        $date = (isset($info['Server']['uptime_in_seconds']) ? (new DateTimeImmutable())->setTimestamp(time() - $info['Server']['uptime_in_seconds']) : 'unknown date');
61
-
62
-        return (new DriverStatistic())
63
-            ->setData(implode(', ', array_keys($this->itemInstances)))
64
-            ->setRawData($info)
65
-            ->setSize((int) $size)
66
-            ->setInfo(
67
-                sprintf(
68
-                    "The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
69
-                    $version,
70
-                    $date->format(\DATE_RFC2822)
71
-                )
72
-            );
73
-    }
74
-
75
-    /**
76
-     * @throws PhpfastcacheDriverException
77
-     * @throws PhpfastcacheLogicException
78
-     */
79
-    protected function driverConnect(): bool
80
-    {
81
-        /*
82
-         * In case of an user-provided
83
-         * Predis client just return here
84
-         */
85
-        if ($this->getConfig()->getPredisClient() instanceof PredisClient) {
86
-            $this->instance = $this->getConfig()->getPredisClient();
87
-            if (!$this->instance->isConnected()) {
88
-                $this->instance->connect();
89
-            }
90
-
91
-            return true;
92
-        }
93
-
94
-        $options = [];
95
-
96
-        if ($this->getConfig()->getOptPrefix()) {
97
-            $options['prefix'] = $this->getConfig()->getOptPrefix();
98
-        }
99
-
100
-        if (!empty($this->getConfig()->getPath())) {
101
-            $this->instance = new PredisClient(
102
-                [
103
-                    'scheme' => $this->getConfig()->getScheme(),
104
-                    'persistent' => $this->getConfig()->isPersistent(),
105
-                    'timeout' => $this->getConfig()->getTimeout(),
106
-                    'path' => $this->getConfig()->getPath(),
107
-                ],
108
-                $options
109
-            );
110
-        } else {
111
-            $this->instance = new PredisClient($this->getConfig()->getPredisConfigArray(), $options);
112
-        }
113
-
114
-        try {
115
-            $this->instance->connect();
116
-        } catch (PredisConnectionException $e) {
117
-            throw new PhpfastcacheDriverException('Failed to connect to predis server. Check the Predis documentation: https://github.com/nrk/predis/tree/v1.1#how-to-install-and-use-predis', 0, $e);
118
-        }
119
-
120
-        return true;
121
-    }
122
-
123
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
124
-    {
125
-        $val = $this->instance->get($item->getKey());
126
-        if (false == $val) {
127
-            return null;
128
-        }
129
-
130
-        return $this->decode($val);
131
-    }
132
-
133
-    /**
134
-     * @throws PhpfastcacheInvalidArgumentException
135
-     * @throws PhpfastcacheLogicException
136
-     *
137
-     * @return mixed
138
-     */
139
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
140
-    {
141
-        $this->assertCacheItemType($item, Item::class);
142
-
143
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
144
-
145
-        /*
146
-         * @see https://redis.io/commands/setex
147
-         * @see https://redis.io/commands/expire
148
-         */
149
-        if ($ttl <= 0) {
150
-            return (bool) $this->instance->expire($item->getKey(), 0);
151
-        }
152
-
153
-        return 'OK' === $this->instance->setex($item->getKey(), $ttl, $this->encode($this->driverPreWrap($item)))->getPayload();
154
-    }
155
-
156
-    /**
157
-     * @throws PhpfastcacheInvalidArgumentException
158
-     */
159
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
160
-    {
161
-        $this->assertCacheItemType($item, Item::class);
162
-
163
-        return (bool) $this->instance->del([$item->getKey()]);
164
-    }
165
-
166
-    protected function driverClear(): bool
167
-    {
168
-        return 'OK' === $this->instance->flushdb()->getPayload();
169
-    }
170
-
171
-    public function getConfig(): Config
172
-    {
173
-        return $this->config;
174
-    }
175
-}
Please login to merge, or discard this patch.
Spacing   -128 removed lines patch added patch discarded remove patch
@@ -45,131 +45,3 @@
 block discarded – undo
45 45
     public function getHelp(): string
46 46
     {
47 47
         return <<<'HELP'
48
-            <p>
49
-            To install the Predis library via Composer:
50
-            <code>composer require "predis/predis" "~1.1.0"</code>
51
-            </p>
52
-            HELP;
53
-    }
54
-
55
-    public function getStats(): DriverStatistic
56
-    {
57
-        $info = $this->instance->info();
58
-        $size = ($info['Memory']['used_memory'] ?? 0);
59
-        $version = ($info['Server']['redis_version'] ?? 0);
60
-        $date = (isset($info['Server']['uptime_in_seconds']) ? (new DateTimeImmutable())->setTimestamp(time() - $info['Server']['uptime_in_seconds']) : 'unknown date');
61
-
62
-        return (new DriverStatistic())
63
-            ->setData(implode(', ', array_keys($this->itemInstances)))
64
-            ->setRawData($info)
65
-            ->setSize((int) $size)
66
-            ->setInfo(
67
-                sprintf(
68
-                    "The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
69
-                    $version,
70
-                    $date->format(\DATE_RFC2822)
71
-                )
72
-            );
73
-    }
74
-
75
-    /**
76
-     * @throws PhpfastcacheDriverException
77
-     * @throws PhpfastcacheLogicException
78
-     */
79
-    protected function driverConnect(): bool
80
-    {
81
-        /*
82
-         * In case of an user-provided
83
-         * Predis client just return here
84
-         */
85
-        if ($this->getConfig()->getPredisClient() instanceof PredisClient) {
86
-            $this->instance = $this->getConfig()->getPredisClient();
87
-            if (!$this->instance->isConnected()) {
88
-                $this->instance->connect();
89
-            }
90
-
91
-            return true;
92
-        }
93
-
94
-        $options = [];
95
-
96
-        if ($this->getConfig()->getOptPrefix()) {
97
-            $options['prefix'] = $this->getConfig()->getOptPrefix();
98
-        }
99
-
100
-        if (!empty($this->getConfig()->getPath())) {
101
-            $this->instance = new PredisClient(
102
-                [
103
-                    'scheme' => $this->getConfig()->getScheme(),
104
-                    'persistent' => $this->getConfig()->isPersistent(),
105
-                    'timeout' => $this->getConfig()->getTimeout(),
106
-                    'path' => $this->getConfig()->getPath(),
107
-                ],
108
-                $options
109
-            );
110
-        } else {
111
-            $this->instance = new PredisClient($this->getConfig()->getPredisConfigArray(), $options);
112
-        }
113
-
114
-        try {
115
-            $this->instance->connect();
116
-        } catch (PredisConnectionException $e) {
117
-            throw new PhpfastcacheDriverException('Failed to connect to predis server. Check the Predis documentation: https://github.com/nrk/predis/tree/v1.1#how-to-install-and-use-predis', 0, $e);
118
-        }
119
-
120
-        return true;
121
-    }
122
-
123
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
124
-    {
125
-        $val = $this->instance->get($item->getKey());
126
-        if (false == $val) {
127
-            return null;
128
-        }
129
-
130
-        return $this->decode($val);
131
-    }
132
-
133
-    /**
134
-     * @throws PhpfastcacheInvalidArgumentException
135
-     * @throws PhpfastcacheLogicException
136
-     *
137
-     * @return mixed
138
-     */
139
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
140
-    {
141
-        $this->assertCacheItemType($item, Item::class);
142
-
143
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
144
-
145
-        /*
146
-         * @see https://redis.io/commands/setex
147
-         * @see https://redis.io/commands/expire
148
-         */
149
-        if ($ttl <= 0) {
150
-            return (bool) $this->instance->expire($item->getKey(), 0);
151
-        }
152
-
153
-        return 'OK' === $this->instance->setex($item->getKey(), $ttl, $this->encode($this->driverPreWrap($item)))->getPayload();
154
-    }
155
-
156
-    /**
157
-     * @throws PhpfastcacheInvalidArgumentException
158
-     */
159
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
160
-    {
161
-        $this->assertCacheItemType($item, Item::class);
162
-
163
-        return (bool) $this->instance->del([$item->getKey()]);
164
-    }
165
-
166
-    protected function driverClear(): bool
167
-    {
168
-        return 'OK' === $this->instance->flushdb()->getPayload();
169
-    }
170
-
171
-    public function getConfig(): Config
172
-    {
173
-        return $this->config;
174
-    }
175
-}
Please login to merge, or discard this patch.
Braces   -128 removed lines patch added patch discarded remove patch
@@ -45,131 +45,3 @@
 block discarded – undo
45 45
     public function getHelp(): string
46 46
     {
47 47
         return <<<'HELP'
48
-            <p>
49
-            To install the Predis library via Composer:
50
-            <code>composer require "predis/predis" "~1.1.0"</code>
51
-            </p>
52
-            HELP;
53
-    }
54
-
55
-    public function getStats(): DriverStatistic
56
-    {
57
-        $info = $this->instance->info();
58
-        $size = ($info['Memory']['used_memory'] ?? 0);
59
-        $version = ($info['Server']['redis_version'] ?? 0);
60
-        $date = (isset($info['Server']['uptime_in_seconds']) ? (new DateTimeImmutable())->setTimestamp(time() - $info['Server']['uptime_in_seconds']) : 'unknown date');
61
-
62
-        return (new DriverStatistic())
63
-            ->setData(implode(', ', array_keys($this->itemInstances)))
64
-            ->setRawData($info)
65
-            ->setSize((int) $size)
66
-            ->setInfo(
67
-                sprintf(
68
-                    "The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
69
-                    $version,
70
-                    $date->format(\DATE_RFC2822)
71
-                )
72
-            );
73
-    }
74
-
75
-    /**
76
-     * @throws PhpfastcacheDriverException
77
-     * @throws PhpfastcacheLogicException
78
-     */
79
-    protected function driverConnect(): bool
80
-    {
81
-        /*
82
-         * In case of an user-provided
83
-         * Predis client just return here
84
-         */
85
-        if ($this->getConfig()->getPredisClient() instanceof PredisClient) {
86
-            $this->instance = $this->getConfig()->getPredisClient();
87
-            if (!$this->instance->isConnected()) {
88
-                $this->instance->connect();
89
-            }
90
-
91
-            return true;
92
-        }
93
-
94
-        $options = [];
95
-
96
-        if ($this->getConfig()->getOptPrefix()) {
97
-            $options['prefix'] = $this->getConfig()->getOptPrefix();
98
-        }
99
-
100
-        if (!empty($this->getConfig()->getPath())) {
101
-            $this->instance = new PredisClient(
102
-                [
103
-                    'scheme' => $this->getConfig()->getScheme(),
104
-                    'persistent' => $this->getConfig()->isPersistent(),
105
-                    'timeout' => $this->getConfig()->getTimeout(),
106
-                    'path' => $this->getConfig()->getPath(),
107
-                ],
108
-                $options
109
-            );
110
-        } else {
111
-            $this->instance = new PredisClient($this->getConfig()->getPredisConfigArray(), $options);
112
-        }
113
-
114
-        try {
115
-            $this->instance->connect();
116
-        } catch (PredisConnectionException $e) {
117
-            throw new PhpfastcacheDriverException('Failed to connect to predis server. Check the Predis documentation: https://github.com/nrk/predis/tree/v1.1#how-to-install-and-use-predis', 0, $e);
118
-        }
119
-
120
-        return true;
121
-    }
122
-
123
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
124
-    {
125
-        $val = $this->instance->get($item->getKey());
126
-        if (false == $val) {
127
-            return null;
128
-        }
129
-
130
-        return $this->decode($val);
131
-    }
132
-
133
-    /**
134
-     * @throws PhpfastcacheInvalidArgumentException
135
-     * @throws PhpfastcacheLogicException
136
-     *
137
-     * @return mixed
138
-     */
139
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
140
-    {
141
-        $this->assertCacheItemType($item, Item::class);
142
-
143
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
144
-
145
-        /*
146
-         * @see https://redis.io/commands/setex
147
-         * @see https://redis.io/commands/expire
148
-         */
149
-        if ($ttl <= 0) {
150
-            return (bool) $this->instance->expire($item->getKey(), 0);
151
-        }
152
-
153
-        return 'OK' === $this->instance->setex($item->getKey(), $ttl, $this->encode($this->driverPreWrap($item)))->getPayload();
154
-    }
155
-
156
-    /**
157
-     * @throws PhpfastcacheInvalidArgumentException
158
-     */
159
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
160
-    {
161
-        $this->assertCacheItemType($item, Item::class);
162
-
163
-        return (bool) $this->instance->del([$item->getKey()]);
164
-    }
165
-
166
-    protected function driverClear(): bool
167
-    {
168
-        return 'OK' === $this->instance->flushdb()->getPayload();
169
-    }
170
-
171
-    public function getConfig(): Config
172
-    {
173
-        return $this->config;
174
-    }
175
-}
Please login to merge, or discard this patch.
Upper-Lower-Casing   -128 removed lines patch added patch discarded remove patch
@@ -45,131 +45,3 @@
 block discarded – undo
45 45
     public function getHelp(): string
46 46
     {
47 47
         return <<<'HELP'
48
-            <p>
49
-            To install the Predis library via Composer:
50
-            <code>composer require "predis/predis" "~1.1.0"</code>
51
-            </p>
52
-            HELP;
53
-    }
54
-
55
-    public function getStats(): DriverStatistic
56
-    {
57
-        $info = $this->instance->info();
58
-        $size = ($info['Memory']['used_memory'] ?? 0);
59
-        $version = ($info['Server']['redis_version'] ?? 0);
60
-        $date = (isset($info['Server']['uptime_in_seconds']) ? (new DateTimeImmutable())->setTimestamp(time() - $info['Server']['uptime_in_seconds']) : 'unknown date');
61
-
62
-        return (new DriverStatistic())
63
-            ->setData(implode(', ', array_keys($this->itemInstances)))
64
-            ->setRawData($info)
65
-            ->setSize((int) $size)
66
-            ->setInfo(
67
-                sprintf(
68
-                    "The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
69
-                    $version,
70
-                    $date->format(\DATE_RFC2822)
71
-                )
72
-            );
73
-    }
74
-
75
-    /**
76
-     * @throws PhpfastcacheDriverException
77
-     * @throws PhpfastcacheLogicException
78
-     */
79
-    protected function driverConnect(): bool
80
-    {
81
-        /*
82
-         * In case of an user-provided
83
-         * Predis client just return here
84
-         */
85
-        if ($this->getConfig()->getPredisClient() instanceof PredisClient) {
86
-            $this->instance = $this->getConfig()->getPredisClient();
87
-            if (!$this->instance->isConnected()) {
88
-                $this->instance->connect();
89
-            }
90
-
91
-            return true;
92
-        }
93
-
94
-        $options = [];
95
-
96
-        if ($this->getConfig()->getOptPrefix()) {
97
-            $options['prefix'] = $this->getConfig()->getOptPrefix();
98
-        }
99
-
100
-        if (!empty($this->getConfig()->getPath())) {
101
-            $this->instance = new PredisClient(
102
-                [
103
-                    'scheme' => $this->getConfig()->getScheme(),
104
-                    'persistent' => $this->getConfig()->isPersistent(),
105
-                    'timeout' => $this->getConfig()->getTimeout(),
106
-                    'path' => $this->getConfig()->getPath(),
107
-                ],
108
-                $options
109
-            );
110
-        } else {
111
-            $this->instance = new PredisClient($this->getConfig()->getPredisConfigArray(), $options);
112
-        }
113
-
114
-        try {
115
-            $this->instance->connect();
116
-        } catch (PredisConnectionException $e) {
117
-            throw new PhpfastcacheDriverException('Failed to connect to predis server. Check the Predis documentation: https://github.com/nrk/predis/tree/v1.1#how-to-install-and-use-predis', 0, $e);
118
-        }
119
-
120
-        return true;
121
-    }
122
-
123
-    protected function driverRead(ExtendedCacheItemInterface $item): ?array
124
-    {
125
-        $val = $this->instance->get($item->getKey());
126
-        if (false == $val) {
127
-            return null;
128
-        }
129
-
130
-        return $this->decode($val);
131
-    }
132
-
133
-    /**
134
-     * @throws PhpfastcacheInvalidArgumentException
135
-     * @throws PhpfastcacheLogicException
136
-     *
137
-     * @return mixed
138
-     */
139
-    protected function driverWrite(ExtendedCacheItemInterface $item): bool
140
-    {
141
-        $this->assertCacheItemType($item, Item::class);
142
-
143
-        $ttl = $item->getExpirationDate()->getTimestamp() - time();
144
-
145
-        /*
146
-         * @see https://redis.io/commands/setex
147
-         * @see https://redis.io/commands/expire
148
-         */
149
-        if ($ttl <= 0) {
150
-            return (bool) $this->instance->expire($item->getKey(), 0);
151
-        }
152
-
153
-        return 'OK' === $this->instance->setex($item->getKey(), $ttl, $this->encode($this->driverPreWrap($item)))->getPayload();
154
-    }
155
-
156
-    /**
157
-     * @throws PhpfastcacheInvalidArgumentException
158
-     */
159
-    protected function driverDelete(ExtendedCacheItemInterface $item): bool
160
-    {
161
-        $this->assertCacheItemType($item, Item::class);
162
-
163
-        return (bool) $this->instance->del([$item->getKey()]);
164
-    }
165
-
166
-    protected function driverClear(): bool
167
-    {
168
-        return 'OK' === $this->instance->flushdb()->getPayload();
169
-    }
170
-
171
-    public function getConfig(): Config
172
-    {
173
-        return $this->config;
174
-    }
175
-}
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Memcached/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
                 $this->instance->setSaslAuthData($server['saslUser'], $server['saslPassword']);
108 108
             }
109 109
             if (!$connected) {
110
-                throw new PhpfastcacheDriverConnectException(sprintf('Failed to connect to memcache host/path "%s".', $server['host'] ?: $server['path'], ));
110
+                throw new PhpfastcacheDriverConnectException(sprintf('Failed to connect to memcache host/path "%s".', $server['host'] ?: $server['path'],));
111 111
             }
112 112
         }
113 113
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Firestore/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
 
121 121
     protected function decodeFirestoreDocument(array $snapshotData): array
122 122
     {
123
-        return array_map(static function ($datum) {
123
+        return array_map(static function($datum) {
124 124
             if ($datum instanceof GoogleTimestamp) {
125 125
                 $date = $datum->get();
126 126
                 if ($date instanceof DateTimeImmutable) {
Please login to merge, or discard this patch.