Completed
Push — master ( b646df...aa63cc )
by DEATH
01:16
created
src/EasyCacheTrait.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
         $expire = $this->getExpire($method);
22 22
 
23
-        $closure = function () use ($method, $parameters) {
23
+        $closure = function() use ($method, $parameters) {
24 24
             return call_user_func_array([$this, $method], $parameters);
25 25
         };
26 26
         try {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             } else {
40 40
                 return $closure();
41 41
             }
42
-        }catch (\Throwable $throwable){
42
+        } catch (\Throwable $throwable) {
43 43
             Log::error($throwable);
44 44
             return $closure();
45 45
         }
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      */
53 53
     private function getExpire($method)
54 54
     {
55
-        $rf = new \ReflectionMethod($this,$method);
55
+        $rf = new \ReflectionMethod($this, $method);
56 56
         $staticVar = $rf->getStaticVariables();
57
-        if (array_key_exists('expire',$staticVar)){
57
+        if (array_key_exists('expire', $staticVar)) {
58 58
             $expire = $staticVar['expire'];
59 59
         } else {
60 60
             $expire = 60;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * delete all cache from the class
68 68
      * TODO support other driver
69 69
      */
70
-    public function forgetCache(){
70
+    public function forgetCache() {
71 71
         $cacheName = __CLASS__ . ':*';
72 72
 
73 73
         $redis = Cache::getRedis();
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             } else {
40 40
                 return $closure();
41 41
             }
42
-        }catch (\Throwable $throwable){
42
+        } catch (\Throwable $throwable){
43 43
             Log::error($throwable);
44 44
             return $closure();
45 45
         }
Please login to merge, or discard this patch.