Passed
Push — master ( 38fb34...7187a0 )
by Mike
03:01
created
src/CachedModel.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,16 +15,16 @@  discard block
 block discarded – undo
15 15
     {
16 16
         $relation = $this->$method();
17 17
 
18
-        if (! $relation instanceof Relation) {
18
+        if (!$relation instanceof Relation) {
19 19
             throw new LogicException(get_class($this).'::'.$method.' must return a relationship instance.');
20 20
         }
21 21
 
22 22
         $results = $this->cache([$method])
23
-            ->rememberForever(str_slug(get_called_class()) . "-{$method}", function () use ($relation) {
23
+            ->rememberForever(str_slug(get_called_class())."-{$method}", function() use ($relation) {
24 24
                 return $relation->getResults();
25 25
             });
26 26
 
27
-        return tap($results, function ($results) use ($method) {
27
+        return tap($results, function($results) use ($method) {
28 28
             $this->setRelation($method, $results);
29 29
         });
30 30
     }
@@ -40,19 +40,19 @@  discard block
 block discarded – undo
40 40
         $class = get_called_class();
41 41
         $instance = new $class;
42 42
 
43
-        static::created(function () use ($instance) {
43
+        static::created(function() use ($instance) {
44 44
             $instance->flushCache();
45 45
         });
46 46
 
47
-        static::deleted(function () use ($instance) {
47
+        static::deleted(function() use ($instance) {
48 48
             $instance->flushCache();
49 49
         });
50 50
 
51
-        static::saved(function () use ($instance) {
51
+        static::saved(function() use ($instance) {
52 52
             $instance->flushCache();
53 53
         });
54 54
 
55
-        static::updated(function () use ($instance) {
55
+        static::updated(function() use ($instance) {
56 56
             $instance->flushCache();
57 57
         });
58 58
     }
Please login to merge, or discard this patch.