Passed
Push — master ( deec7d...495b43 )
by Joao
03:35
created
src/Psr16/NoCacheEngine.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
      * @return bool
81 81
      * @throws \Psr\SimpleCache\InvalidArgumentException
82 82
      *   MUST be thrown if the $key string is not a legal value.
83
-    */
83
+     */
84 84
     public function has($key)
85 85
     {
86 86
         return false;
Please login to merge, or discard this patch.
src/Psr16/ShmopCacheEngine.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      */
74 74
     public function get($key, $default = null)
75 75
     {
76
-       if ($default === false) {
76
+        if ($default === false) {
77 77
             $this->logger->info("[Shmop Cache] Ignored  $key because TTL=FALSE");
78 78
             return $default;
79 79
         }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     protected function getFilenameToken($key)
48 48
     {
49
-        return sys_get_temp_dir() . '/shmop-' . sha1($key) . '.cache';
49
+        return sys_get_temp_dir().'/shmop-'.sha1($key).'.cache';
50 50
     }
51 51
     
52 52
     protected function getMaxSize()
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $size = strlen($serialized);
139 139
 
140 140
         if ($size > $this->getMaxSize()) {
141
-            throw new StorageErrorException('Object is greater than the max size allowed: ' . $this->getMaxSize());
141
+            throw new StorageErrorException('Object is greater than the max size allowed: '.$this->getMaxSize());
142 142
         }
143 143
 
144 144
         $file = $this->getFilenameToken($key);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
     public function clear()
211 211
     {
212
-        $patternKey = sys_get_temp_dir() . '/shmop-*.cache';
212
+        $patternKey = sys_get_temp_dir().'/shmop-*.cache';
213 213
         $list = glob($patternKey);
214 214
         foreach ($list as $file) {
215 215
             $this->deleteFromFilenameToken($file);
Please login to merge, or discard this patch.
src/Psr16/SessionCacheEngine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
     protected function keyName($key)
29 29
     {
30
-        return $this->prefix . '-' . $key;
30
+        return $this->prefix.'-'.$key;
31 31
     }
32 32
 
33 33
     public function get($key, $default = null)
Please login to merge, or discard this patch.
src/Psr6/CacheItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
     {
93 93
         $this->expiration = new DateTime('now +1 year');
94 94
         if (is_numeric($time)) {
95
-            $this->expiration = new DateTime('now +' . $time . ' seconds');
95
+            $this->expiration = new DateTime('now +'.$time.' seconds');
96 96
         } else if ($time instanceof DateInterval) {
97 97
             $expiration = new DateTime();
98 98
             $expiration->add($time);
Please login to merge, or discard this patch.
src/Psr16/MemcachedEngine.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     }
36 36
 
37 37
     protected function fixKey($key) {
38
-        return "cache-" . $key;
38
+        return "cache-".$key;
39 39
     }
40 40
 
41 41
     /**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
         $value = $this->memCached->get($this->fixKey($key));
71 71
         if ($this->memCached->getResultCode() !== Memcached::RES_SUCCESS) {
72
-            $this->logger->info("[Memcached] Cache '$key' missed with status " . $this->memCached->getResultCode());
72
+            $this->logger->info("[Memcached] Cache '$key' missed with status ".$this->memCached->getResultCode());
73 73
             return $default;
74 74
         }
75 75
 
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
         $this->lazyLoadMemCachedServers();
89 89
 
90 90
         $this->memCached->set($this->fixKey($key), serialize($value), is_null($ttl) ? 0 : $ttl);
91
-        $this->logger->info("[Memcached] Set '$key' result " . $this->memCached->getResultCode());
91
+        $this->logger->info("[Memcached] Set '$key' result ".$this->memCached->getResultCode());
92 92
         if ($this->memCached->getResultCode() !== Memcached::RES_SUCCESS) {
93
-            $this->logger->error("[Memcached] Set '$key' failed with status " . $this->memCached->getResultCode());
93
+            $this->logger->error("[Memcached] Set '$key' failed with status ".$this->memCached->getResultCode());
94 94
         }
95 95
 
96 96
         return $this->memCached->getResultCode() === Memcached::RES_SUCCESS;
Please login to merge, or discard this patch.
src/Psr16/FileSystemCacheEngine.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         // Check if file is Locked
37 37
         $fileKey = $this->fixKey($key);
38
-        $lockFile = $fileKey . ".lock";
38
+        $lockFile = $fileKey.".lock";
39 39
         if (file_exists($lockFile)) {
40 40
             $this->logger->info("[Filesystem cache] Locked! $key. Waiting...");
41 41
             $lockTime = filemtime($lockFile);
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
 
105 105
             $validUntil = $this->addToNow($ttl);
106 106
             if (!empty($validUntil)) {
107
-                file_put_contents($fileKey . ".ttl", $validUntil);
107
+                file_put_contents($fileKey.".ttl", $validUntil);
108 108
             }
109 109
         } catch (Exception $ex) {
110
-            $this->logger->warning("[Filesystem cache] I could not write to cache on file '" . basename($key) . "'. Switching to nocache=true mode.");
110
+            $this->logger->warning("[Filesystem cache] I could not write to cache on file '".basename($key)."'. Switching to nocache=true mode.");
111 111
             return false;
112 112
         }
113 113
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     {
134 134
         $this->logger->info("[Filesystem cache] Lock '$key'");
135 135
 
136
-        $lockFile = $this->fixKey($key) . ".lock";
136
+        $lockFile = $this->fixKey($key).".lock";
137 137
 
138 138
         try {
139 139
             file_put_contents($lockFile, date('c'));
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
         $this->logger->info("[Filesystem cache] Unlock '$key'");
153 153
 
154
-        $lockFile = $this->fixKey($key) . ".lock";
154
+        $lockFile = $this->fixKey($key).".lock";
155 155
 
156 156
         if (file_exists($lockFile)) {
157 157
             unlink($lockFile);
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
 
166 166
     protected function fixKey($key)
167 167
     {
168
-        return $this->path . '/'
168
+        return $this->path.'/'
169 169
             . $this->prefix
170
-            . '-' . preg_replace("/[\/\\\]/", "#", $key)
170
+            . '-'.preg_replace("/[\/\\\]/", "#", $key)
171 171
             . '.cache';
172 172
     }
173 173
 
Please login to merge, or discard this patch.