Passed
Push — master ( 207c37...266140 )
by Arthur
03:58
created
src/Extension/OptionsTrait.php 1 patch
Spacing   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,17 +36,14 @@
 block discarded – undo
36 36
     private function setSqlOptions(Request $request) : SqlOptions
37 37
     {
38 38
         $sqlOptions = new SqlOptions();
39
-        $page = ($request->input(ModelsInterface::PARAM_PAGE) === null) ? $this->defaultPage :
40
-            $request->input(ModelsInterface::PARAM_PAGE);
41
-        $limit = ($request->input(ModelsInterface::PARAM_LIMIT) === null) ? $this->defaultLimit :
42
-            $request->input(ModelsInterface::PARAM_LIMIT);
39
+        $page = ($request->input(ModelsInterface::PARAM_PAGE) === null) ? $this->defaultPage : $request->input(ModelsInterface::PARAM_PAGE);
40
+        $limit = ($request->input(ModelsInterface::PARAM_LIMIT) === null) ? $this->defaultLimit : $request->input(ModelsInterface::PARAM_LIMIT);
43 41
 
44 42
         if ($limit > ModelsInterface::MAX_LIMIT) {
45 43
             throw new AttributesException(ErrorsInterface::JSON_API_ERRORS[ErrorsInterface::HTTP_PARAM_LIMIT], ErrorsInterface::HTTP_PARAM_LIMIT);
46 44
         }
47 45
 
48
-        $sort = ($request->input(ModelsInterface::PARAM_SORT) === null) ? $this->defaultSort :
49
-            $request->input(ModelsInterface::PARAM_SORT);
46
+        $sort = ($request->input(ModelsInterface::PARAM_SORT) === null) ? $this->defaultSort : $request->input(ModelsInterface::PARAM_SORT);
50 47
 
51 48
         $data = ($request->input(ModelsInterface::PARAM_DATA) === null) ? ModelsInterface::DEFAULT_DATA
52 49
             : Json::decode($request->input(ModelsInterface::PARAM_DATA));
Please login to merge, or discard this patch.