| @@ -74,8 +74,7 @@ discard block | ||
| 74 | 74 |          if (self::$isEnabled) { | 
| 75 | 75 |              if ($this->isQueueable()) { | 
| 76 | 76 | RefreshCache::dispatch($model, $event); | 
| 77 | - } | |
| 78 | -            else { | |
| 77 | +            } else { | |
| 79 | 78 |                  foreach ($this->cacheEntities() as $entity) { | 
| 80 | 79 | $this->updateCacheEntity($entity->name, $event, $entity); | 
| 81 | 80 | } | 
| @@ -112,15 +111,12 @@ discard block | ||
| 112 | 111 | |
| 113 | 112 |                  if ($entity->forever) { | 
| 114 | 113 | Cache::store($driver)->forever($entity->name, $value); | 
| 115 | - } | |
| 116 | -                else { | |
| 114 | +                } else { | |
| 117 | 115 |                      if ($entity->validForRestOfDay) { | 
| 118 | 116 | $ttl = Helpers::timeToEndOfDay(); | 
| 119 | - } | |
| 120 | -                    else if ($entity->validForRestOfWeek) { | |
| 117 | +                    } else if ($entity->validForRestOfWeek) { | |
| 121 | 118 | $ttl = Helpers::timeToEndOfWeek(); | 
| 122 | - } | |
| 123 | -                    else { | |
| 119 | +                    } else { | |
| 124 | 120 | $ttl = $entity->ttl; | 
| 125 | 121 | } | 
| 126 | 122 | |
| @@ -128,12 +124,10 @@ discard block | ||
| 128 | 124 | } | 
| 129 | 125 | |
| 130 | 126 | return $value; | 
| 131 | - } | |
| 132 | -            else { | |
| 127 | +            } else { | |
| 133 | 128 | return Cache::store($driver)->get($entity->name, $entity->default); | 
| 134 | 129 | } | 
| 135 | - } | |
| 136 | -        else { | |
| 130 | +        } else { | |
| 137 | 131 |              throw new Exception("Cache entity [$name] not found. please check if [$name] exists in " . self::class); | 
| 138 | 132 | } | 
| 139 | 133 | } | 
| @@ -155,8 +149,7 @@ discard block | ||
| 155 | 149 | |
| 156 | 150 |                  if ($value) { | 
| 157 | 151 | return $value; | 
| 158 | - } | |
| 159 | -                else { | |
| 152 | +                } else { | |
| 160 | 153 | return $this->updateCacheEntity($name, '', $entity); | 
| 161 | 154 | } | 
| 162 | 155 | } | 
| @@ -17,7 +17,7 @@ | ||
| 17 | 17 |      { | 
| 18 | 18 | $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'laracache'); | 
| 19 | 19 | |
| 20 | -        $this->app->bind('laracache', function () { | |
| 20 | +        $this->app->bind('laracache', function() { | |
| 21 | 21 | return new LaraCache; | 
| 22 | 22 | }); | 
| 23 | 23 | } |