@@ -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 | { |
@@ -14,13 +14,13 @@ |
||
14 | 14 | */ |
15 | 15 | protected static function validate(\Illuminate\Validation\Validator $validator) |
16 | 16 | { |
17 | - $validator->after(function ($validator) { |
|
17 | + $validator->after(function($validator) { |
|
18 | 18 | /** @var \Illuminate\Http\UploadedFile $file */ |
19 | 19 | $file = array_get($validator->attributes(), 'file'); |
20 | 20 | |
21 | 21 | $size = getimagesize($file->getRealPath()); |
22 | 22 | |
23 | - if (! $size) { |
|
23 | + if (!$size) { |
|
24 | 24 | $validator->errors()->add('file', trans('sleeping_owl::validation.not_image')); |
25 | 25 | } |
26 | 26 | }); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | if (Request::input($this->getPath().'_remove')) { |
33 | 33 | $this->setValue($this->getModel(), $this->getAttribute(), null); |
34 | - } elseif (! is_null($value)) { |
|
34 | + } elseif (!is_null($value)) { |
|
35 | 35 | $this->setValue($this->getModel(), $this->getAttribute(), $value); |
36 | 36 | } |
37 | 37 | } |
@@ -71,7 +71,7 @@ |
||
71 | 71 | /** |
72 | 72 | * Get column value from instance. |
73 | 73 | * |
74 | - * @param Collection|Model|Closure $instance |
|
74 | + * @param Model $instance |
|
75 | 75 | * @param string $name |
76 | 76 | * |
77 | 77 | * @return mixed |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function setOrderable($orderable = true) |
75 | 75 | { |
76 | - if ($orderable !== false && ! $orderable instanceof OrderByClauseInterface) { |
|
77 | - if (! is_string($orderable) && ! $orderable instanceof Closure) { |
|
76 | + if ($orderable !== false && !$orderable instanceof OrderByClauseInterface) { |
|
77 | + if (!is_string($orderable) && !$orderable instanceof Closure) { |
|
78 | 78 | $orderable = $this->getName(); |
79 | 79 | } |
80 | 80 | |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | |
119 | 119 | if ($instance instanceof Collection) { |
120 | 120 | $instance = $instance->pluck($part); |
121 | - } elseif (! is_null($instance)) { |
|
121 | + } elseif (!is_null($instance)) { |
|
122 | 122 | $instance = $instance->getAttribute($part); |
123 | 123 | } |
124 | 124 | |
125 | - if (! empty($parts) && ! is_null($instance)) { |
|
125 | + if (!empty($parts) && !is_null($instance)) { |
|
126 | 126 | return $this->getValueFromObject($instance, implode('.', $parts)); |
127 | 127 | } |
128 | 128 |
@@ -308,7 +308,7 @@ |
||
308 | 308 | } |
309 | 309 | |
310 | 310 | /** |
311 | - * @return \Illuminate\Foundation\Application|mixed |
|
311 | + * @return RepositoryInterface |
|
312 | 312 | * @throws \Exception |
313 | 313 | */ |
314 | 314 | protected function makeRepository() |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $this->title, |
191 | 191 | ]; |
192 | 192 | |
193 | - $this->getExtensions()->each(function (DisplayExtensionInterface $extension) use (&$titles) { |
|
193 | + $this->getExtensions()->each(function(DisplayExtensionInterface $extension) use (&$titles) { |
|
194 | 194 | if (method_exists($extension, $method = 'getTitle')) { |
195 | 195 | $titles[] = call_user_func([$extension, $method]); |
196 | 196 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | foreach ($blocks as $block => $data) { |
240 | 240 | foreach ($data as $html) { |
241 | - if (! empty($html)) { |
|
241 | + if (!empty($html)) { |
|
242 | 242 | $view->getFactory()->startSection($block); |
243 | 243 | echo $html; |
244 | 244 | $view->getFactory()->yieldSection(); |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | { |
289 | 289 | $repository = app($this->repositoryClass, [$this->modelClass]); |
290 | 290 | |
291 | - if (! ($repository instanceof RepositoryInterface)) { |
|
291 | + if (!($repository instanceof RepositoryInterface)) { |
|
292 | 292 | throw new \Exception('Repository class must be instanced of [RepositoryInterface]'); |
293 | 293 | } |
294 | 294 |