@@ -20,7 +20,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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(); |
@@ -39,7 +39,7 @@ |
||
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 | } |