@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | $this->sort(); |
| 19 | 19 | |
| 20 | - if (! is_null($view)) { |
|
| 20 | + if (!is_null($view)) { |
|
| 21 | 21 | return view($view, [ |
| 22 | 22 | 'pages' => $this->getPages(), |
| 23 | 23 | ])->render(); |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | */ |
| 55 | 55 | public function setModel($model) |
| 56 | 56 | { |
| 57 | - if (! class_exists($model)) { |
|
| 57 | + if (!class_exists($model)) { |
|
| 58 | 58 | throw new Exception("Class model [$model] not found"); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | $parts = explode('.', $name); |
| 67 | 67 | $fieldName = array_pop($parts); |
| 68 | 68 | $relationName = implode('.', $parts); |
| 69 | - $query->whereHas($relationName, function ($q) use ($search, $fieldName) { |
|
| 69 | + $query->whereHas($relationName, function($q) use ($search, $fieldName) { |
|
| 70 | 70 | $this->buildQuery($q, $fieldName, $search); |
| 71 | 71 | }); |
| 72 | 72 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function __construct($label = null, Closure $callback = null) |
| 29 | 29 | { |
| 30 | 30 | parent::__construct($label); |
| 31 | - if (! is_null($callback)) { |
|
| 31 | + if (!is_null($callback)) { |
|
| 32 | 32 | $this->setCallback($callback); |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | protected function getValue(Model $model) |
| 65 | 65 | { |
| 66 | - if (! is_callable($callback = $this->getCallback())) { |
|
| 66 | + if (!is_callable($callback = $this->getCallback())) { |
|
| 67 | 67 | throw new \Exception('Invalid custom column callback'); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | { |
| 18 | 18 | Route::post('{adminModel}/{adminModelId}/up', [ |
| 19 | 19 | 'as' => 'admin.model.move-up', |
| 20 | - function ($model, $id) { |
|
| 20 | + function($model, $id) { |
|
| 21 | 21 | $instance = $model->getRepository()->find($id); |
| 22 | 22 | $instance->moveUp(); |
| 23 | 23 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | Route::post('{adminModel}/{adminModelId}/down', [ |
| 29 | 29 | 'as' => 'admin.model.move-down', |
| 30 | - function ($model, $id) { |
|
| 30 | + function($model, $id) { |
|
| 31 | 31 | $instance = $model->getRepository()->find($id); |
| 32 | 32 | $instance->moveDown(); |
| 33 | 33 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function getModel() |
| 50 | 50 | { |
| 51 | - if (! in_array(OrderableModel::class, trait_uses_recursive($class = get_class($this->model)))) { |
|
| 51 | + if (!in_array(OrderableModel::class, trait_uses_recursive($class = get_class($this->model)))) { |
|
| 52 | 52 | throw new \Exception("Model [$class] should uses trait [SleepingOwl\\Admin\\Traits\\OrderableModel]"); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -58,8 +58,8 @@ |
||
| 58 | 58 | $value = $this->getModelValue(); |
| 59 | 59 | $originalValue = $value; |
| 60 | 60 | |
| 61 | - if (! is_null($value)) { |
|
| 62 | - if (! $value instanceof Carbon) { |
|
| 61 | + if (!is_null($value)) { |
|
| 62 | + if (!$value instanceof Carbon) { |
|
| 63 | 63 | $value = Carbon::parse($value); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | public function toArray() |
| 47 | 47 | { |
| 48 | 48 | $value = $this->getModelValue(); |
| 49 | - if (! empty($value) && (strpos($value, '://') === false)) { |
|
| 49 | + if (!empty($value) && (strpos($value, '://') === false)) { |
|
| 50 | 50 | $value = asset($value); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function set($actions) |
| 51 | 51 | { |
| 52 | - if (! is_array($actions)) { |
|
| 52 | + if (!is_array($actions)) { |
|
| 53 | 53 | $actions = func_get_args(); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -145,13 +145,13 @@ discard block |
||
| 145 | 145 | return; |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | - $this->all()->each(function (ActionInterface $action) { |
|
| 148 | + $this->all()->each(function(ActionInterface $action) { |
|
| 149 | 149 | $action->initialize(); |
| 150 | 150 | }); |
| 151 | 151 | |
| 152 | 152 | $this->setHtmlAttribute('data-type', 'display-actions'); |
| 153 | 153 | |
| 154 | - if (! $this->hasHtmlAttribute('class')) { |
|
| 154 | + if (!$this->hasHtmlAttribute('class')) { |
|
| 155 | 155 | $this->setHtmlAttribute('class', 'panel-footer'); |
| 156 | 156 | } |
| 157 | 157 | } |
@@ -152,7 +152,7 @@ |
||
| 152 | 152 | |
| 153 | 153 | public function initialize() |
| 154 | 154 | { |
| 155 | - $this->allWithControl()->each(function (ColumnInterface $column) { |
|
| 155 | + $this->allWithControl()->each(function(ColumnInterface $column) { |
|
| 156 | 156 | $column->initialize(); |
| 157 | 157 | }); |
| 158 | 158 | |