@@ -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 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | /** |
23 | 23 | * @param array|string $scopes |
24 | 24 | * |
25 | - * @return $this |
|
25 | + * @return \SleepingOwl\Admin\Contracts\DisplayInterface |
|
26 | 26 | */ |
27 | 27 | public function set($scopes) |
28 | 28 | { |
@@ -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 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function setItems($items) |
42 | 42 | { |
43 | - if (! is_array($items)) { |
|
43 | + if (!is_array($items)) { |
|
44 | 44 | $items = func_get_args(); |
45 | 45 | } |
46 | 46 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function addHeader($items) |
70 | 70 | { |
71 | - if (! is_array($items)) { |
|
71 | + if (!is_array($items)) { |
|
72 | 72 | $items = func_get_args(); |
73 | 73 | } |
74 | 74 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function addBody($items) |
86 | 86 | { |
87 | - if (! is_array($items)) { |
|
87 | + if (!is_array($items)) { |
|
88 | 88 | $items = func_get_args(); |
89 | 89 | } |
90 | 90 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function addFooter($items) |
106 | 106 | { |
107 | - if (! is_array($items)) { |
|
107 | + if (!is_array($items)) { |
|
108 | 108 | $items = func_get_args(); |
109 | 109 | } |
110 | 110 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function __construct(Closure $callback = null) |
26 | 26 | { |
27 | - if (! is_null($callback)) { |
|
27 | + if (!is_null($callback)) { |
|
28 | 28 | $this->setCallback($callback); |
29 | 29 | } |
30 | 30 |
@@ -86,7 +86,7 @@ |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
89 | - * @return $this|Custom|mixed |
|
89 | + * @return string |
|
90 | 90 | */ |
91 | 91 | public function render() |
92 | 92 | { |