@@ -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 | ]; |
@@ -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 | |
@@ -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(); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | /** |
| 17 | 17 | * @var ModelConfigurationInterface[] |
| 18 | 18 | */ |
| 19 | - protected $models = []; |
|
| 19 | + protected $models = [ ]; |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * @var TemplateInterface |
@@ -26,14 +26,14 @@ discard block |
||
| 26 | 26 | /** |
| 27 | 27 | * @var Page[] |
| 28 | 28 | */ |
| 29 | - protected $menuItems = []; |
|
| 29 | + protected $menuItems = [ ]; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * @return string[] |
| 33 | 33 | */ |
| 34 | 34 | public function modelAliases() |
| 35 | 35 | { |
| 36 | - return array_map(function (ModelConfigurationInterface $model) { |
|
| 36 | + return array_map(function(ModelConfigurationInterface $model) { |
|
| 37 | 37 | return $model->getAlias(); |
| 38 | 38 | }, $this->getModels()); |
| 39 | 39 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $class = get_class($class); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - if (! $this->hasModel($class)) { |
|
| 84 | + if (!$this->hasModel($class)) { |
|
| 85 | 85 | $this->registerModel($class); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public function setModel($class, ModelConfigurationInterface $model) |
| 114 | 114 | { |
| 115 | - $this->models[$class] = $model; |
|
| 115 | + $this->models[ $class ] = $model; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -11,6 +11,6 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | public function apply(Builder $query) |
| 13 | 13 | { |
| 14 | - call_user_func([$query, $this->getName()], $this->getValue()); |
|
| 14 | + call_user_func([ $query, $this->getName() ], $this->getValue()); |
|
| 15 | 15 | } |
| 16 | 16 | } |
@@ -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 | |
@@ -11,12 +11,12 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * @var array |
| 13 | 13 | */ |
| 14 | - protected $order = [[0, 'asc']]; |
|
| 14 | + protected $order = [ [ 0, 'asc' ] ]; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * @var array |
| 18 | 18 | */ |
| 19 | - protected $datatableAttributes = []; |
|
| 19 | + protected $datatableAttributes = [ ]; |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * @var int |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | $this->setHtmlAttribute('data-order', json_encode($this->getOrder())); |
| 40 | 40 | |
| 41 | 41 | $attributes = $this->getDatatableAttributes(); |
| 42 | - $attributes['pageLength'] = $this->paginate; |
|
| 42 | + $attributes[ 'pageLength' ] = $this->paginate; |
|
| 43 | 43 | |
| 44 | - $attributes['language'] = trans('sleeping_owl::lang.table'); |
|
| 44 | + $attributes[ 'language' ] = trans('sleeping_owl::lang.table'); |
|
| 45 | 45 | |
| 46 | 46 | foreach ($this->getColumns()->all() as $column) { |
| 47 | - $attributes['columns'][] = [ |
|
| 47 | + $attributes[ 'columns' ][ ] = [ |
|
| 48 | 48 | 'orderDataType' => class_basename($column), |
| 49 | 49 | ]; |
| 50 | 50 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function getDatatableAttributes() |
| 59 | 59 | { |
| 60 | - return array_merge(config('sleeping_owl.datatables', []), (array) $this->datatableAttributes); |
|
| 60 | + return array_merge(config('sleeping_owl.datatables', [ ]), (array) $this->datatableAttributes); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function setOrder($order) |
| 89 | 89 | { |
| 90 | - if (! is_array($order)) { |
|
| 90 | + if (!is_array($order)) { |
|
| 91 | 91 | $order = func_get_args(); |
| 92 | 92 | } |
| 93 | 93 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | { |
| 123 | 123 | $params = parent::toArray(); |
| 124 | 124 | |
| 125 | - $params['order'] = $this->getOrder(); |
|
| 125 | + $params[ 'order' ] = $this->getOrder(); |
|
| 126 | 126 | |
| 127 | 127 | return $params; |
| 128 | 128 | } |