@@ -48,7 +48,7 @@ |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
51 | - * @return Collection|\SleepingOwl\Admin\Contracts\ActionInterface[] |
|
51 | + * @return ColumnFilterInterface[] |
|
52 | 52 | */ |
53 | 53 | public function all() |
54 | 54 | { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function set($columnFilters) |
36 | 36 | { |
37 | - if (! is_array($columnFilters)) { |
|
37 | + if (!is_array($columnFilters)) { |
|
38 | 38 | $columnFilters = func_get_args(); |
39 | 39 | } |
40 | 40 | |
@@ -156,12 +156,12 @@ discard block |
||
156 | 156 | } |
157 | 157 | } |
158 | 158 | |
159 | - if (! in_array($this->getPlacement(), ['table.footer', 'table.header']) && $this->view == 'display.extensions.columns_filters_table') { |
|
159 | + if (!in_array($this->getPlacement(), ['table.footer', 'table.header']) && $this->view == 'display.extensions.columns_filters_table') { |
|
160 | 160 | $this->view = 'display.extensions.columns_filters'; |
161 | 161 | $this->setHtmlAttribute('class', 'table table-default'); |
162 | 162 | } |
163 | 163 | |
164 | - if (! $this->hasHtmlAttribute('class')) { |
|
164 | + if (!$this->hasHtmlAttribute('class')) { |
|
165 | 165 | $this->setHtmlAttribute('class', 'panel-footer'); |
166 | 166 | } |
167 | 167 | } |
@@ -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 | { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function push($scope) |
40 | 40 | { |
41 | - if (! is_array($scope)) { |
|
41 | + if (!is_array($scope)) { |
|
42 | 42 | $scope = func_get_args(); |
43 | 43 | } |
44 | 44 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | public function modifyQuery(Builder $query) |
66 | 66 | { |
67 | 67 | foreach ($this->scopes as $scope) { |
68 | - if (! is_null($scope)) { |
|
68 | + if (!is_null($scope)) { |
|
69 | 69 | if (is_array($scope)) { |
70 | 70 | $method = array_shift($scope); |
71 | 71 | $params = $scope; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
51 | - * @return string |
|
51 | + * @return integer |
|
52 | 52 | */ |
53 | 53 | public function getSize() |
54 | 54 | { |
@@ -46,7 +46,7 @@ |
||
46 | 46 | /** |
47 | 47 | * Move model in the $destination. |
48 | 48 | * |
49 | - * @param $destination -1 (move down) or 1 (move up) |
|
49 | + * @param integer $destination -1 (move down) or 1 (move up) |
|
50 | 50 | */ |
51 | 51 | protected function move($destination) |
52 | 52 | { |
@@ -9,11 +9,11 @@ |
||
9 | 9 | */ |
10 | 10 | protected static function bootOrderableModel() |
11 | 11 | { |
12 | - static::creating(function ($row) { |
|
12 | + static::creating(function($row) { |
|
13 | 13 | $row->updateOrderFieldOnCreate(); |
14 | 14 | }); |
15 | 15 | |
16 | - static::deleted(function ($row) { |
|
16 | + static::deleted(function($row) { |
|
17 | 17 | $row->updateOrderFieldOnDelete(); |
18 | 18 | }); |
19 | 19 | } |
@@ -80,7 +80,7 @@ |
||
80 | 80 | /** |
81 | 81 | * @param string $editorId |
82 | 82 | * |
83 | - * @return bool |
|
83 | + * @return boolean|null |
|
84 | 84 | */ |
85 | 85 | public function loadEditor($editorId) |
86 | 86 | { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function getEditor($editorId) |
69 | 69 | { |
70 | - return $this->getFilters()->filter(function (WysiwygEditorInterface $editor) use ($editorId) { |
|
70 | + return $this->getFilters()->filter(function(WysiwygEditorInterface $editor) use ($editorId) { |
|
71 | 71 | return $editor->getId() == $editorId; |
72 | 72 | })->first(); |
73 | 73 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function loadEditor($editorId) |
86 | 86 | { |
87 | - if (! is_null($editor = $this->getEditor($editorId))) { |
|
87 | + if (!is_null($editor = $this->getEditor($editorId))) { |
|
88 | 88 | if ($editor->isUsed()) { |
89 | 89 | return true; |
90 | 90 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function applyFilter($editorId, $text) |
106 | 106 | { |
107 | - if (! is_null($editor = $this->getEditor($editorId))) { |
|
107 | + if (!is_null($editor = $this->getEditor($editorId))) { |
|
108 | 108 | return $editor->applyFilter($text); |
109 | 109 | } |
110 | 110 |
@@ -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 |