Completed
Push — master ( d76060...0f8b35 )
by Mehmet
04:31 queued 02:13
created
src/RedisCache.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 class RedisCache implements CacheInterface
10 10
 {
11
-    const PSR16_RESERVED_CHARACTERS = ['{','}','(',')','/','@',':'];
11
+    const PSR16_RESERVED_CHARACTERS = ['{', '}', '(', ')', '/', '@', ':'];
12 12
 
13 13
     private $handler = null;
14 14
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * {@inheritDoc}
38 38
      */
39
-    public function get($key, $default=null)
39
+    public function get($key, $default = null)
40 40
     {
41 41
         $value = $this->handler->get($key);
42 42
         return $value ? $this->unserialize($value) : $default;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         $ttl = (int) $ttl;
51 51
         $value = $this->serialize($value);
52
-        if($ttl === 0 ){
52
+        if ($ttl === 0) {
53 53
             return $this->handler->set($key, $value);
54 54
         }
55 55
         return $this->handler->set($key, $value, $ttl);
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
     /**
82 82
      * {@inheritDoc}
83 83
      */
84
-    public function getMultiple($keys, $default=null)
84
+    public function getMultiple($keys, $default = null)
85 85
     {
86 86
         $defaults = array_fill(0, count($keys), $default);
87
-        foreach ($keys as $key){
87
+        foreach ($keys as $key) {
88 88
             $this->checkReservedCharacters($key);
89 89
         }
90 90
         return array_merge(array_combine($keys, $this->handler->mGet($keys)), $defaults);
@@ -94,16 +94,16 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function setMultiple($values, $ttl = null)
96 96
     {
97
-        foreach ($values as $key => $value){
97
+        foreach ($values as $key => $value) {
98 98
             $this->checkReservedCharacters($key);
99 99
         }
100 100
         if (($ttl === null) || ($ttl === 0)) {
101 101
             return $this->handler->mSet($values);
102 102
         }
103 103
 
104
-        $return =[];
104
+        $return = [];
105 105
         foreach ($values as $key=>$value) {
106
-            $return[$key] =  $this->set($key, $value, $ttl);
106
+            $return[$key] = $this->set($key, $value, $ttl);
107 107
         }
108 108
         return $return;
109 109
     }
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function deleteMultiple($keys)
114 114
     {
115
-        foreach ($keys as $key){
115
+        foreach ($keys as $key) {
116 116
             $this->checkReservedCharacters($key);
117 117
         }
118
-        $return =[];
118
+        $return = [];
119 119
         foreach ($keys as $key) {
120 120
             $return[$key] = (bool) $this->delete($key);
121 121
         }
Please login to merge, or discard this patch.