@@ -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 | { |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * @var ColumnFilterInterface[] |
| 17 | 17 | */ |
| 18 | - protected $columnFilters = []; |
|
| 18 | + protected $columnFilters = [ ]; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * @var string|\Illuminate\View\View |
@@ -34,11 +34,11 @@ 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 | |
| 41 | - $this->columnFilters = []; |
|
| 41 | + $this->columnFilters = [ ]; |
|
| 42 | 42 | |
| 43 | 43 | foreach ($columnFilters as $filter) { |
| 44 | 44 | $this->push($filter); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function push(ColumnFilterInterface $filter = null) |
| 64 | 64 | { |
| 65 | - $this->columnFilters[] = $filter; |
|
| 65 | + $this->columnFilters[ ] = $filter; |
|
| 66 | 66 | |
| 67 | 67 | return $this; |
| 68 | 68 | } |
@@ -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 | { |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | /** |
| 10 | 10 | * @var string[] |
| 11 | 11 | */ |
| 12 | - protected $scopes = []; |
|
| 12 | + protected $scopes = [ ]; |
|
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * @return string[] |
@@ -38,11 +38,11 @@ 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 | |
| 45 | - $this->scopes[] = $scope; |
|
| 45 | + $this->scopes[ ] = $scope; |
|
| 46 | 46 | |
| 47 | 47 | return $this; |
| 48 | 48 | } |
@@ -65,13 +65,13 @@ 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; |
| 72 | 72 | } else { |
| 73 | 73 | $method = $scope; |
| 74 | - $params = []; |
|
| 74 | + $params = [ ]; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | call_user_func_array([ |
@@ -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 | { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function register($editorId, WysiwygFilterInterface $filter = null, $name = null) |
| 45 | 45 | { |
| 46 | - $config = config('sleeping_owl.wysiwyg.'.$editorId, []); |
|
| 46 | + $config = config('sleeping_owl.wysiwyg.'.$editorId, [ ]); |
|
| 47 | 47 | |
| 48 | 48 | $this->getFilters()->push( |
| 49 | 49 | $editor = new Editor($editorId, $name, $filter, $config) |
@@ -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 | |
@@ -87,6 +87,6 @@ |
||
| 87 | 87 | | |
| 88 | 88 | */ |
| 89 | 89 | |
| 90 | - 'attributes' => [], |
|
| 90 | + 'attributes' => [ ], |
|
| 91 | 91 | |
| 92 | 92 | ]; |
@@ -62,6 +62,6 @@ |
||
| 62 | 62 | | |
| 63 | 63 | */ |
| 64 | 64 | |
| 65 | - 'attributes' => [], |
|
| 65 | + 'attributes' => [ ], |
|
| 66 | 66 | |
| 67 | 67 | ]; |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function apply($text) |
| 16 | 16 | { |
| 17 | 17 | return Blade::compileString( |
| 18 | - preg_replace(['/<(\?|\%)\=?(php)?/', '/(\%|\?)>/'], ['', ''], $text) |
|
| 18 | + preg_replace([ '/<(\?|\%)\=?(php)?/', '/(\%|\?)>/' ], [ '', '' ], $text) |
|
| 19 | 19 | ); |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -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(); |