| @@ -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 |      { | 
| @@ -73,8 +73,8 @@ | ||
| 73 | 73 | protected function updateOrderFieldOnDelete() | 
| 74 | 74 |      { | 
| 75 | 75 | static::orderModel() | 
| 76 | - ->where($this->getOrderField(), '>', $this->getOrderValue()) | |
| 77 | - ->decrement($this->getOrderField()); | |
| 76 | + ->where($this->getOrderField(), '>', $this->getOrderValue()) | |
| 77 | + ->decrement($this->getOrderField()); | |
| 78 | 78 | } | 
| 79 | 79 | |
| 80 | 80 | /** | 
| @@ -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 | |
| @@ -8,10 +8,10 @@ | ||
| 8 | 8 | <?php $active = null; ?> | 
| 9 | 9 | @foreach ($items as $label => $_tmp) | 
| 10 | 10 | <?php | 
| 11 | -					if (is_null($active)) { | |
| 12 | - $active = $label; | |
| 13 | - } | |
| 14 | - ?> | |
| 11 | +                    if (is_null($active)) { | |
| 12 | + $active = $label; | |
| 13 | + } | |
| 14 | + ?> | |
| 15 | 15 |  				<li role="presentation" {!! ($active == $label) ? 'class="active"' : '' !!}><a href="#{{ md5($label) }}" aria-controls="{{ md5($label) }}" role="tab" data-toggle="tab">{{ $label }}</a></li> | 
| 16 | 16 | @endforeach | 
| 17 | 17 | </ul> | 
| @@ -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 | |
| @@ -13,7 +13,6 @@ | ||
| 13 | 13 | |
| 14 | 14 | /** | 
| 15 | 15 | * Class DisplayTable. | 
| 16 | - | |
| 17 | 16 | * @method Columns getColumns() | 
| 18 | 17 | * @method $this setColumns(ColumnInterface $column, ... $columns) | 
| 19 | 18 | * | 
| @@ -72,7 +72,7 @@ discard block | ||
| 72 | 72 | parent::initialize(); | 
| 73 | 73 | |
| 74 | 74 |          if ($this->getModelConfiguration()->isRestorableModel()) { | 
| 75 | -            $this->setApply(function ($q) { | |
| 75 | +            $this->setApply(function($q) { | |
| 76 | 76 | return $q->withTrashed(); | 
| 77 | 77 | }); | 
| 78 | 78 | } | 
| @@ -183,10 +183,10 @@ discard block | ||
| 183 | 183 | $params['collection'] = $this->getCollection(); | 
| 184 | 184 | |
| 185 | 185 | $params['extensions'] = $this->getExtensions() | 
| 186 | -            ->filter(function (DisplayExtensionInterface $ext) { | |
| 186 | +            ->filter(function(DisplayExtensionInterface $ext) { | |
| 187 | 187 | return $ext instanceof Renderable; | 
| 188 | 188 | }) | 
| 189 | -            ->sortBy(function (DisplayExtensionInterface $extension) { | |
| 189 | +            ->sortBy(function(DisplayExtensionInterface $extension) { | |
| 190 | 190 | return $extension->getOrder(); | 
| 191 | 191 | }); | 
| 192 | 192 | |
| @@ -201,11 +201,11 @@ discard block | ||
| 201 | 201 | */ | 
| 202 | 202 | public function getCollection() | 
| 203 | 203 |      { | 
| 204 | -        if (! $this->isInitialized()) { | |
| 204 | +        if (!$this->isInitialized()) { | |
| 205 | 205 |              throw new \Exception('Display is not initialized'); | 
| 206 | 206 | } | 
| 207 | 207 | |
| 208 | -        if (! is_null($this->collection)) { | |
| 208 | +        if (!is_null($this->collection)) { | |
| 209 | 209 | return $this->collection; | 
| 210 | 210 | } | 
| 211 | 211 | |
| @@ -230,7 +230,7 @@ discard block | ||
| 230 | 230 | |
| 231 | 231 | $columns = $this->getColumns()->all(); | 
| 232 | 232 | |
| 233 | -        if (! is_int(key($orders))) { | |
| 233 | +        if (!is_int(key($orders))) { | |
| 234 | 234 | $orders = [$orders]; | 
| 235 | 235 | } | 
| 236 | 236 | |
| @@ -238,7 +238,7 @@ discard block | ||
| 238 | 238 | $columnIndex = array_get($order, 'column'); | 
| 239 | 239 | $direction = array_get($order, 'dir', 'asc'); | 
| 240 | 240 | |
| 241 | -            if (! $columnIndex && $columnIndex !== '0') { | |
| 241 | +            if (!$columnIndex && $columnIndex !== '0') { | |
| 242 | 242 | continue; | 
| 243 | 243 | } | 
| 244 | 244 | |
| @@ -255,7 +255,7 @@ discard block | ||
| 255 | 255 | */ | 
| 256 | 256 | protected function modifyQuery(\Illuminate\Database\Eloquent\Builder $query) | 
| 257 | 257 |      { | 
| 258 | -        $this->extensions->each(function (DisplayExtensionInterface $extension) use ($query) { | |
| 258 | +        $this->extensions->each(function(DisplayExtensionInterface $extension) use ($query) { | |
| 259 | 259 | $extension->modifyQuery($query); | 
| 260 | 260 | }); | 
| 261 | 261 | } |