Completed
Push — master ( 097ee4...b7f9bf )
by Lars
02:18
created
src/voku/cache/AdapterMemcached.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,8 +92,8 @@
 block discarded – undo
92 92
   public function set(string $key, $value): bool
93 93
   {
94 94
     // Make sure we are under the proper limit
95
-    if (\strlen($this->memcached->getOption(\Memcached::OPT_PREFIX_KEY) . $key) > 250) {
96
-      throw new InvalidArgumentException('The passed cache key is over 250 bytes:' . print_r($key, true));
95
+    if (\strlen($this->memcached->getOption(\Memcached::OPT_PREFIX_KEY).$key) > 250) {
96
+      throw new InvalidArgumentException('The passed cache key is over 250 bytes:'.print_r($key, true));
97 97
     }
98 98
 
99 99
     return $this->memcached->set($key, $value);
Please login to merge, or discard this patch.
src/voku/cache/CachePsr16.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
   public function delete($key): bool
32 32
   {
33 33
     if (!\is_string($key)) {
34
-      throw new InvalidArgumentException('$key is not a string:' . print_r($key, true));
34
+      throw new InvalidArgumentException('$key is not a string:'.print_r($key, true));
35 35
     }
36 36
 
37 37
     return $this->removeItem($key);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
   public function deleteMultiple($keys): bool
50 50
   {
51 51
     if (!\is_array($keys) && !($keys instanceof \Traversable)) {
52
-      throw new InvalidArgumentException('$keys is not iterable:' . print_r($keys, true));
52
+      throw new InvalidArgumentException('$keys is not iterable:'.print_r($keys, true));
53 53
     }
54 54
 
55 55
     $results = [];
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
   public function getMultiple($keys, $default = null)
94 94
   {
95 95
     if (!\is_array($keys) && !($keys instanceof \Traversable)) {
96
-      throw new InvalidArgumentException('$keys is not iterable:' . print_r($keys, true));
96
+      throw new InvalidArgumentException('$keys is not iterable:'.print_r($keys, true));
97 97
     }
98 98
 
99 99
     $result = [];
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
   public function has($key): bool
122 122
   {
123 123
     if (!\is_string($key)) {
124
-      throw new InvalidArgumentException('$key is not a string:' . print_r($key, true));
124
+      throw new InvalidArgumentException('$key is not a string:'.print_r($key, true));
125 125
     }
126 126
 
127 127
     return $this->existsItem($key);
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
   public function set($key, $value, $ttl = null): bool
144 144
   {
145 145
     if (!\is_string($key)) {
146
-      throw new InvalidArgumentException('$key is not a string:' . print_r($key, true));
146
+      throw new InvalidArgumentException('$key is not a string:'.print_r($key, true));
147 147
     }
148 148
 
149 149
     return $this->setItem($key, $value, $ttl);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
   public function setMultiple($values, $ttl = null): bool
165 165
   {
166 166
     if (!\is_array($values) && !($values instanceof \Traversable)) {
167
-      throw new InvalidArgumentException('$values is not iterable:' . print_r($values, true));
167
+      throw new InvalidArgumentException('$values is not iterable:'.print_r($values, true));
168 168
     }
169 169
 
170 170
     $results = [];
Please login to merge, or discard this patch.
src/voku/cache/AdapterMemcache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
   {
97 97
     // Make sure we are under the proper limit
98 98
     if (\strlen($key) > 250) {
99
-      throw new InvalidArgumentException('The passed cache key is over 250 bytes:' . print_r($key, true));
99
+      throw new InvalidArgumentException('The passed cache key is over 250 bytes:'.print_r($key, true));
100 100
     }
101 101
 
102 102
     return $this->memcache->set($key, $value, $this->getCompressedFlag());
Please login to merge, or discard this patch.
src/voku/cache/AdapterOpCache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
    */
62 62
   protected function getFileName(string $key): string
63 63
   {
64
-    $result = $this->cacheDir . DIRECTORY_SEPARATOR . self::CACHE_FILE_PREFIX . $key . '.php';
64
+    $result = $this->cacheDir.DIRECTORY_SEPARATOR.self::CACHE_FILE_PREFIX.$key.'.php';
65 65
 
66 66
     return $result;
67 67
   }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     $content = '<?php
81 81
     
82 82
     static $data = [
83
-      0 => ' . $content . ',
83
+      0 => ' . $content.',
84 84
     ];
85 85
     
86 86
     $result =& $data;
Please login to merge, or discard this patch.
src/voku/cache/AdapterFileAbstract.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
210 210
   }
211 211
 
212 212
   /**
213
-   * @param $cacheFile
213
+   * @param string $cacheFile
214 214
    *
215 215
    * @return bool
216 216
    */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     $this->serializer = new SerializerIgbinary();
43 43
 
44 44
     if (!$cacheDir) {
45
-      $cacheDir = \realpath(\sys_get_temp_dir()) . '/simple_php_cache';
45
+      $cacheDir = \realpath(\sys_get_temp_dir()).'/simple_php_cache';
46 46
     }
47 47
 
48 48
     $this->cacheDir = (string)$cacheDir;
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
    */
261 261
   protected function getFileName(string $key): string
262 262
   {
263
-    return $this->cacheDir . DIRECTORY_SEPARATOR . self::CACHE_FILE_PREFIX . $key . self::CACHE_FILE_SUBFIX;
263
+    return $this->cacheDir.DIRECTORY_SEPARATOR.self::CACHE_FILE_PREFIX.$key.self::CACHE_FILE_SUBFIX;
264 264
   }
265 265
 
266 266
   /**
Please login to merge, or discard this patch.
src/voku/cache/Cache.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -654,7 +654,7 @@
 block discarded – undo
654 654
    *
655 655
    * @param string                 $key
656 656
    * @param mixed                  $value
657
-   * @param null|int|\DateInterval $ttl
657
+   * @param integer $ttl
658 658
    *
659 659
    * @return bool
660 660
    *
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -306,10 +306,10 @@
 block discarded – undo
306 306
   protected function getTheDefaultPrefix(): string
307 307
   {
308 308
     return ($_SERVER['SERVER_NAME'] ?? '') . '_' .
309
-           ($_SERVER['THEME'] ?? '') . '_' .
310
-           ($_SERVER['STAGE'] ?? '') . '_' .
311
-           ($_SESSION['language'] ?? '') . '_' .
312
-           ($_SESSION['language_extra'] ?? '');
309
+            ($_SERVER['THEME'] ?? '') . '_' .
310
+            ($_SERVER['STAGE'] ?? '') . '_' .
311
+            ($_SESSION['language'] ?? '') . '_' .
312
+            ($_SESSION['language_extra'] ?? '');
313 313
   }
314 314
 
315 315
   /**
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -305,10 +305,10 @@  discard block
 block discarded – undo
305 305
    */
306 306
   protected function getTheDefaultPrefix(): string
307 307
   {
308
-    return ($_SERVER['SERVER_NAME'] ?? '') . '_' .
309
-           ($_SERVER['THEME'] ?? '') . '_' .
310
-           ($_SERVER['STAGE'] ?? '') . '_' .
311
-           ($_SESSION['language'] ?? '') . '_' .
308
+    return ($_SERVER['SERVER_NAME'] ?? '').'_'.
309
+           ($_SERVER['THEME'] ?? '').'_'.
310
+           ($_SERVER['STAGE'] ?? '').'_'.
311
+           ($_SESSION['language'] ?? '').'_'.
312 312
            ($_SESSION['language_extra'] ?? '');
313 313
   }
314 314
 
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
    */
565 565
   protected function calculateStoreKey(string $rawKey): string
566 566
   {
567
-    $str = $this->getPrefix() . $rawKey;
567
+    $str = $this->getPrefix().$rawKey;
568 568
 
569 569
     if ($this->adapter instanceof AdapterFileAbstract) {
570 570
       $str = $this->cleanStoreKey($str);
Please login to merge, or discard this patch.