Completed
Push — 2.0 ( a52f91...c9f4d8 )
by Marco
12:16
created
src/Comodojo/Cache/Traits/GenericManagerTrait.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function clear() {
56 56
 
57
-        if ( $this->align_cache === false && $this->pick_mode < 5) {
57
+        if ( $this->align_cache === false && $this->pick_mode < 5 ) {
58 58
             return $this->selectProvider()->clear();
59 59
         }
60 60
 
61 61
         $result = [];
62 62
 
63
-        foreach ($this->stack as $provider) {
63
+        foreach ( $this->stack as $provider ) {
64 64
 
65 65
             $result[] = $provider[0]->clear();
66 66
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     public function setNamespace($namespace = null) {
74 74
 
75
-        foreach ($this->stack->getAll(false) as $provider) {
75
+        foreach ( $this->stack->getAll(false) as $provider ) {
76 76
             $provider->setNamespace($namespace);
77 77
         }
78 78
 
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
 
85 85
     public function clearNamespace() {
86 86
 
87
-        if ( $this->align_cache === false && $this->pick_mode < 5) {
87
+        if ( $this->align_cache === false && $this->pick_mode < 5 ) {
88 88
             return $this->selectProvider()->clearNamespace();
89 89
         }
90 90
 
91 91
         $result = [];
92 92
 
93
-        foreach ($this->stack->getAll() as $provider) {
93
+        foreach ( $this->stack->getAll() as $provider ) {
94 94
             $result[] = $provider->clearNamespace();
95 95
         }
96 96
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         $stats = [];
104 104
 
105
-        foreach ($this->stack->getAll(false) as $provider) {
105
+        foreach ( $this->stack->getAll(false) as $provider ) {
106 106
             $stats[] = $provider->getStats();
107 107
         }
108 108
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     protected function selectProvider() {
114 114
 
115
-        switch ($this->pick_mode) {
115
+        switch ( $this->pick_mode ) {
116 116
 
117 117
             case 1:
118 118
                 $provider = $this->stack->getFirstProvider();
Please login to merge, or discard this patch.
src/Comodojo/Cache/Traits/BasicCacheItemPoolTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         $items = [];
31 31
 
32
-        foreach ($keys as $key) {
32
+        foreach ( $keys as $key ) {
33 33
 
34 34
             $items[$key] = $this->getItem($key);
35 35
         }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         $result = [];
44 44
 
45
-        foreach ($keys as $key) {
45
+        foreach ( $keys as $key ) {
46 46
 
47 47
             $result[] = $this->deleteItem($key);
48 48
 
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 
71 71
         $active_namespace = $this->getNamespace();
72 72
 
73
-        foreach ($this->queue as $namespace => $queue) {
73
+        foreach ( $this->queue as $namespace => $queue ) {
74 74
 
75 75
             $this->setNamespace($namespace);
76 76
 
77
-            foreach ($queue as $key => $item) {
77
+            foreach ( $queue as $key => $item ) {
78 78
 
79 79
                 $result[] = $this->save($item);
80 80
 
Please login to merge, or discard this patch.
src/Comodojo/Cache/Providers/Filesystem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
                 throw new InvalidCacheArgumentException("Invalid or unspecified cache folder");
37 37
             }
38 38
 
39
-            if ( $cache_folder[strlen($cache_folder)-1] != "/" ) $cache_folder = "$cache_folder/";
39
+            if ( $cache_folder[strlen($cache_folder) - 1] != "/" ) $cache_folder = "$cache_folder/";
40 40
 
41 41
             if ( self::isXattrSupported($cache_folder) ) {
42 42
                 $this->driver = new FilesystemXattrDriver(['cache-folder'=>$cache_folder]);
Please login to merge, or discard this patch.
src/Comodojo/Cache/Providers/Memcached.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function __construct(
33 33
         $server = '127.0.0.1',
34
-        $port=11211,
35
-        $weight=0,
36
-        $persistent_id=null,
37
-        LoggerInterface $logger=null
34
+        $port = 11211,
35
+        $weight = 0,
36
+        $persistent_id = null,
37
+        LoggerInterface $logger = null
38 38
     ) {
39 39
 
40 40
         if ( empty($server) ) {
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $objects = 0;
79 79
 
80
-        foreach ($info as $key => $value) {
80
+        foreach ( $info as $key => $value ) {
81 81
 
82 82
             $objects = max($objects, $value['curr_items']);
83 83
 
Please login to merge, or discard this patch.
src/Comodojo/Cache/Providers/AbstractProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      */
59 59
     public function setLogger(LoggerInterface $logger = null) {
60 60
 
61
-        $this->logger = is_null($logger) ? LogManager::create('cache',false)->getLogger() : $logger;
61
+        $this->logger = is_null($logger) ? LogManager::create('cache', false)->getLogger() : $logger;
62 62
 
63 63
         return $this;
64 64
 
Please login to merge, or discard this patch.
src/Comodojo/Cache/Providers/AbstractEnhancedProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -261,11 +261,11 @@
 block discarded – undo
261 261
 
262 262
         $active_namespace = $this->getNamespace();
263 263
 
264
-        foreach ($this->queue as $namespace => $queue) {
264
+        foreach ( $this->queue as $namespace => $queue ) {
265 265
 
266 266
             $this->setNamespace($namespace);
267 267
 
268
-            foreach ($queue as $key => $item) {
268
+            foreach ( $queue as $key => $item ) {
269 269
 
270 270
                 $result[] = $this->save($item);
271 271
 
Please login to merge, or discard this patch.
src/Comodojo/Cache/Providers/PhpRedis.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
 
32 32
     public function __construct(
33 33
         $server = '127.0.0.1',
34
-        $port=6379,
35
-        $timeout=0,
36
-        LoggerInterface $logger=null
34
+        $port = 6379,
35
+        $timeout = 0,
36
+        LoggerInterface $logger = null
37 37
     ) {
38 38
 
39 39
         if ( empty($server) ) {
Please login to merge, or discard this patch.
src/Comodojo/Cache/Components/AbstractStackManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 
85 85
         if ( $enabled === true ) {
86 86
 
87
-            foreach($this as $id => $provider) $result[$id] = $provider[0];
87
+            foreach ( $this as $id => $provider ) $result[$id] = $provider[0];
88 88
 
89 89
         } else {
90 90
 
91
-            foreach($this->getInnerIterator() as $id => $provider) $result[$id] = $provider[0];
91
+            foreach ( $this->getInnerIterator() as $id => $provider ) $result[$id] = $provider[0];
92 92
 
93 93
         }
94 94
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         $result = [];
167 167
 
168
-        foreach($this as $id => $provider) $result[$id] = $provider[1];
168
+        foreach ( $this as $id => $provider ) $result[$id] = $provider[1];
169 169
 
170 170
         return $result;
171 171
 
Please login to merge, or discard this patch.
src/Comodojo/Cache/Drivers/FilesystemXattr.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         if ( $ttl == null || $ttl == 0 ) {
66 66
             $ttl = 0;
67 67
         } else {
68
-            $ttl = time()+intval($ttl);
68
+            $ttl = time() + intval($ttl);
69 69
         }
70 70
 
71 71
         $cached = @file_put_contents($cacheFile, $value, LOCK_EX);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
         $result = [];
126 126
 
127
-        foreach ($keys as $key) {
127
+        foreach ( $keys as $key ) {
128 128
             $result[$key] = $this->get($key, $namespace);
129 129
         }
130 130
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
         $result = [];
138 138
 
139
-        foreach ($key_values as $key => $value) {
139
+        foreach ( $key_values as $key => $value ) {
140 140
             $result[] = $this->set($key, $namespace, $value, $ttl);
141 141
         }
142 142
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
         $result = [];
150 150
 
151
-        foreach ($keys as $key) {
151
+        foreach ( $keys as $key ) {
152 152
             $result[] = $this->delete($key, $namespace);
153 153
         }
154 154
 
Please login to merge, or discard this patch.