Completed
Push — master ( aa63cc...34bd6e )
by DEATH
01:35
created
src/EasyCacheTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $cacheKey = self::_getCacheKey($method, $parameters);
26 26
         $expire = $this->getExpire($method);
27
-        $closure = function () use ($method, $parameters) {
27
+        $closure = function() use ($method, $parameters) {
28 28
             return call_user_func_array([$this, $method], $parameters);
29 29
         };
30 30
         try {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      * @param $method
85 85
      * @return bool
86 86
      */
87
-    public function forgetMethodCache($method){
87
+    public function forgetMethodCache($method) {
88 88
         $cacheName = self::_getCacheKeyPrefixLevel2($method) . '*';
89 89
         $redis = Cache::getRedis();
90 90
         $keys = $redis->keys($cacheName);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * get cache level1 prefix
99 99
      * @return string
100 100
      */
101
-    private static function _getCacheKeyPrefixLevel1(){
101
+    private static function _getCacheKeyPrefixLevel1() {
102 102
         return __CLASS__ . ":";
103 103
     }
104 104
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      * @param $method
108 108
      * @return string
109 109
      */
110
-    private static function _getCacheKeyPrefixLevel2($method){
110
+    private static function _getCacheKeyPrefixLevel2($method) {
111 111
         return self::_getCacheKeyPrefixLevel1() . $method . ":";
112 112
     }
113 113
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      * @param $params
118 118
      * @return string
119 119
      */
120
-    private static function _getCacheKey($method, $params){
120
+    private static function _getCacheKey($method, $params) {
121 121
         return self::_getCacheKeyPrefixLevel2($method) . md5(json_encode($params));
122 122
     }
123 123
 
Please login to merge, or discard this patch.