Passed
Pull Request — master (#59)
by
unknown
03:49
created
src/Traits/Lists.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function top($limit = 5, $orderByAsc = false, $constraints = [])
17 17
     {
18
-        if(is_array($orderByAsc)) {
18
+        if (is_array($orderByAsc)) {
19 19
             $constraints = $orderByAsc;
20 20
             $orderByAsc = false;
21 21
         }
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         $cachedList = $this->cachedList($limit, $cacheKey);
26 26
         $visitsIds = $this->getVisitsIds($limit, $this->keys->visits, $orderByAsc);
27 27
 
28
-        if($visitsIds === $cachedList->pluck($this->keys->primary)->toArray() && ! $this->fresh) {
28
+        if ($visitsIds === $cachedList->pluck($this->keys->primary)->toArray() && !$this->fresh) {
29 29
             return $cachedList;
30 30
         }
31 31
 
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
                     return $query->where($constraints);
114 114
                 })
115 115
                 ->get()
116
-                ->sortBy(function ($subject) use ($visitsIds) {
116
+                ->sortBy(function($subject) use ($visitsIds) {
117 117
                     return array_search($subject->{$this->keys->primary}, $visitsIds);
118
-                })->each(function ($subject) use ($cacheKey) {
118
+                })->each(function($subject) use ($cacheKey) {
119 119
                     $this->connection->addToFlatList($cacheKey, serialize($subject));
120 120
                 });
121 121
         }
Please login to merge, or discard this patch.