@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function ability() |
29 | 29 | { |
30 | - return 'index'; |
|
30 | + return 'index'; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -57,18 +57,18 @@ |
||
57 | 57 | public function getOrderBy() |
58 | 58 | { |
59 | 59 | if ($fields = explode(',', $this->get('sort'))) { |
60 | - $orderBy = []; |
|
60 | + $orderBy = [ ]; |
|
61 | 61 | |
62 | 62 | foreach ($fields as $field) { |
63 | 63 | if (empty($field)) continue; |
64 | 64 | |
65 | 65 | $direction = 'ASC'; |
66 | - if ($field[0] === '-') { |
|
66 | + if ($field[ 0 ] === '-') { |
|
67 | 67 | $field = substr($field, 1); |
68 | 68 | $direction = 'DESC'; |
69 | 69 | } |
70 | 70 | |
71 | - $orderBy[$field] = $direction; |
|
71 | + $orderBy[ $field ] = $direction; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | return $orderBy; |
@@ -60,7 +60,9 @@ |
||
60 | 60 | $orderBy = []; |
61 | 61 | |
62 | 62 | foreach ($fields as $field) { |
63 | - if (empty($field)) continue; |
|
63 | + if (empty($field)) { |
|
64 | + continue; |
|
65 | + } |
|
64 | 66 | |
65 | 67 | $direction = 'ASC'; |
66 | 68 | if ($field[0] === '-') { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function rules() |
25 | 25 | { |
26 | - return []; |
|
26 | + return [ ]; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $this->middleware(function($request, \Closure $next) { |
54 | 54 | try { |
55 | 55 | /** @var Response $response */ |
56 | - $response = $next($request); |
|
56 | + $response = $next($request); |
|
57 | 57 | |
58 | 58 | if (isset($response->exception) && $response->exception instanceof \Exception) { |
59 | 59 | return $this->response()->exception($response->exception); |