Completed
Push — final ( 51d756...66f3be )
by Georges
04:30 queued 01:51
created
src/phpFastCache/Drivers/Ssdb/Driver.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
     {
140 140
         try {
141 141
             $server = isset($this->config[ 'ssdb' ]) ? $this->config[ 'ssdb' ] : [
142
-              'host' => "127.0.0.1",
143
-              'port' => 8888,
144
-              'password' => '',
145
-              'timeout' => 2000,
142
+                'host' => "127.0.0.1",
143
+                'port' => 8888,
144
+                'password' => '',
145
+                'timeout' => 2000,
146 146
             ];
147 147
 
148 148
             $host = $server[ 'host' ];
@@ -183,9 +183,9 @@  discard block
 block discarded – undo
183 183
          * using hardcoded offset of pair key-value :-(
184 184
          */
185 185
         $stat->setInfo(sprintf("Ssdb-server v%s with a total of %s call(s).\n For more information see RawData.", $info[ 2 ], $info[ 6 ]))
186
-          ->setRawData($info)
187
-          ->setData(implode(', ', array_keys($this->itemInstances)))
188
-          ->setSize($this->instance->dbsize());
186
+            ->setRawData($info)
187
+            ->setData(implode(', ', array_keys($this->itemInstances)))
188
+            ->setSize($this->instance->dbsize());
189 189
 
190 190
         return $stat;
191 191
     }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -138,17 +138,17 @@  discard block
 block discarded – undo
138 138
     protected function driverConnect()
139 139
     {
140 140
         try {
141
-            $server = isset($this->config[ 'ssdb' ]) ? $this->config[ 'ssdb' ] : [
141
+            $server = isset($this->config['ssdb']) ? $this->config['ssdb'] : [
142 142
               'host' => "127.0.0.1",
143 143
               'port' => 8888,
144 144
               'password' => '',
145 145
               'timeout' => 2000,
146 146
             ];
147 147
 
148
-            $host = $server[ 'host' ];
149
-            $port = isset($server[ 'port' ]) ? (int) $server[ 'port' ] : 8888;
150
-            $password = isset($server[ 'password' ]) ? $server[ 'password' ] : '';
151
-            $timeout = !empty($server[ 'timeout' ]) ? (int) $server[ 'timeout' ] : 2000;
148
+            $host = $server['host'];
149
+            $port = isset($server['port']) ? (int) $server['port'] : 8888;
150
+            $password = isset($server['password']) ? $server['password'] : '';
151
+            $timeout = !empty($server['timeout']) ? (int) $server['timeout'] : 2000;
152 152
             $this->instance = new SimpleSSDB($host, $port, $timeout);
153 153
             if (!empty($password)) {
154 154
                 $this->instance->auth($password);
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
          * Data returned by Ssdb are very poorly formatted
183 183
          * using hardcoded offset of pair key-value :-(
184 184
          */
185
-        $stat->setInfo(sprintf("Ssdb-server v%s with a total of %s call(s).\n For more information see RawData.", $info[ 2 ], $info[ 6 ]))
185
+        $stat->setInfo(sprintf("Ssdb-server v%s with a total of %s call(s).\n For more information see RawData.", $info[2], $info[6]))
186 186
           ->setRawData($info)
187 187
           ->setData(implode(', ', array_keys($this->itemInstances)))
188 188
           ->setSize($this->instance->dbsize());
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Memcached/Driver.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         $servers = (!empty($this->config[ 'memcache' ]) && is_array($this->config[ 'memcache' ]) ? $this->config[ 'memcache' ] : []);
132 132
         if (count($servers) < 1) {
133 133
             $servers = [
134
-              ['127.0.0.1', 11211],
134
+                ['127.0.0.1', 11211],
135 135
             ];
136 136
         }
137 137
 
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
         $date = (new \DateTime())->setTimestamp(time() - $stats[ 'uptime' ]);
162 162
 
163 163
         return (new driverStatistic())
164
-          ->setData(implode(', ', array_keys($this->itemInstances)))
165
-          ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822)))
166
-          ->setRawData($stats)
167
-          ->setSize($stats[ 'bytes' ]);
164
+            ->setData(implode(', ', array_keys($this->itemInstances)))
165
+            ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822)))
166
+            ->setRawData($stats)
167
+            ->setSize($stats[ 'bytes' ]);
168 168
     }
169 169
 }
170 170
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     protected function driverConnect()
129 129
     {
130
-        $servers = (!empty($this->config[ 'memcache' ]) && is_array($this->config[ 'memcache' ]) ? $this->config[ 'memcache' ] : []);
130
+        $servers = (!empty($this->config['memcache']) && is_array($this->config['memcache']) ? $this->config['memcache'] : []);
131 131
         if (count($servers) < 1) {
132 132
             $servers = [
133 133
               ['127.0.0.1', 11211],
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
 
137 137
         foreach ($servers as $server) {
138 138
             try {
139
-                if (!$this->instance->addServer($server[ 0 ], $server[ 1 ])) {
139
+                if (!$this->instance->addServer($server[0], $server[1])) {
140 140
                     $this->fallback = true;
141 141
                 }
142
-                if(!empty($server[ 'sasl_user' ]) && !empty($server[ 'sasl_password'])){
143
-                    $this->instance->setSaslAuthData($server[ 'sasl_user' ], $server[ 'sasl_password']);
142
+                if (!empty($server['sasl_user']) && !empty($server['sasl_password'])) {
143
+                    $this->instance->setSaslAuthData($server['sasl_user'], $server['sasl_password']);
144 144
                 }
145 145
             } catch (\Exception $e) {
146 146
                 $this->fallback = true;
@@ -160,16 +160,16 @@  discard block
 block discarded – undo
160 160
     public function getStats()
161 161
     {
162 162
         $stats = (array) $this->instance->getStats();
163
-        $stats[ 'uptime' ] = (isset($stats[ 'uptime' ]) ? $stats[ 'uptime' ] : 0);
164
-        $stats[ 'version' ] = (isset($stats[ 'version' ]) ? $stats[ 'version' ] : 'UnknownVersion');
165
-        $stats[ 'bytes' ] = (isset($stats[ 'bytes' ]) ? $stats[ 'version' ] : 0);
163
+        $stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0);
164
+        $stats['version'] = (isset($stats['version']) ? $stats['version'] : 'UnknownVersion');
165
+        $stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0);
166 166
 
167
-        $date = (new \DateTime())->setTimestamp(time() - $stats[ 'uptime' ]);
167
+        $date = (new \DateTime())->setTimestamp(time() - $stats['uptime']);
168 168
 
169 169
         return (new driverStatistic())
170 170
           ->setData(implode(', ', array_keys($this->itemInstances)))
171
-          ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822)))
171
+          ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822)))
172 172
           ->setRawData($stats)
173
-          ->setSize($stats[ 'bytes' ]);
173
+          ->setSize($stats['bytes']);
174 174
     }
175 175
 }
176 176
\ No newline at end of file
Please login to merge, or discard this patch.
src/phpFastCache/Proxy/phpFastCacheAbstractProxy.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,9 +74,9 @@
 block discarded – undo
74 74
      */
75 75
     public function __call($name, $args)
76 76
     {
77
-        if(method_exists($this->instance, $name)){
77
+        if (method_exists($this->instance, $name)) {
78 78
             return call_user_func_array([$this->instance, $name], $args);
79
-        }else{
79
+        } else {
80 80
             throw new \BadMethodCallException(sprintf('Method %s does not exists', $name));
81 81
         }
82 82
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@
 block discarded – undo
273 273
         
274 274
         if (!is_dir($path)) {
275 275
             throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94);
276
-        }else{
276
+        } else{
277 277
             $size = Directory::dirSize($path);
278 278
         }
279 279
 
Please login to merge, or discard this patch.
src/phpFastCache/CacheManager.php 3 patches
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
             $class = self::getNamespacePath() . $driver . '\Driver';
96 96
             try{
97 97
                 self::$instances[ $instance ] = new $class($config);
98
-            }catch(phpFastCacheDriverCheckException $e){
98
+            } catch(phpFastCacheDriverCheckException $e){
99 99
                 $fallback = self::standardizeDriverName($config['fallback']);
100 100
                 if($fallback && $fallback !== $driver){
101 101
                     $class = self::getNamespacePath() . $fallback . '\Driver';
102 102
                     self::$instances[ $instance ] = new $class($config);
103 103
                     trigger_error(sprintf('The "%s" driver is unavailable at the moment, the fallback driver "%s" has been used instead.', $driver, $fallback), E_USER_WARNING);
104
-                }else{
104
+                } else{
105 105
                     throw new phpFastCacheDriverCheckException($e->getMessage(), $e->getCode(), $e);
106 106
                 }
107 107
             }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             self::$config = array_merge(self::$config, $name);
199 199
         } else if (is_string($name)){
200 200
             self::$config[ $name ] = $value;
201
-        }else{
201
+        } else{
202 202
             throw new \InvalidArgumentException('Invalid variable type: $name');
203 203
         }
204 204
     }
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
      * @var array
52 52
      */
53 53
     protected static $config = [
54
-      'securityKey' => 'auto',// The securityKey that will be used to create sub-directory
55
-      'defaultTtl' => 900,// Default time-to-live in second
56
-      'htaccess' => true,// Auto-generate .htaccess if tit is missing
54
+      'securityKey' => 'auto', // The securityKey that will be used to create sub-directory
55
+      'defaultTtl' => 900, // Default time-to-live in second
56
+      'htaccess' => true, // Auto-generate .htaccess if tit is missing
57 57
       'default_chmod' => 0777, // 0777 recommended
58
-      'path' => '',// if not set will be the value of sys_get_temp_dir()
58
+      'path' => '', // if not set will be the value of sys_get_temp_dir()
59 59
       'fallback' => false, //Fall back when old driver is not support
60 60
       'limited_memory_each_object' => 4096, // maximum size (bytes) of object store in memory
61 61
       'compress_data' => false, // compress stored data, if the backend supports it
@@ -90,27 +90,27 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         $instance = crc32($driver . serialize($config));
93
-        if (!isset(self::$instances[ $instance ])) {
93
+        if (!isset(self::$instances[$instance])) {
94 94
             $badPracticeOmeter[$driver] = 1;
95 95
             $class = self::getNamespacePath() . $driver . '\Driver';
96
-            try{
97
-                self::$instances[ $instance ] = new $class($config);
98
-            }catch(phpFastCacheDriverCheckException $e){
96
+            try {
97
+                self::$instances[$instance] = new $class($config);
98
+            } catch (phpFastCacheDriverCheckException $e) {
99 99
                 $fallback = self::standardizeDriverName($config['fallback']);
100
-                if($fallback && $fallback !== $driver){
100
+                if ($fallback && $fallback !== $driver) {
101 101
                     $class = self::getNamespacePath() . $fallback . '\Driver';
102
-                    self::$instances[ $instance ] = new $class($config);
102
+                    self::$instances[$instance] = new $class($config);
103 103
                     trigger_error(sprintf('The "%s" driver is unavailable at the moment, the fallback driver "%s" has been used instead.', $driver, $fallback), E_USER_WARNING);
104
-                }else{
104
+                } else {
105 105
                     throw new phpFastCacheDriverCheckException($e->getMessage(), $e->getCode(), $e);
106 106
                 }
107 107
             }
108
-        } else if(++$badPracticeOmeter[$driver] >= 5){
108
+        } else if (++$badPracticeOmeter[$driver] >= 5) {
109 109
            trigger_error('[' . $driver . '] Calling many times CacheManager::getInstance() for already instanced drivers is a bad practice and have a significant impact on performances.
110 110
            See https://github.com/PHPSocialNetwork/phpfastcache/wiki/[V5]-Why-calling-getInstance%28%29-each-time-is-a-bad-practice-%3F');
111 111
         }
112 112
 
113
-        return self::$instances[ $instance ];
113
+        return self::$instances[$instance];
114 114
     }
115 115
 
116 116
     /**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public static function __callStatic($name, $arguments)
145 145
     {
146
-        $options = (array_key_exists(0, $arguments) && is_array($arguments) ? $arguments[ 0 ] : []);
146
+        $options = (array_key_exists(0, $arguments) && is_array($arguments) ? $arguments[0] : []);
147 147
 
148 148
         return self::getInstance($name, $options);
149 149
     }
@@ -198,9 +198,9 @@  discard block
 block discarded – undo
198 198
     {
199 199
         if (is_array($name)) {
200 200
             self::$config = array_merge(self::$config, $name);
201
-        } else if (is_string($name)){
202
-            self::$config[ $name ] = $value;
203
-        }else{
201
+        } else if (is_string($name)) {
202
+            self::$config[$name] = $value;
203
+        } else {
204 204
             throw new \InvalidArgumentException('Invalid variable type: $name');
205 205
         }
206 206
     }
Please login to merge, or discard this patch.
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
      * @var array
58 58
      */
59 59
     protected static $config = [
60
-      'securityKey' => 'auto',// The securityKey that will be used to create sub-directory
61
-      'defaultTtl' => 900,// Default time-to-live in second
62
-      'htaccess' => true,// Auto-generate .htaccess if tit is missing
63
-      'default_chmod' => 0777, // 0777 recommended
64
-      'path' => '',// if not set will be the value of sys_get_temp_dir()
65
-      'fallback' => false, //Fall back when old driver is not support
66
-      'limited_memory_each_object' => 4096, // maximum size (bytes) of object store in memory
67
-      'compress_data' => false, // compress stored data, if the backend supports it
60
+        'securityKey' => 'auto',// The securityKey that will be used to create sub-directory
61
+        'defaultTtl' => 900,// Default time-to-live in second
62
+        'htaccess' => true,// Auto-generate .htaccess if tit is missing
63
+        'default_chmod' => 0777, // 0777 recommended
64
+        'path' => '',// if not set will be the value of sys_get_temp_dir()
65
+        'fallback' => false, //Fall back when old driver is not support
66
+        'limited_memory_each_object' => 4096, // maximum size (bytes) of object store in memory
67
+        'compress_data' => false, // compress stored data, if the backend supports it
68 68
     ];
69 69
 
70 70
     /**
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 }
113 113
             }
114 114
         } else if(++$badPracticeOmeter[$driver] >= 5){
115
-           trigger_error('[' . $driver . '] Calling many times CacheManager::getInstance() for already instanced drivers is a bad practice and have a significant impact on performances.
115
+            trigger_error('[' . $driver . '] Calling many times CacheManager::getInstance() for already instanced drivers is a bad practice and have a significant impact on performances.
116 116
            See https://github.com/PHPSocialNetwork/phpfastcache/wiki/[V5]-Why-calling-getInstance%28%29-each-time-is-a-bad-practice-%3F');
117 117
         }
118 118
 
@@ -223,23 +223,23 @@  discard block
 block discarded – undo
223 223
     public static function getStaticSystemDrivers()
224 224
     {
225 225
         return [
226
-          'Sqlite',
227
-          'Files',
228
-          'Apc',
229
-          'Apcu',
230
-          'Memcache',
231
-          'Memcached',
232
-          'Couchbase',
233
-          'Mongodb',
234
-          'Predis',
235
-          'Redis',
236
-          'Ssdb',
237
-          'Leveldb',
238
-          'Wincache',
239
-          'Xcache',
240
-          'Zenddisk',
241
-          'Zendshm',
242
-          'Devnull',
226
+            'Sqlite',
227
+            'Files',
228
+            'Apc',
229
+            'Apcu',
230
+            'Memcache',
231
+            'Memcached',
232
+            'Couchbase',
233
+            'Mongodb',
234
+            'Predis',
235
+            'Redis',
236
+            'Ssdb',
237
+            'Leveldb',
238
+            'Wincache',
239
+            'Xcache',
240
+            'Zenddisk',
241
+            'Zendshm',
242
+            'Devnull',
243 243
         ];
244 244
     }
245 245
 
Please login to merge, or discard this patch.
src/autoload.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,5 +51,5 @@
 block discarded – undo
51 51
 
52 52
 if (class_exists('Composer\Autoload\ClassLoader')) {
53 53
     trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.',
54
-      E_USER_WARNING);
54
+        E_USER_WARNING);
55 55
 }
56 56
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Register Autoload
20 20
  */
21
-spl_autoload_register(function ($entity) {
21
+spl_autoload_register(function($entity) {
22 22
     $module = explode('\\', $entity, 2);
23
-    if (!in_array($module[ 0 ], ['phpFastCache', 'Psr'])) {
23
+    if (!in_array($module[0], ['phpFastCache', 'Psr'])) {
24 24
         /**
25 25
          * Not a part of phpFastCache file
26 26
          * then we return here.
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         if (is_readable($path)) {
34 34
             require_once $path;
35
-        }else{
35
+        } else {
36 36
             trigger_error('Cannot locate the Psr/Cache files', E_USER_ERROR);
37 37
             return;
38 38
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@
 block discarded – undo
273 273
         
274 274
         if (!is_dir($path)) {
275 275
             throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94);
276
-        }else{
276
+        } else{
277 277
             $size = Directory::dirSize($path);
278 278
         }
279 279
 
Please login to merge, or discard this patch.
tests/Autoload.test.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 if (!class_exists('phpFastCache\CacheManager')) {
19 19
     echo "[FAIL] Autoload failed to find the CacheManager\n";
20 20
     $status = 255;
21
-}else{
21
+} else {
22 22
     echo "[PASS] Autoload successfully found the CacheManager\n";
23 23
 }
24 24
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 if (!interface_exists('Psr\Cache\CacheItemInterface')) {
29 29
     echo "[FAIL] Autoload failed to find the Psr CacheItemInterface\n";
30 30
     $status = 255;
31
-}else{
31
+} else {
32 32
     echo "[PASS] Autoload successfully found the Psr CacheItemInterface\n";
33 33
 }
34 34
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 if (!class_exists('phpFastCache\CacheManager')) {
19 19
     echo "[FAIL] Autoload failed to find the CacheManager\n";
20 20
     $status = 255;
21
-}else{
21
+} else{
22 22
     echo "[PASS] Autoload successfully found the CacheManager\n";
23 23
 }
24 24
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 if (!interface_exists('Psr\Cache\CacheItemInterface')) {
29 29
     echo "[FAIL] Autoload failed to find the Psr CacheItemInterface\n";
30 30
     $status = 255;
31
-}else{
31
+} else{
32 32
     echo "[PASS] Autoload successfully found the Psr CacheItemInterface\n";
33 33
 }
34 34
 
Please login to merge, or discard this patch.
tests/AbstractProxy.test.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@
 block discarded – undo
42 42
 if (!is_object($driverInstance->getItem('test'))) {
43 43
     echo '[FAIL] $driverInstance->getItem() returned an invalid var type:' . gettype($driverInstance) . "\n";
44 44
     $status = 1;
45
-}else if(!($driverInstance->getItem('test') instanceof ExtendedCacheItemInterface)){
45
+} else if (!($driverInstance->getItem('test') instanceof ExtendedCacheItemInterface)) {
46 46
     echo '[FAIL] $driverInstance->getItem() returned an invalid class that does not implements ExtendedCacheItemInterface: ' . get_class($driverInstance) . "\n";
47 47
     $status = 1;
48
-}else{
48
+} else {
49 49
     echo '[PASS] $driverInstance->getItem() returned a valid class that implements ExtendedCacheItemInterface: ' . get_class($driverInstance) . "\n";
50 50
 }
51 51
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@
 block discarded – undo
42 42
 if (!is_object($driverInstance->getItem('test'))) {
43 43
     echo '[FAIL] $driverInstance->getItem() returned an invalid var type:' . gettype($driverInstance) . "\n";
44 44
     $status = 1;
45
-}else if(!($driverInstance->getItem('test') instanceof ExtendedCacheItemInterface)){
45
+} else if(!($driverInstance->getItem('test') instanceof ExtendedCacheItemInterface)){
46 46
     echo '[FAIL] $driverInstance->getItem() returned an invalid class that does not implements ExtendedCacheItemInterface: ' . get_class($driverInstance) . "\n";
47 47
     $status = 1;
48
-}else{
48
+} else{
49 49
     echo '[PASS] $driverInstance->getItem() returned a valid class that implements ExtendedCacheItemInterface: ' . get_class($driverInstance) . "\n";
50 50
 }
51 51
 
Please login to merge, or discard this patch.
src/phpFastCache/Entities/driverStatistic.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     }
53 53
 
54 54
     /**
55
-     * @return int|bool Return size in octet or false if no information available
55
+     * @return string Return size in octet or false if no information available
56 56
      */
57 57
     public function getSize()
58 58
     {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     }
61 61
 
62 62
     /**
63
-     * @return mixed
63
+     * @return string
64 64
      */
65 65
     public function getData()
66 66
     {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     }
69 69
 
70 70
     /**
71
-     * @param $info
71
+     * @param string $info
72 72
      * @return $this
73 73
      */
74 74
     public function setInfo($info)
Please login to merge, or discard this patch.
tests/AttachingDetachingMethods.test.php 2 patches
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 if (!is_object($driverInstance)) {
25 25
     echo '[FAIL] CacheManager::getInstance() returned an invalid variable type:' . gettype($driverInstance) . "\n";
26 26
     $status = 1;
27
-}else if(!($driverInstance instanceof CacheItemPoolInterface)){
27
+} else if(!($driverInstance instanceof CacheItemPoolInterface)){
28 28
     echo '[FAIL] CacheManager::getInstance() returned an invalid class:' . get_class($driverInstance) . "\n";
29 29
     $status = 1;
30
-}else{
30
+} else{
31 31
     $key = 'test_attaching_detaching';
32 32
 
33 33
     $itemDetached = $driverInstance->getItem($key);
@@ -37,8 +37,7 @@  discard block
 block discarded – undo
37 37
     if(!$driverInstance->isAttached($itemDetached))
38 38
     {
39 39
         echo '[PASS] ExtendedCacheItemPoolInterface::isAttached() identified $itemDetached as being detached.' . "\n";
40
-    }
41
-    else
40
+    } else
42 41
     {
43 42
         echo '[FAIL] ExtendedCacheItemPoolInterface::isAttached() failed to identify $itemDetached as to be detached.' . "\n";
44 43
         $status = 1;
@@ -48,7 +47,7 @@  discard block
 block discarded – undo
48 47
         $driverInstance->attachItem($itemDetached);
49 48
         echo '[FAIL] ExtendedCacheItemPoolInterface::attachItem() attached $itemDetached without trowing an error.' . "\n";
50 49
         $status = 1;
51
-    }catch(\LogicException $e){
50
+    } catch(\LogicException $e){
52 51
         echo '[PASS] ExtendedCacheItemPoolInterface::attachItem() failed to attach $itemDetached by trowing a LogicException exception.' . "\n";
53 52
     }
54 53
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,17 +24,17 @@  discard block
 block discarded – undo
24 24
 if (!is_object($driverInstance)) {
25 25
     echo '[FAIL] CacheManager::getInstance() returned an invalid variable type:' . gettype($driverInstance) . "\n";
26 26
     $status = 1;
27
-}else if(!($driverInstance instanceof CacheItemPoolInterface)){
27
+} else if (!($driverInstance instanceof CacheItemPoolInterface)) {
28 28
     echo '[FAIL] CacheManager::getInstance() returned an invalid class:' . get_class($driverInstance) . "\n";
29 29
     $status = 1;
30
-}else{
30
+} else {
31 31
     $key = 'test_attaching_detaching';
32 32
 
33 33
     $itemDetached = $driverInstance->getItem($key);
34 34
     $driverInstance->detachItem($itemDetached);
35 35
     $itemAttached = $driverInstance->getItem($key);
36 36
 
37
-    if($driverInstance->isAttached($itemDetached) !== true)
37
+    if ($driverInstance->isAttached($itemDetached) !== true)
38 38
     {
39 39
         echo '[PASS] ExtendedCacheItemPoolInterface::isAttached() identified $itemDetached as being detached.' . "\n";
40 40
     }
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
         $status = 1;
45 45
     }
46 46
 
47
-    try{
47
+    try {
48 48
         $driverInstance->attachItem($itemDetached);
49 49
         echo '[FAIL] ExtendedCacheItemPoolInterface::attachItem() attached $itemDetached without trowing an error.' . "\n";
50 50
         $status = 1;
51
-    }catch(\LogicException $e){
51
+    } catch (\LogicException $e) {
52 52
         echo '[PASS] ExtendedCacheItemPoolInterface::attachItem() failed to attach $itemDetached by trowing a LogicException exception.' . "\n";
53 53
     }
54 54
 
Please login to merge, or discard this patch.