@@ -21,7 +21,7 @@ |
||
| 21 | 21 | { |
| 22 | 22 | parent::__construct($label); |
| 23 | 23 | $this->setLabel( |
| 24 | - Form::checkbox(null, 1, false, ['class' => 'adminCheckboxAll'] |
|
| 24 | + Form::checkbox(null, 1, false, [ 'class' => 'adminCheckboxAll' ] |
|
| 25 | 25 | )); |
| 26 | 26 | |
| 27 | 27 | $this->setOrderable(false); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | protected function isEditable() |
| 65 | 65 | { |
| 66 | 66 | return |
| 67 | - ! $this->isTrashed() |
|
| 67 | + !$this->isTrashed() |
|
| 68 | 68 | && |
| 69 | 69 | $this->getModelConfiguration()->isEditable( |
| 70 | 70 | $this->getModel() |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | protected function isDeletable() |
| 89 | 89 | { |
| 90 | 90 | return |
| 91 | - ! $this->isTrashed() |
|
| 91 | + !$this->isTrashed() |
|
| 92 | 92 | && |
| 93 | 93 | $this->getModelConfiguration()->isDeletable( |
| 94 | 94 | $this->getModel() |
@@ -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 | |
@@ -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 | |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * @var array |
| 9 | 9 | */ |
| 10 | - protected $linkAttributes = []; |
|
| 10 | + protected $linkAttributes = [ ]; |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * @return array |
@@ -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 | |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | { |
| 69 | 69 | $value = $this->getModelValue($this->getModel(), $this->getField()); |
| 70 | 70 | |
| 71 | - return app('sleeping_owl')->getModel($this->getRelatedModel())->getDisplayUrl([$this->getName() => $value]); |
|
| 71 | + return app('sleeping_owl')->getModel($this->getRelatedModel())->getDisplayUrl([ $this->getName() => $value ]); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function set($filters) |
| 42 | 42 | { |
| 43 | - if (! is_array($filters)) { |
|
| 43 | + if (!is_array($filters)) { |
|
| 44 | 44 | $filters = func_get_args(); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function getActive() |
| 80 | 80 | { |
| 81 | - return $this->filters->filter(function (FilterInterface $filter) { |
|
| 81 | + return $this->filters->filter(function(FilterInterface $filter) { |
|
| 82 | 82 | return $filter->isActive(); |
| 83 | 83 | }); |
| 84 | 84 | } |
@@ -100,10 +100,10 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function getTitle() |
| 102 | 102 | { |
| 103 | - $titles = [$this->title]; |
|
| 103 | + $titles = [ $this->title ]; |
|
| 104 | 104 | |
| 105 | - $this->getActive()->each(function (FilterInterface $filter) use (&$titles) { |
|
| 106 | - $titles[] = $filter->getTitle(); |
|
| 105 | + $this->getActive()->each(function(FilterInterface $filter) use (&$titles) { |
|
| 106 | + $titles[ ] = $filter->getTitle(); |
|
| 107 | 107 | }); |
| 108 | 108 | |
| 109 | 109 | return implode(' | ', array_filter($titles)); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function modifyQuery(\Illuminate\Database\Eloquent\Builder $query) |
| 129 | 129 | { |
| 130 | - $this->getActive()->each(function (FilterInterface $filter) use ($query) { |
|
| 130 | + $this->getActive()->each(function(FilterInterface $filter) use ($query) { |
|
| 131 | 131 | $filter->apply($query); |
| 132 | 132 | }); |
| 133 | 133 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | public function initialize() |
| 139 | 139 | { |
| 140 | - $this->filters->each(function (FilterInterface $filter) { |
|
| 140 | + $this->filters->each(function(FilterInterface $filter) { |
|
| 141 | 141 | $filter->initialize(); |
| 142 | 142 | }); |
| 143 | 143 | } |
@@ -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 | { |