We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -5,7 +5,7 @@ |
||
5 | 5 | $min = isset($field['min']) && (int) $field['min'] > 0 ? $field['min'] : -1; |
6 | 6 | $item_name = strtolower(isset($field['entity_singular']) && !empty($field['entity_singular']) ? $field['entity_singular'] : $field['label']); |
7 | 7 | |
8 | - $items = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : '' )); |
|
8 | + $items = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : '')); |
|
9 | 9 | |
10 | 10 | // make sure not matter the attribute casting |
11 | 11 | // the $items variable contains a properly defined JSON |
@@ -76,10 +76,10 @@ |
||
76 | 76 | <ol class="sortable"> |
77 | 77 | <?php |
78 | 78 | $all_entries = collect($entries->all())->sortBy('lft')->keyBy($crud->getModel()->getKeyName()); |
79 | - $root_entries = $all_entries->filter(function ($item) { |
|
79 | + $root_entries = $all_entries->filter(function($item) { |
|
80 | 80 | return $item->parent_id == 0; |
81 | 81 | }); |
82 | - foreach ($root_entries as $key => $entry){ |
|
82 | + foreach ($root_entries as $key => $entry) { |
|
83 | 83 | $root_entries[$key] = tree_element($entry, $key, $all_entries, $crud); |
84 | 84 | } |
85 | 85 | ?> |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD\ModelTraits\SpatieTranslatable; |
4 | 4 | |
5 | -use Illuminate\Database\Eloquent\Model; |
|
6 | 5 | use Illuminate\Contracts\Events\Dispatcher; |
6 | +use Illuminate\Database\Eloquent\Model; |
|
7 | 7 | |
8 | 8 | class SluggableObserver extends \Cviebrock\EloquentSluggable\SluggableObserver |
9 | 9 | { |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $separator = $config['separator']; |
48 | 48 | $attribute = $attribute.'->'.$this->getLocale(); |
49 | 49 | |
50 | - return $query->where(function (Builder $q) use ($attribute, $slug, $separator) { |
|
50 | + return $query->where(function(Builder $q) use ($attribute, $slug, $separator) { |
|
51 | 51 | $q->where($attribute, '=', $slug) |
52 | 52 | ->orWhere($attribute, 'LIKE', $slug.$separator.'%'); |
53 | 53 | }); |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD\ModelTraits\SpatieTranslatable; |
4 | 4 | |
5 | -use Illuminate\Database\Eloquent\Model; |
|
6 | -use Illuminate\Database\Eloquent\Builder; |
|
7 | 5 | use Cviebrock\EloquentSluggable\Sluggable as OriginalSluggable; |
6 | +use Illuminate\Database\Eloquent\Builder; |
|
7 | +use Illuminate\Database\Eloquent\Model; |
|
8 | 8 | |
9 | 9 | trait Sluggable |
10 | 10 | { |
@@ -37,7 +37,6 @@ |
||
37 | 37 | * Query scope for finding "similar" slugs, used to determine uniqueness. |
38 | 38 | * |
39 | 39 | * @param \Illuminate\Database\Eloquent\Builder $query |
40 | - * @param \Illuminate\Database\Eloquent\Model $model |
|
41 | 40 | * @param string $attribute |
42 | 41 | * @param array $config |
43 | 42 | * @param string $slug |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function getAttributeValue($key) |
26 | 26 | { |
27 | - if (! $this->isTranslatableAttribute($key)) { |
|
27 | + if (!$this->isTranslatableAttribute($key)) { |
|
28 | 28 | return parent::getAttributeValue($key); |
29 | 29 | } |
30 | 30 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function update(array $attributes = [], array $options = []) |
74 | 74 | { |
75 | - if (! $this->exists) { |
|
75 | + if (!$this->exists) { |
|
76 | 76 | return false; |
77 | 77 | } |
78 | 78 |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD; |
4 | 4 | |
5 | -use Route; |
|
6 | 5 | use Illuminate\Support\ServiceProvider; |
7 | 6 | |
8 | 7 | class CrudServiceProvider extends ServiceProvider |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function register() |
78 | 78 | { |
79 | - $this->app->bind('CRUD', function ($app) { |
|
79 | + $this->app->bind('CRUD', function($app) { |
|
80 | 80 | return new CRUD($app); |
81 | 81 | }); |
82 | 82 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $this->commands($this->commands); |
92 | 92 | |
93 | 93 | // map the elfinder prefix |
94 | - if (! \Config::get('elfinder.route.prefix')) { |
|
94 | + if (!\Config::get('elfinder.route.prefix')) { |
|
95 | 95 | \Config::set('elfinder.route.prefix', \Config::get('backpack.base.route_prefix').'/elfinder'); |
96 | 96 | } |
97 | 97 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | { |
112 | 112 | $crudPubPath = public_path('vendor/backpack/crud'); |
113 | 113 | |
114 | - if (! is_dir($crudPubPath)) { |
|
114 | + if (!is_dir($crudPubPath)) { |
|
115 | 115 | return true; |
116 | 116 | } |
117 | 117 |
@@ -23,13 +23,13 @@ |
||
23 | 23 | } |
24 | 24 | } |
25 | 25 | |
26 | - //for update form, get initial state of the entity |
|
27 | - if( isset($id) && $id ){ |
|
26 | + //for update form, get initial state of the entity |
|
27 | + if( isset($id) && $id ){ |
|
28 | 28 | |
29 | 29 | //get entity with relations for primary dependency |
30 | 30 | $entity_dependencies = $entity_model->with($primary_dependency['entity']) |
31 | - ->with($primary_dependency['entity'].'.'.$primary_dependency['entity_secondary']) |
|
32 | - ->find($id); |
|
31 | + ->with($primary_dependency['entity'].'.'.$primary_dependency['entity_secondary']) |
|
32 | + ->find($id); |
|
33 | 33 | |
34 | 34 | $secondaries_from_primary = []; |
35 | 35 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | //for update form, get initial state of the entity |
27 | - if( isset($id) && $id ){ |
|
27 | + if (isset($id) && $id) { |
|
28 | 28 | |
29 | 29 | //get entity with relations for primary dependency |
30 | 30 | $entity_dependencies = $entity_model->with($primary_dependency['entity']) |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function tabsDisabled() |
31 | 31 | { |
32 | - return ! $this->tabsEnabled; |
|
32 | + return !$this->tabsEnabled; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function setTabsType($type) |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | { |
92 | 92 | $all_fields = $this->getCurrentFields(); |
93 | 93 | |
94 | - $fields_without_a_tab = collect($all_fields)->filter(function ($value, $key) { |
|
95 | - return ! isset($value['tab']); |
|
94 | + $fields_without_a_tab = collect($all_fields)->filter(function($value, $key) { |
|
95 | + return !isset($value['tab']); |
|
96 | 96 | }); |
97 | 97 | |
98 | 98 | return $fields_without_a_tab; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | if ($this->tabExists($label)) { |
104 | 104 | $all_fields = $this->getCurrentFields(); |
105 | 105 | |
106 | - $fields_for_current_tab = collect($all_fields)->filter(function ($value, $key) use ($label) { |
|
106 | + $fields_for_current_tab = collect($all_fields)->filter(function($value, $key) use ($label) { |
|
107 | 107 | return isset($value['tab']) && $value['tab'] == $label; |
108 | 108 | }); |
109 | 109 | |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | $fields = $this->getCurrentFields(); |
120 | 120 | |
121 | 121 | $fields_with_tabs = collect($fields) |
122 | - ->filter(function ($value, $key) { |
|
122 | + ->filter(function($value, $key) { |
|
123 | 123 | return isset($value['tab']); |
124 | 124 | }) |
125 | - ->each(function ($value, $key) use (&$tabs) { |
|
126 | - if (! in_array($value['tab'], $tabs)) { |
|
125 | + ->each(function($value, $key) use (&$tabs) { |
|
126 | + if (!in_array($value['tab'], $tabs)) { |
|
127 | 127 | $tabs[] = $value['tab']; |
128 | 128 | } |
129 | 129 | }); |
@@ -22,6 +22,9 @@ |
||
22 | 22 | return $this->tabsEnabled; |
23 | 23 | } |
24 | 24 | |
25 | + /** |
|
26 | + * @return boolean |
|
27 | + */ |
|
25 | 28 | public function tabsEnabled() |
26 | 29 | { |
27 | 30 | return $this->tabsEnabled; |
@@ -65,7 +65,7 @@ |
||
65 | 65 | 'delete_confirmation_not_deleted_title' => 'Não apagado', |
66 | 66 | 'delete_confirmation_not_deleted_message' => 'Está tudo bem!. O item não foi apagado.', |
67 | 67 | |
68 | - // DataTables translation |
|
68 | + // DataTables translation |
|
69 | 69 | 'emptyTable' => 'Sem dados disponíveis na tabela', |
70 | 70 | 'info' => 'A mostrar _START_ a _END_ de _TOTAL_ registos', |
71 | 71 | 'infoEmpty' => 'A mostrar 0 a 0 de 0 registos', |