Completed
Push — final ( 2c495c...348f76 )
by Georges
07:33 queued 03:45
created
src/phpFastCache/Drivers/memcached.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
 
65 65
     /**
66
-     * @return bool
66
+     * @return false|null
67 67
      */
68 68
     public function connectServer()
69 69
     {
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $s = $this->config[ 'memcache' ];
75 75
         if (count($s) < 1) {
76 76
             $s = array(
77
-              array('127.0.0.1', 11211, 100),
77
+                array('127.0.0.1', 11211, 100),
78 78
             );
79 79
         }
80 80
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 try {
88 88
                     if ($sharing > 0) {
89 89
                         if (!$this->instant->addServer($name, $port,
90
-                          $sharing)
90
+                            $sharing)
91 91
                         ) {
92 92
                             $this->fallback = true;
93 93
                         }
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
     {
169 169
         $this->connectServer();
170 170
         $res = array(
171
-          'info' => '',
172
-          'size' => '',
173
-          'data' => $this->instant->getStats(),
171
+            'info' => '',
172
+            'size' => '',
173
+            'data' => $this->instant->getStats(),
174 174
         );
175 175
 
176 176
         return $res;
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $this->setup($config);
39 39
 
40
-        if (!$this->checkdriver() && !isset($config[ 'skipError' ])) {
40
+        if (!$this->checkdriver() && !isset($config['skipError'])) {
41 41
             $this->fallback = true;
42 42
         }
43 43
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             return false;
72 72
         }
73 73
 
74
-        $s = $this->config[ 'memcache' ];
74
+        $s = $this->config['memcache'];
75 75
         if (count($s) < 1) {
76 76
             $s = array(
77 77
               array('127.0.0.1', 11211, 100),
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
         }
80 80
 
81 81
         foreach ($s as $server) {
82
-            $name = isset($server[ 0 ]) ? $server[ 0 ] : '127.0.0.1';
83
-            $port = isset($server[ 1 ]) ? $server[ 1 ] : 11211;
84
-            $sharing = isset($server[ 2 ]) ? $server[ 2 ] : 0;
82
+            $name = isset($server[0]) ? $server[0] : '127.0.0.1';
83
+            $port = isset($server[1]) ? $server[1] : 11211;
84
+            $sharing = isset($server[2]) ? $server[2] : 0;
85 85
             $checked = $name . '_' . $port;
86
-            if (!isset($this->checked[ $checked ])) {
86
+            if (!isset($this->checked[$checked])) {
87 87
                 try {
88 88
                     if ($sharing > 0) {
89 89
                         if (!$this->instant->addServer($name, $port,
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                             $this->fallback = true;
98 98
                         }
99 99
                     }
100
-                    $this->checked[ $checked ] = 1;
100
+                    $this->checked[$checked] = 1;
101 101
                 } catch (\Exception $e) {
102 102
                     $this->fallback = true;
103 103
                 }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $time = time() + $time;
124 124
         }
125 125
 
126
-        if (isset($option[ 'isExisting' ]) && $option[ 'isExisting' ] == true) {
126
+        if (isset($option['isExisting']) && $option['isExisting'] == true) {
127 127
             return $this->instant->add($keyword, $value, $time);
128 128
         } else {
129 129
             return $this->instant->set($keyword, $value, $time);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         // return null if no caching
142 142
         // return value if in caching
143 143
         $this->connectServer();
144
-        $x = @$this->instant->get($keyword);// Prevent memcached to return a warning for long keywords
144
+        $x = @$this->instant->get($keyword); // Prevent memcached to return a warning for long keywords
145 145
         if ($x == false) {
146 146
             return null;
147 147
         } else {
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/sqlite.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 
354 354
     /**
355 355
      * @param $row
356
-     * @return bool
356
+     * @return null|false
357 357
      */
358 358
     public function deleteRow($row)
359 359
     {
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
     /**
373 373
      * @param $keyword
374 374
      * @param array $option
375
-     * @return bool
375
+     * @return null|false
376 376
      */
377 377
     public function driver_delete($keyword, $option = array())
378 378
     {
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -145,12 +145,12 @@  discard block
 block discarded – undo
145 145
             $stm = $this->indexing->prepare("SELECT MAX(`db`) as `db` FROM `balancing`");
146 146
             $stm->execute();
147 147
             $row = $stm->fetch(PDO::FETCH_ASSOC);
148
-            if (!isset($row[ 'db' ])) {
148
+            if (!isset($row['db'])) {
149 149
                 $db = 1;
150
-            } elseif ($row[ 'db' ] <= 1) {
150
+            } elseif ($row['db'] <= 1) {
151 151
                 $db = 1;
152 152
             } else {
153
-                $db = $row[ 'db' ];
153
+                $db = $row['db'];
154 154
             }
155 155
 
156 156
             // check file size
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
           ':keyword' => $keyword,
173 173
         ));
174 174
         $row = $stm->fetch(PDO::FETCH_ASSOC);
175
-        if (isset($row[ 'db' ]) && $row[ 'db' ] != '') {
176
-            $db = $row[ 'db' ];
175
+        if (isset($row['db']) && $row['db'] != '') {
176
+            $db = $row['db'];
177 177
         } else {
178 178
             /*
179 179
              * Insert new to Indexing
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         /**
205 205
          * init instant
206 206
          */
207
-        if (!isset($this->instant[ $instant ])) {
207
+        if (!isset($this->instant[$instant])) {
208 208
             // check DB Files ready or not
209 209
             $createTable = false;
210 210
             if (!file_exists($this->path . '/db' . $instant) || $reset == true) {
@@ -217,12 +217,12 @@  discard block
 block discarded – undo
217 217
                 $this->initDB($PDO);
218 218
             }
219 219
 
220
-            $this->instant[ $instant ] = $PDO;
220
+            $this->instant[$instant] = $PDO;
221 221
             unset($PDO);
222 222
 
223 223
         }
224 224
 
225
-        return $this->instant[ $instant ];
225
+        return $this->instant[$instant];
226 226
     }
227 227
 
228 228
     /**
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
       $time = 300,
252 252
       $option = array()
253 253
     ) {
254
-        $skipExisting = isset($option[ 'skipExisting' ]) ? $option[ 'skipExisting' ] : false;
254
+        $skipExisting = isset($option['skipExisting']) ? $option['skipExisting'] : false;
255 255
         $toWrite = true;
256 256
 
257 257
         // check in cache first
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
                 $stm->execute(array(
273 273
                   ':keyword' => $keyword,
274 274
                   ':object' => $this->encode($value),
275
-                  ':exp' => time() + (int)$time,
275
+                  ':exp' => time() + (int) $time,
276 276
                 ));
277 277
 
278 278
                 return true;
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                     $stm->execute(array(
285 285
                       ':keyword' => $keyword,
286 286
                       ':object' => $this->encode($value),
287
-                      ':exp' => time() + (int)$time,
287
+                      ':exp' => time() + (int) $time,
288 288
                     ));
289 289
                 } catch (PDOException $e) {
290 290
                     return false;
@@ -330,8 +330,8 @@  discard block
 block discarded – undo
330 330
             return null;
331 331
         }
332 332
 
333
-        if (isset($row[ 'id' ])) {
334
-            $data = $this->decode($row[ 'object' ]);
333
+        if (isset($row['id'])) {
334
+            $data = $this->decode($row['object']);
335 335
             return $data;
336 336
         }
337 337
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
      */
345 345
     public function isExpired($row)
346 346
     {
347
-        if (isset($row[ 'exp' ]) && time() >= $row[ 'exp' ]) {
347
+        if (isset($row['exp']) && time() >= $row['exp']) {
348 348
             return true;
349 349
         }
350 350
 
@@ -358,10 +358,10 @@  discard block
 block discarded – undo
358 358
     public function deleteRow($row)
359 359
     {
360 360
         try {
361
-            $stm = $this->db($row[ 'keyword' ])
361
+            $stm = $this->db($row['keyword'])
362 362
               ->prepare("DELETE FROM `caching` WHERE (`id`=:id) OR (`exp` <= :U) ");
363 363
             $stm->execute(array(
364
-              ':id' => $row[ 'id' ],
364
+              ':id' => $row['id'],
365 365
               ':U' => time(),
366 366
             ));
367 367
         } catch (PDOException $e) {
@@ -431,8 +431,8 @@  discard block
 block discarded – undo
431 431
 
432 432
             }
433 433
         }
434
-        $res[ 'size' ] = $optimized;
435
-        $res[ 'info' ] = array(
434
+        $res['size'] = $optimized;
435
+        $res['info'] = array(
436 436
           'total before removing expired entries [bytes]' => $total,
437 437
           'optimized after removing expired entries [bytes]' => $optimized,
438 438
         );
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
               ':keyword' => $keyword,
473 473
             ));
474 474
             $data = $stm->fetch(PDO::FETCH_ASSOC);
475
-            if ($data[ 'total' ] >= 1) {
475
+            if ($data['total'] >= 1) {
476 476
                 return true;
477 477
             } else {
478 478
                 return false;
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
             $PDO = new PDO("sqlite:" . $this->path . '/' . self::INDEXING_FILE);
134 134
             $PDO->setAttribute(PDO::ATTR_ERRMODE,
135
-              PDO::ERRMODE_EXCEPTION);
135
+                PDO::ERRMODE_EXCEPTION);
136 136
 
137 137
             if ($createTable == true) {
138 138
                 $this->initIndexing($PDO);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         // look for keyword
168 168
         $stm = $this->indexing->prepare("SELECT * FROM `balancing` WHERE `keyword`=:keyword LIMIT 1");
169 169
         $stm->execute(array(
170
-          ':keyword' => $keyword,
170
+            ':keyword' => $keyword,
171 171
         ));
172 172
         $row = $stm->fetch(PDO::FETCH_ASSOC);
173 173
         if (isset($row[ 'db' ]) && $row[ 'db' ] != '') {
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
             $db = $this->currentDB;
180 180
             $stm = $this->indexing->prepare("INSERT INTO `balancing` (`keyword`,`db`) VALUES(:keyword, :db)");
181 181
             $stm->execute(array(
182
-              ':keyword' => $keyword,
183
-              ':db' => $db,
182
+                ':keyword' => $keyword,
183
+                ':db' => $db,
184 184
             ));
185 185
         }
186 186
 
@@ -244,10 +244,10 @@  discard block
 block discarded – undo
244 244
      * @return bool
245 245
      */
246 246
     public function driver_set(
247
-      $keyword,
248
-      $value = '',
249
-      $time = 300,
250
-      $option = array()
247
+        $keyword,
248
+        $value = '',
249
+        $time = 300,
250
+        $option = array()
251 251
     ) {
252 252
         $skipExisting = isset($option[ 'skipExisting' ]) ? $option[ 'skipExisting' ] : false;
253 253
         $toWrite = true;
@@ -266,11 +266,11 @@  discard block
 block discarded – undo
266 266
         if ($toWrite == true) {
267 267
             try {
268 268
                 $stm = $this->db($keyword)
269
-                  ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
269
+                    ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
270 270
                 $stm->execute(array(
271
-                  ':keyword' => $keyword,
272
-                  ':object' => $this->encode($value),
273
-                  ':exp' => time() + (int)$time,
271
+                    ':keyword' => $keyword,
272
+                    ':object' => $this->encode($value),
273
+                    ':exp' => time() + (int)$time,
274 274
                 ));
275 275
 
276 276
                 return true;
@@ -278,11 +278,11 @@  discard block
 block discarded – undo
278 278
 
279 279
                 try {
280 280
                     $stm = $this->db($keyword, true)
281
-                      ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
281
+                        ->prepare("INSERT OR REPLACE INTO `caching` (`keyword`,`object`,`exp`) values(:keyword,:object,:exp)");
282 282
                     $stm->execute(array(
283
-                      ':keyword' => $keyword,
284
-                      ':object' => $this->encode($value),
285
-                      ':exp' => time() + (int)$time,
283
+                        ':keyword' => $keyword,
284
+                        ':object' => $this->encode($value),
285
+                        ':exp' => time() + (int)$time,
286 286
                     ));
287 287
                 } catch (PDOException $e) {
288 288
                     return false;
@@ -303,18 +303,18 @@  discard block
 block discarded – undo
303 303
         // return value if in caching
304 304
         try {
305 305
             $stm = $this->db($keyword)
306
-              ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
306
+                ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
307 307
             $stm->execute(array(
308
-              ':keyword' => $keyword,
308
+                ':keyword' => $keyword,
309 309
             ));
310 310
             $row = $stm->fetch(PDO::FETCH_ASSOC);
311 311
 
312 312
         } catch (PDOException $e) {
313 313
             try {
314 314
                 $stm = $this->db($keyword, true)
315
-                  ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
315
+                    ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
316 316
                 $stm->execute(array(
317
-                  ':keyword' => $keyword,
317
+                    ':keyword' => $keyword,
318 318
                 ));
319 319
                 $row = $stm->fetch(PDO::FETCH_ASSOC);
320 320
             } catch (PDOException $e) {
@@ -357,10 +357,10 @@  discard block
 block discarded – undo
357 357
     {
358 358
         try {
359 359
             $stm = $this->db($row[ 'keyword' ])
360
-              ->prepare("DELETE FROM `caching` WHERE (`id`=:id) OR (`exp` <= :U) ");
360
+                ->prepare("DELETE FROM `caching` WHERE (`id`=:id) OR (`exp` <= :U) ");
361 361
             $stm->execute(array(
362
-              ':id' => $row[ 'id' ],
363
-              ':U' => time(),
362
+                ':id' => $row[ 'id' ],
363
+                ':U' => time(),
364 364
             ));
365 365
         } catch (PDOException $e) {
366 366
             return false;
@@ -376,10 +376,10 @@  discard block
 block discarded – undo
376 376
     {
377 377
         try {
378 378
             $stm = $this->db($keyword)
379
-              ->prepare("DELETE FROM `caching` WHERE (`keyword`=:keyword) OR (`exp` <= :U)");
379
+                ->prepare("DELETE FROM `caching` WHERE (`keyword`=:keyword) OR (`exp` <= :U)");
380 380
             $stm->execute(array(
381
-              ':keyword' => $keyword,
382
-              ':U' => time(),
381
+                ':keyword' => $keyword,
382
+                ':U' => time(),
383 383
             ));
384 384
         } catch (PDOException $e) {
385 385
             return false;
@@ -394,9 +394,9 @@  discard block
 block discarded – undo
394 394
     public function driver_stats($option = array())
395 395
     {
396 396
         $res = array(
397
-          'info' => '',
398
-          'size' => '',
399
-          'data' => '',
397
+            'info' => '',
398
+            'size' => '',
399
+            'data' => '',
400 400
         );
401 401
         $total = 0;
402 402
         $optimized = 0;
@@ -411,11 +411,11 @@  discard block
 block discarded – undo
411 411
                 try {
412 412
                     $PDO = new PDO("sqlite:" . $file_path);
413 413
                     $PDO->setAttribute(PDO::ATTR_ERRMODE,
414
-                      PDO::ERRMODE_EXCEPTION);
414
+                        PDO::ERRMODE_EXCEPTION);
415 415
 
416 416
                     $stm = $PDO->prepare("DELETE FROM `caching` WHERE `exp` <= :U");
417 417
                     $stm->execute(array(
418
-                      ':U' => date('U'),
418
+                        ':U' => date('U'),
419 419
                     ));
420 420
 
421 421
                     $PDO->exec('VACUUM;');
@@ -431,8 +431,8 @@  discard block
 block discarded – undo
431 431
         }
432 432
         $res[ 'size' ] = $optimized;
433 433
         $res[ 'info' ] = array(
434
-          'total before removing expired entries [bytes]' => $total,
435
-          'optimized after removing expired entries [bytes]' => $optimized,
434
+            'total before removing expired entries [bytes]' => $total,
435
+            'optimized after removing expired entries [bytes]' => $optimized,
436 436
         );
437 437
 
438 438
         return $res;
@@ -465,9 +465,9 @@  discard block
 block discarded – undo
465 465
     {
466 466
         try {
467 467
             $stm = $this->db($keyword)
468
-              ->prepare("SELECT COUNT(`id`) as `total` FROM `caching` WHERE `keyword`=:keyword");
468
+                ->prepare("SELECT COUNT(`id`) as `total` FROM `caching` WHERE `keyword`=:keyword");
469 469
             $stm->execute(array(
470
-              ':keyword' => $keyword,
470
+                ':keyword' => $keyword,
471 471
             ));
472 472
             $data = $stm->fetch(PDO::FETCH_ASSOC);
473 473
             if ($data[ 'total' ] >= 1) {
Please login to merge, or discard this patch.
examples/memcache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,4 +55,4 @@
 block discarded – undo
55 55
 echo '<br /><br /><a href="/">Back to index</a>&nbsp;--&nbsp;<a href="/' . basename(__FILE__) . '">Reload</a>';
56 56
 
57 57
 // Testing Functions
58
-require_once __DIR__."/TestingFunctions.php";
59 58
\ No newline at end of file
59
+require_once __DIR__ . "/TestingFunctions.php";
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
examples/files.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
 // Setup File Path on your config files
28 28
 CacheManager::setup(array(
29
-   // "path" => sys_get_temp_dir(), // or in windows "C:/tmp/"
29
+    // "path" => sys_get_temp_dir(), // or in windows "C:/tmp/"
30 30
 ));
31 31
 // our unique method of caching, faster than traditional caching which shared everywhere on internet like 7-10 times
32 32
 // reduce high load CPU, reduce I/O from files open
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,4 +58,4 @@
 block discarded – undo
58 58
 echo '<br /><br /><a href="/">Back to index</a>&nbsp;--&nbsp;<a href="/' . basename(__FILE__) . '">Reload</a>';
59 59
 
60 60
 // Testing Functions
61
-require_once __DIR__."/TestingFunctions.php";
61
+require_once __DIR__ . "/TestingFunctions.php";
Please login to merge, or discard this patch.
examples/Search.YourCaching.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
 
37 37
 $keyword1   = "my_apple_keyword";
38 38
 $value1     = "Apple is good";
39
-$cache->set($keyword1,$value1);
39
+$cache->set($keyword1, $value1);
40 40
 
41 41
 
42 42
 $keyword2   = "my_iphone_keyword";
43 43
 $value2     = "Android is better than iphone for sure";
44
-$cache->set($keyword2,$value2);
44
+$cache->set($keyword2, $value2);
45 45
 
46 46
 
47 47
 /// Time for the magic
@@ -86,4 +86,4 @@  discard block
 block discarded – undo
86 86
 echo "<hr>";
87 87
 echo "<b>Testing Tags:</b>";
88 88
 
89
-include_once __DIR__."/Tags.YourCaching.php";
90 89
\ No newline at end of file
90
+include_once __DIR__ . "/Tags.YourCaching.php";
91 91
\ No newline at end of file
Please login to merge, or discard this patch.
examples/global.setup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
 // You can also pass the setup directly to cache
50 50
 $cache = CacheManager::Files($config);
51
-$cache = CacheManager::getInstance("Files",$config);
51
+$cache = CacheManager::getInstance("Files", $config);
52 52
 
53 53
 /**************************************************
54 54
  * Overwrite Caching Driver
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 CacheManager::setup($config);
65 65
 
66 66
 $cache = CacheManager::getInstance(); // return Files Cache
67
-$cache_memcache = CacheManager::Memcached();  // return Files Cache
68
-$cache_apc = CacheManager::Apc();  // return Files Cache
69
-$cache_redis = CacheManager::Redis();  // return Files Cache
67
+$cache_memcache = CacheManager::Memcached(); // return Files Cache
68
+$cache_apc = CacheManager::Apc(); // return Files Cache
69
+$cache_redis = CacheManager::Redis(); // return Files Cache
70 70
 
71 71
 
72 72
 
Please login to merge, or discard this patch.
examples/autoload.Problem.And.Legacy.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
      * All you need is put this line on your config.
8 8
      */
9 9
 
10
-     // In your Setting / Config.php or Index.php
10
+        // In your Setting / Config.php or Index.php
11 11
     define("PHPFASTCACHE_LEGACY",true);
12 12
 
13 13
     // If you use composer, then it auto included our "src/phpFastCache/phpFastCache.php" on vendor folder already, you don't need to do anything else
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
      */
9 9
 
10 10
      // In your Setting / Config.php or Index.php
11
-    define("PHPFASTCACHE_LEGACY",true);
11
+    define("PHPFASTCACHE_LEGACY", true);
12 12
 
13 13
     // If you use composer, then it auto included our "src/phpFastCache/phpFastCache.php" on vendor folder already, you don't need to do anything else
14 14
 
15
-    require_once __DIR__.'/../src/autoload.php';
15
+    require_once __DIR__ . '/../src/autoload.php';
16 16
 
17 17
     // run Files Example
18
-    require_once __DIR__.'/files.php';
18
+    require_once __DIR__ . '/files.php';
19 19
 
20 20
     /*
21 21
      * It also bring back the __c() legacy function
Please login to merge, or discard this patch.
examples/Tags.YourCaching.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
 
41 41
 $keyword1   = "my_apple_keyword";
42 42
 $value1     = "Apple is good";
43
-$cache->set($keyword1,$value1, 300, array("tags"    =>  array("apple","laptop","computer")));
43
+$cache->set($keyword1, $value1, 300, array("tags"    =>  array("apple", "laptop", "computer")));
44 44
 // OR: $cache->setTags($keyword1,$value1,300, array("computer","laptop"));
45 45
 
46 46
 
47 47
 $keyword2   = "my_iphone_keyword";
48 48
 $value2     = "Android is better than iphone for sure";
49
-$cache->setTags($keyword2,$value2, 800, array("apple","cellphone"));
49
+$cache->setTags($keyword2, $value2, 800, array("apple", "cellphone"));
50 50
 
51 51
 
52 52
 /// Time for the magic
53
-$myAppleProducts = $cache->getTags(array("apple","laptop"));
53
+$myAppleProducts = $cache->getTags(array("apple", "laptop"));
54 54
 echo "<pre>";
55 55
 print_r($myAppleProducts);
56 56
 echo "</pre>";
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 
82 82
 /// Just need Keywords & Expired Time, No Caching Contents => put false at end
83
-$myAppleProducts = $cache->getTags(array("apple","laptop"), false);
83
+$myAppleProducts = $cache->getTags(array("apple", "laptop"), false);
84 84
 echo "<pre>";
85 85
 print_r($myAppleProducts);
86 86
 echo "</pre>";
Please login to merge, or discard this patch.
examples/predis.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,4 +58,4 @@
 block discarded – undo
58 58
 echo '<br /><br /><a href="/">Back to index</a>&nbsp;--&nbsp;<a href="/' . basename(__FILE__) . '">Reload</a>';
59 59
 
60 60
 // Testing Functions
61
-require_once __DIR__."/TestingFunctions.php";
61
+require_once __DIR__ . "/TestingFunctions.php";
Please login to merge, or discard this patch.