Passed
Push — develop ( 25c682...8aee5f )
by nguereza
15:32 queued 02:10
created
src/Storage/LocalStorage.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,10 +63,10 @@
 block discarded – undo
63 63
  */
64 64
 class LocalStorage extends AbstractStorage
65 65
 {
66
-     /**
67
-     * The directory to use to save cache files
68
-     * @var DirectoryInterface
69
-     */
66
+        /**
67
+         * The directory to use to save cache files
68
+         * @var DirectoryInterface
69
+         */
70 70
     protected DirectoryInterface $directory;
71 71
 
72 72
     /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * @class LocalStorage
61 61
  * @package Platine\Cache\Storage
62 62
  */
63
-class LocalStorage extends AbstractStorage
64
-{
63
+class LocalStorage extends AbstractStorage {
65 64
      /**
66 65
      * The directory to use to save cache files
67 66
      * @var DirectoryInterface
@@ -79,8 +78,7 @@  discard block
 block discarded – undo
79 78
      *
80 79
      * {@inheritdoc}
81 80
      */
82
-    public function __construct(Filesystem $filesystem, ?Configuration $config = null)
83
-    {
81
+    public function __construct(Filesystem $filesystem, ?Configuration $config = null) {
84 82
         parent::__construct($config);
85 83
 
86 84
         $this->filesystem = $filesystem;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
     /**
88 88
      * {@inheritdoc}
89 89
      */
90
-    public function set(string $key, mixed $value, int|DateInterval|null $ttl = null): bool
90
+    public function set(string $key, mixed $value, int | DateInterval | null $ttl = null): bool
91 91
     {
92 92
         if ($ttl === null) {
93 93
             $ttl = $this->config->get('ttl');
Please login to merge, or discard this patch.
src/Configuration.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * Class Configuration
53 53
  * @package Platine\Cache
54 54
  */
55
-class Configuration extends AbstractConfiguration
56
-{
55
+class Configuration extends AbstractConfiguration {
57 56
     /**
58 57
      * {@inheritdoc}
59 58
      */
Please login to merge, or discard this patch.
src/Cache.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
     /**
123 123
      * {@inheritdoc}
124 124
      */
125
-    public function set(string $key, mixed $value, int|DateInterval|null $ttl = null): bool
125
+    public function set(string $key, mixed $value, int | DateInterval | null $ttl = null): bool
126 126
     {
127 127
         $this->validateKey($key);
128 128
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * @class Cache
56 56
  * @package Platine\Cache
57 57
  */
58
-class Cache implements CacheInterface
59
-{
58
+class Cache implements CacheInterface {
60 59
     /**
61 60
      * The cache storage to use
62 61
      * @var StorageInterface
@@ -67,8 +66,7 @@  discard block
 block discarded – undo
67 66
      * Create new instance
68 67
      * @param StorageInterface|null $storage the cache storage to use
69 68
      */
70
-    public function __construct(?StorageInterface $storage = null)
71
-    {
69
+    public function __construct(?StorageInterface $storage = null) {
72 70
         $this->storage = $storage ?? new NullStorage();
73 71
     }
74 72
 
Please login to merge, or discard this patch.
src/Exception/CacheException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * @class CacheException
39 39
  * @package Platine\Cache\Exception
40 40
  */
41
-class CacheException extends Exception
42
-{
41
+class CacheException extends Exception {
43 42
 }
Please login to merge, or discard this patch.
src/Exception/FilesystemStorageException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,6 +36,5 @@
 block discarded – undo
36 36
  * @class FilesystemStorageException
37 37
  * @package Platine\Cache\Exception
38 38
  */
39
-class FilesystemStorageException extends CacheException
40
-{
39
+class FilesystemStorageException extends CacheException {
41 40
 }
Please login to merge, or discard this patch.
src/Storage/NullStorage.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
         return false;
75 75
     }
76 76
 
77
-    public function set(string $key, mixed $value, int|DateInterval|null $ttl = null): bool
77
+    public function set(string $key, mixed $value, int | DateInterval | null $ttl = null): bool
78 78
     {
79 79
         return false;
80 80
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class NullStorage
53 53
  * @package Platine\Cache\Storage
54 54
  */
55
-class NullStorage implements StorageInterface
56
-{
55
+class NullStorage implements StorageInterface {
57 56
     public function clear(): bool
58 57
     {
59 58
         return false;
Please login to merge, or discard this patch.
src/Storage/StorageInterface.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
      * @throws CacheException
82 82
      *   MUST be thrown if the $key string is not a legal value.
83 83
      */
84
-    public function set(string $key, mixed $value, int|DateInterval|null $ttl = null): bool;
84
+    public function set(string $key, mixed $value, int | DateInterval | null $ttl = null): bool;
85 85
 
86 86
     /**
87 87
      * Delete an item from the cache by its unique key.
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class StorageInterface
54 54
  * @package Platine\Cache\Storage
55 55
  */
56
-interface StorageInterface
57
-{
56
+interface StorageInterface {
58 57
     /**
59 58
      * Fetches a value from the cache.
60 59
      *
Please login to merge, or discard this patch.
src/Storage/AbstractStorage.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
  * @class AbstractStorage
55 55
  * @package Platine\Cache\Storage
56 56
  */
57
-abstract class AbstractStorage implements StorageInterface
58
-{
57
+abstract class AbstractStorage implements StorageInterface {
59 58
     /**
60 59
      * The cache configuration
61 60
      * @var Configuration
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
      * Create new instance
67 66
      * @param Configuration|null $config
68 67
      */
69
-    public function __construct(?Configuration $config = null)
70
-    {
68
+    public function __construct(?Configuration $config = null) {
71 69
         $this->config = $config ?? new Configuration([]);
72 70
     }
73 71
 
Please login to merge, or discard this patch.
src/Storage/ApcuStorage.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
     /**
88 88
      * {@inheritdoc}
89 89
      */
90
-    public function set(string $key, mixed $value, int|DateInterval|null $ttl = null): bool
90
+    public function set(string $key, mixed $value, int | DateInterval | null $ttl = null): bool
91 91
     {
92 92
         if ($ttl === null) {
93 93
             $ttl = $this->config->get('ttl');
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,15 +55,13 @@
 block discarded – undo
55 55
  * @class ApcuStorage
56 56
  * @package Platine\Cache\Storage
57 57
  */
58
-class ApcuStorage extends AbstractStorage
59
-{
58
+class ApcuStorage extends AbstractStorage {
60 59
     /**
61 60
      * {@inheritdoc}
62 61
      *
63 62
      * Create new instance
64 63
      */
65
-    public function __construct(?Configuration $config = null)
66
-    {
64
+    public function __construct(?Configuration $config = null) {
67 65
         if ((!extension_loaded('apcu')) || !((bool) ini_get('apc.enabled'))) {
68 66
             throw new CacheException('The cache for APCu driver is not available.'
69 67
                             . ' Check if APCu extension is loaded and enabled.');
Please login to merge, or discard this patch.