Completed
Push — master ( 302649...1c936f )
by Jesse
02:00
created
src/ElementSorter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
     private function functionFor(Sorting $sorting): Closure
27 27
     {
28
-        return function ($element1, $element2) use ($sorting) {
28
+        return function($element1, $element2) use ($sorting) {
29 29
             return $this->doTheSorting($element1, $element2, $sorting);
30 30
         };
31 31
     }
Please login to merge, or discard this patch.
src/Sorted.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,12 +13,10 @@
 block discarded – undo
13 13
         foreach ($fields as $field => $ascend) {
14 14
             if ($sorting === null) {
15 15
                 $sorting = $ascend ?
16
-                    Sort::ascendingBy($field) :
17
-                    Sort::descendingBy($field);
16
+                    Sort::ascendingBy($field) : Sort::descendingBy($field);
18 17
             } else {
19 18
                 $sorting = $ascend ?
20
-                    $sorting->andThenAscendingBy($field) :
21
-                    $sorting->andThenDescendingBy($field);
19
+                    $sorting->andThenAscendingBy($field) : $sorting->andThenDescendingBy($field);
22 20
             }
23 21
         }
24 22
         return $sorting ?: DoNotSort::atAll();
Please login to merge, or discard this patch.
src/Sort.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
             $this->field,
73 73
             $this->ascends,
74 74
             $this->next instanceof ExtensibleSorting ?
75
-                $this->next->andThenAscendingBy($field) :
76
-                Sort::ascendingBy($field)
75
+                $this->next->andThenAscendingBy($field) : Sort::ascendingBy($field)
77 76
         );
78 77
     }
79 78
 
@@ -84,8 +83,7 @@  discard block
 block discarded – undo
84 83
             $this->field,
85 84
             $this->ascends,
86 85
             $this->next instanceof ExtensibleSorting ?
87
-                $this->next->andThenDescendingBy($field) :
88
-                Sort::descendingBy($field)
86
+                $this->next->andThenDescendingBy($field) : Sort::descendingBy($field)
89 87
         );
90 88
     }
91 89
 }
Please login to merge, or discard this patch.
src/OrderByParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     {
47 47
         if (!array_key_exists($sorting->field(), $this->sortableFields)) {
48 48
             throw new InvalidArgumentException(
49
-                $sorting->field() . ' is not a sortable field.'
49
+                $sorting->field().' is not a sortable field.'
50 50
             );
51 51
         }
52 52
         return sprintf(
Please login to merge, or discard this patch.