Completed
Pull Request — master (#6)
by Dan
15:20
created
Tests/Cache/Storage/FileStorageTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
      *
76 76
      */
77 77
     public function testClear(){
78
-       $this->assertEquals($this->cacheStorage->clear(), true);
78
+        $this->assertEquals($this->cacheStorage->clear(), true);
79 79
     }
80 80
 
81 81
     /**
Please login to merge, or discard this patch.
Src/Cache/Storage/FileStorage.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -95,23 +95,23 @@
 block discarded – undo
95 95
      */
96 96
     public function has($key){
97 97
 
98
-       $cacheFile = implode('.',[$key,$this->ext]);
99
-       $cacheLocation = $this->fs . DIRECTORY_SEPARATOR . $cacheFile;
98
+        $cacheFile = implode('.',[$key,$this->ext]);
99
+        $cacheLocation = $this->fs . DIRECTORY_SEPARATOR . $cacheFile;
100 100
 
101
-       if (!file_exists($cacheLocation)){
102
-           return false;
103
-       }
101
+        if (!file_exists($cacheLocation)){
102
+            return false;
103
+        }
104 104
 
105
-       $data = \file_get_contents($cacheLocation);
106
-       $cacheData = json_decode($data, TRUE);
105
+        $data = \file_get_contents($cacheLocation);
106
+        $cacheData = json_decode($data, TRUE);
107 107
 
108
-       //cache has expired
109
-       if ($cacheData[0] < time() ){
110
-           \unlink($cacheLocation);
111
-           return false;
112
-       }
108
+        //cache has expired
109
+        if ($cacheData[0] < time() ){
110
+            \unlink($cacheLocation);
111
+            return false;
112
+        }
113 113
 
114
-       return true;
114
+        return true;
115 115
     }
116 116
 
117 117
     /**
Please login to merge, or discard this patch.
Src/Cache/Storage/ApcStorage.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,16 +28,16 @@
 block discarded – undo
28 28
      * @param DateInterval $ttl
29 29
      * @throws CacheException
30 30
      */
31
-   public function __construct(DateInterval $ttl)
32
-   {
33
-       $foundApc = \extension_loaded('apc');
31
+    public function __construct(DateInterval $ttl)
32
+    {
33
+        $foundApc = \extension_loaded('apc');
34 34
 
35
-       if (!$foundApc){
36
-           throw new CacheException('APC Extension not found.');
37
-       }
35
+        if (!$foundApc){
36
+            throw new CacheException('APC Extension not found.');
37
+        }
38 38
 
39
-       parent::__construct($ttl);
40
-   }
39
+        parent::__construct($ttl);
40
+    }
41 41
 
42 42
     /**
43 43
      * Determines whether an item is present in the cache.
Please login to merge, or discard this patch.