@@ -87,7 +87,7 @@ |
||
87 | 87 | */ |
88 | 88 | public function setOrder($order) |
89 | 89 | { |
90 | - if (! is_array($order)) { |
|
90 | + if (!is_array($order)) { |
|
91 | 91 | $order = func_get_args(); |
92 | 92 | } |
93 | 93 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | $this->setName($name); |
37 | 37 | |
38 | - if (! is_null($title)) { |
|
38 | + if (!is_null($title)) { |
|
39 | 39 | $this->setTitle($title); |
40 | 40 | } |
41 | 41 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function getAlias() |
79 | 79 | { |
80 | - if (! $this->alias) { |
|
80 | + if (!$this->alias) { |
|
81 | 81 | return $this->getName(); |
82 | 82 | } |
83 | 83 | |
@@ -149,6 +149,6 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function isActive() |
151 | 151 | { |
152 | - return ! is_null($this->getValue()); |
|
152 | + return !is_null($this->getValue()); |
|
153 | 153 | } |
154 | 154 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | protected $viewPath; |
13 | 13 | |
14 | 14 | /** |
15 | - * @param string|View $view |
|
15 | + * @param string $view |
|
16 | 16 | * |
17 | 17 | * @return $this |
18 | 18 | */ |
@@ -112,7 +112,7 @@ |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
115 | - * @param string|Model $class |
|
115 | + * @param string|null $class |
|
116 | 116 | * @return ModelConfigurationInterface |
117 | 117 | */ |
118 | 118 | public function getModel($class) |
@@ -121,7 +121,7 @@ |
||
121 | 121 | $class = get_class($class); |
122 | 122 | } |
123 | 123 | |
124 | - if (! $this->hasModel($class)) { |
|
124 | + if (!$this->hasModel($class)) { |
|
125 | 125 | $this->registerModel($class); |
126 | 126 | } |
127 | 127 |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function fromField(Request $request, ModelConfigurationInterface $model, $field, $id = null) |
24 | 24 | { |
25 | - if (! is_null($id)) { |
|
25 | + if (!is_null($id)) { |
|
26 | 26 | $item = $model->getRepository()->find($id); |
27 | - if (is_null($item) || ! $model->isEditable($item)) { |
|
27 | + if (is_null($item) || !$model->isEditable($item)) { |
|
28 | 28 | return new JsonResponse([ |
29 | 29 | 'message' => trans('lang.message.access_denied'), |
30 | 30 | ], 403); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | $form = $model->fireEdit($id); |
34 | 34 | } else { |
35 | - if (! $model->isCreatable()) { |
|
35 | + if (!$model->isCreatable()) { |
|
36 | 36 | return new JsonResponse([ |
37 | 37 | 'message' => trans('lang.message.access_denied'), |
38 | 38 | ], 403); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | */ |
13 | 13 | public function aliases() |
14 | 14 | { |
15 | - return $this->map(function (ModelConfigurationInterface $model) { |
|
15 | + return $this->map(function(ModelConfigurationInterface $model) { |
|
16 | 16 | return $model->getAlias(); |
17 | 17 | }); |
18 | 18 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function keyByAlias() |
24 | 24 | { |
25 | - return $this->keyBy(function (ModelConfigurationInterface $model) { |
|
25 | + return $this->keyBy(function(ModelConfigurationInterface $model) { |
|
26 | 26 | return $model->getAlias(); |
27 | 27 | }); |
28 | 28 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getOptions() |
56 | 56 | { |
57 | - if (! is_null($this->getModelForOptions()) && ! is_null($this->getDisplay())) { |
|
57 | + if (!is_null($this->getModelForOptions()) && !is_null($this->getDisplay())) { |
|
58 | 58 | $this->setOptions( |
59 | 59 | $this->loadOptions() |
60 | 60 | ); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function exclude($keys) |
137 | 137 | { |
138 | - if (! is_array($keys)) { |
|
138 | + if (!is_array($keys)) { |
|
139 | 139 | $keys = func_get_args(); |
140 | 140 | } |
141 | 141 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public static function registerRoutes(Router $router) |
29 | 29 | { |
30 | 30 | $routeName = 'admin.display.column.move-up'; |
31 | - if (! $router->has($routeName)) { |
|
31 | + if (!$router->has($routeName)) { |
|
32 | 32 | $router->post('{adminModel}/{adminModelId}/up', [ |
33 | 33 | 'as' => $routeName, |
34 | 34 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\DisplayColumnController@orderUp', |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | $routeName = 'admin.display.column.move-down'; |
39 | - if (! $router->has($routeName)) { |
|
39 | + if (!$router->has($routeName)) { |
|
40 | 40 | $router->post('{adminModel}/{adminModelId}/down', [ |
41 | 41 | 'as' => $routeName, |
42 | 42 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\DisplayColumnController@orderDown', |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function getModel() |
58 | 58 | { |
59 | - if (! in_array(OrderableModel::class, trait_uses_recursive($class = get_class($this->model)))) { |
|
59 | + if (!in_array(OrderableModel::class, trait_uses_recursive($class = get_class($this->model)))) { |
|
60 | 60 | throw new \Exception("Model [$class] should uses trait [SleepingOwl\\Admin\\Traits\\OrderableModel]"); |
61 | 61 | } |
62 | 62 |
@@ -104,15 +104,15 @@ |
||
104 | 104 | $from = $this->from->parseValue($from); |
105 | 105 | $to = $this->to->parseValue($to); |
106 | 106 | |
107 | - if (! empty($from) && ! empty($to)) { |
|
107 | + if (!empty($from) && !empty($to)) { |
|
108 | 108 | $this->setOperator('between'); |
109 | 109 | |
110 | 110 | return [$from, $to]; |
111 | - } elseif (! empty($from)) { |
|
111 | + } elseif (!empty($from)) { |
|
112 | 112 | $this->setOperator('greater_or_equal'); |
113 | 113 | |
114 | 114 | return $from; |
115 | - } elseif (! empty($to)) { |
|
115 | + } elseif (!empty($to)) { |
|
116 | 116 | $this->setOperator('less_or_equal'); |
117 | 117 | |
118 | 118 | return $to; |