Completed
Push — 2.0 ( 62378f...e1cc41 )
by Marco
04:45
created
src/Comodojo/Cache/Drivers/PhpRedis.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
         $result = [];
177 177
 
178
-        foreach ($keys as $key) {
178
+        foreach ( $keys as $key ) {
179 179
             $result[$key] = $this->get($key, $namespace);
180 180
         }
181 181
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
         $result = [];
190 190
 
191
-        foreach ($key_values as $key => $value) {
191
+        foreach ( $key_values as $key => $value ) {
192 192
             $result[] = $this->set($key, $namespace, $value, $ttl);
193 193
         }
194 194
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
         $result = [];
203 203
 
204
-        foreach ($keys as $key) {
204
+        foreach ( $keys as $key ) {
205 205
             $result[] = $this->delete($key, $namespace);
206 206
         }
207 207
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             $objects = $instance->dbSize();
241 241
             $stats = $instance->info();
242 242
 
243
-        } catch (RedisException $re ) {
243
+        } catch (RedisException $re) {
244 244
 
245 245
             throw $re;
246 246
 
Please login to merge, or discard this patch.
src/Comodojo/Cache/Item.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
     /**
90 90
      * {@inheritdoc}
91 91
      */
92
-    public function expiresAt($expiration=null) {
92
+    public function expiresAt($expiration = null) {
93 93
 
94
-        if (is_null($expiration)) {
94
+        if ( is_null($expiration) ) {
95 95
             $this->expiration = 0;
96 96
         }
97 97
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         }
114 114
 
115 115
         if ( is_numeric($time) ) {
116
-            $this->expiration = new DateTime('now +' . $time . ' seconds');
116
+            $this->expiration = new DateTime('now +'.$time.' seconds');
117 117
         }
118 118
 
119 119
         if ( $time instanceof DateInterval ) {
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
      */
154 154
     public function getTtl() {
155 155
 
156
-        if (is_null($this->expiration)) return null;
156
+        if ( is_null($this->expiration) ) return null;
157 157
 
158
-        if ($this->expiration === 0) return 0;
158
+        if ( $this->expiration === 0 ) return 0;
159 159
 
160 160
         $now = new DateTime("now");
161 161
 
Please login to merge, or discard this patch.
src/Comodojo/SimpleCache/Providers/Filesystem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
                 throw new InvalidSimpleCacheArgumentException("Invalid or unspecified cache folder");
37 37
             }
38 38
 
39
-            if ( $cache_folder[strlen($cache_folder)-1] != "/" ) $cache_folder = "$cache_folder/";
39
+            if ( $cache_folder[strlen($cache_folder) - 1] != "/" ) $cache_folder = "$cache_folder/";
40 40
 
41 41
             if ( self::isXattrSupported($cache_folder) ) {
42 42
                 $this->driver = new FilesystemXattrDriver(['cache-folder'=>$cache_folder]);
Please login to merge, or discard this patch.
src/Comodojo/SimpleCache/Providers/Memcached.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function __construct(
32 32
         $server = '127.0.0.1',
33
-        $port=11211,
34
-        $weight=0,
35
-        $persistent_id=null,
36
-        LoggerInterface $logger=null
33
+        $port = 11211,
34
+        $weight = 0,
35
+        $persistent_id = null,
36
+        LoggerInterface $logger = null
37 37
     ) {
38 38
 
39 39
         if ( empty($server) ) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
         $objects = 0;
78 78
 
79
-        foreach ($info as $key => $value) {
79
+        foreach ( $info as $key => $value ) {
80 80
 
81 81
             $objects = max($objects, $value['curr_items']);
82 82
 
Please login to merge, or discard this patch.
src/Comodojo/SimpleCache/Providers/AbstractProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      */
59 59
     public function setLogger(LoggerInterface $logger = null) {
60 60
 
61
-        $this->logger = is_null($logger) ? LogManager::create('cache',false)->getLogger() : $logger;
61
+        $this->logger = is_null($logger) ? LogManager::create('cache', false)->getLogger() : $logger;
62 62
 
63 63
         return $this;
64 64
 
Please login to merge, or discard this patch.
src/Comodojo/SimpleCache/Providers/AbstractEnhancedProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 
145 145
     public function getMultiple($keys, $default = null) {
146 146
 
147
-        if ( !is_array($keys) && !($keys instanceof Traversable ) ) {
147
+        if ( !is_array($keys) && !($keys instanceof Traversable) ) {
148 148
             throw new InvalidSimpleCacheArgumentException('Invalid keys provided');
149 149
         }
150 150
 
151
-        foreach ($keys as $key) {
151
+        foreach ( $keys as $key ) {
152 152
             if ( KeyValidator::validateKey($key) === false ) {
153 153
                 throw new InvalidSimpleCacheArgumentException('Invalid key provided');
154 154
             }
@@ -174,13 +174,13 @@  discard block
 block discarded – undo
174 174
 
175 175
     public function setMultiple($values, $ttl = null) {
176 176
 
177
-        if ( !is_array($values) && !($values instanceof Traversable ) ) {
177
+        if ( !is_array($values) && !($values instanceof Traversable) ) {
178 178
             throw new InvalidSimpleCacheArgumentException('Invalid keys provided');
179 179
         }
180 180
 
181 181
         $real_values = [];
182 182
 
183
-        foreach ($values as $key => $value) {
183
+        foreach ( $values as $key => $value ) {
184 184
             if ( KeyValidator::validateKey($key) === false ) {
185 185
                 throw new InvalidSimpleCacheArgumentException('Invalid key provided');
186 186
             }
@@ -213,11 +213,11 @@  discard block
 block discarded – undo
213 213
 
214 214
     public function deleteMultiple($keys) {
215 215
 
216
-        if ( !is_array($keys) && !($keys instanceof Traversable ) ) {
216
+        if ( !is_array($keys) && !($keys instanceof Traversable) ) {
217 217
             throw new InvalidSimpleCacheArgumentException('Invalid keys provided');
218 218
         }
219 219
 
220
-        foreach ($keys as $key) {
220
+        foreach ( $keys as $key ) {
221 221
             if ( KeyValidator::validateKey($key) === false ) {
222 222
                 throw new InvalidSimpleCacheArgumentException('Invalid key provided');
223 223
             }
Please login to merge, or discard this patch.
src/Comodojo/SimpleCache/Providers/PhpRedis.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
 
32 32
     public function __construct(
33 33
         $server = '127.0.0.1',
34
-        $port=6379,
35
-        $timeout=0,
36
-        LoggerInterface $logger=null
34
+        $port = 6379,
35
+        $timeout = 0,
36
+        LoggerInterface $logger = null
37 37
     ) {
38 38
 
39 39
         if ( empty($server) ) {
Please login to merge, or discard this patch.
src/Comodojo/Cache/Providers/Filesystem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
                 throw new InvalidSimpleCacheArgumentException("Invalid or unspecified cache folder");
37 37
             }
38 38
 
39
-            if ( $cache_folder[strlen($cache_folder)-1] != "/" ) $cache_folder = "$cache_folder/";
39
+            if ( $cache_folder[strlen($cache_folder) - 1] != "/" ) $cache_folder = "$cache_folder/";
40 40
 
41 41
             if ( self::isXattrSupported($cache_folder) ) {
42 42
                 $this->driver = new FilesystemXattrDriver(['cache-folder'=>$cache_folder]);
Please login to merge, or discard this patch.
src/Comodojo/Cache/Providers/Memcached.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function __construct(
32 32
         $server = '127.0.0.1',
33
-        $port=11211,
34
-        $weight=0,
35
-        $persistent_id=null,
36
-        LoggerInterface $logger=null
33
+        $port = 11211,
34
+        $weight = 0,
35
+        $persistent_id = null,
36
+        LoggerInterface $logger = null
37 37
     ) {
38 38
 
39 39
         if ( empty($server) ) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
         $objects = 0;
78 78
 
79
-        foreach ($info as $key => $value) {
79
+        foreach ( $info as $key => $value ) {
80 80
 
81 81
             $objects = max($objects, $value['curr_items']);
82 82
 
Please login to merge, or discard this patch.