We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | <!-- elFinder JS (REQUIRED) --> |
15 | 15 | <script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script> |
16 | 16 | |
17 | - <?php if($locale){ ?> |
|
17 | + <?php if ($locale) { ?> |
|
18 | 18 | <!-- elFinder translation (OPTIONAL) --> |
19 | 19 | <script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script> |
20 | 20 | <?php } ?> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $().ready(function() { |
27 | 27 | $('#elfinder').elfinder({ |
28 | 28 | // set your elFinder options here |
29 | - <?php if($locale){ ?> |
|
29 | + <?php if ($locale) { ?> |
|
30 | 30 | lang: '<?= $locale ?>', // locale |
31 | 31 | <?php } ?> |
32 | 32 | customData: { |
@@ -69,7 +69,7 @@ |
||
69 | 69 | * |
70 | 70 | * @param array $columns - the database columns that contain the JSONs |
71 | 71 | * |
72 | - * @return Model |
|
72 | + * @return CrudTrait |
|
73 | 73 | */ |
74 | 74 | public function withFakes($columns = []) |
75 | 75 | { |
@@ -3,9 +3,9 @@ |
||
3 | 3 | namespace Backpack\CRUD; |
4 | 4 | |
5 | 5 | use DB; |
6 | -use Traversable; |
|
7 | -use Illuminate\Support\Facades\Config; |
|
8 | 6 | use Illuminate\Database\Eloquent\Model; |
7 | +use Illuminate\Support\Facades\Config; |
|
8 | +use Traversable; |
|
9 | 9 | |
10 | 10 | trait CrudTrait |
11 | 11 | { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array'); |
70 | 70 | $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('jsonb', 'json_array'); |
71 | 71 | |
72 | - return ! $conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
72 | + return !$conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /* |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | public function addFakes($columns = ['extras']) |
87 | 87 | { |
88 | 88 | foreach ($columns as $key => $column) { |
89 | - if (! isset($this->attributes[$column])) { |
|
89 | + if (!isset($this->attributes[$column])) { |
|
90 | 90 | continue; |
91 | 91 | } |
92 | 92 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function shouldDecodeFake($column) |
136 | 136 | { |
137 | - return ! in_array($column, array_keys($this->casts)); |
|
137 | + return !in_array($column, array_keys($this->casts)); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function shouldEncodeFake($column) |
147 | 147 | { |
148 | - return ! in_array($column, array_keys($this->casts)); |
|
148 | + return !in_array($column, array_keys($this->casts)); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | /* |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | public function uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path) |
220 | 220 | { |
221 | 221 | $request = \Request::instance(); |
222 | - if (! is_array($this->{$attribute_name})) { |
|
222 | + if (!is_array($this->{$attribute_name})) { |
|
223 | 223 | $attribute_value = json_decode($this->{$attribute_name}, true) ?? []; |
224 | 224 | } else { |
225 | 225 | $attribute_value = $this->{$attribute_name}; |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | if ($files_to_clear) { |
232 | 232 | foreach ($files_to_clear as $key => $filename) { |
233 | 233 | \Storage::disk($disk)->delete($filename); |
234 | - $attribute_value = array_where($attribute_value, function ($value, $key) use ($filename) { |
|
234 | + $attribute_value = array_where($attribute_value, function($value, $key) use ($filename) { |
|
235 | 235 | return $value != $filename; |
236 | 236 | }); |
237 | 237 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | <!-- Include jQuery, jQuery UI, elFinder (REQUIRED) --> |
27 | 27 | |
28 | 28 | <?php |
29 | - $mimeTypes = implode(',', array_map(function ($t) { |
|
29 | + $mimeTypes = implode(',', array_map(function($t) { |
|
30 | 30 | return "'".$t."'"; |
31 | 31 | }, explode(',', $type))); |
32 | 32 | ?> |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $revisionDate = date('Y-m-d', strtotime((string) $history->created_at)); |
22 | 22 | |
23 | 23 | // Be sure to instantiate the initial grouping array |
24 | - if (! array_key_exists($revisionDate, $revisions)) { |
|
24 | + if (!array_key_exists($revisionDate, $revisions)) { |
|
25 | 25 | $revisions[$revisionDate] = []; |
26 | 26 | } |
27 | 27 |
@@ -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 | { |
@@ -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,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 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $separator = $config['separator']; |
49 | 49 | $attribute = $attribute.'->'.$this->getLocale(); |
50 | 50 | |
51 | - return $query->where(function (Builder $q) use ($attribute, $slug, $separator) { |
|
51 | + return $query->where(function(Builder $q) use ($attribute, $slug, $separator) { |
|
52 | 52 | $q->where($attribute, '=', $slug) |
53 | 53 | ->orWhere($attribute, 'LIKE', $slug.$separator.'%') |
54 | 54 | // Fixes issues with Json data types in MySQL where data is sourrounded by " |
@@ -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']) |
@@ -24,19 +24,19 @@ |
||
24 | 24 | if (isset($field['fake']) && $field['fake'] == true) { |
25 | 25 | // add it to the request in its appropriate variable - the one defined, if defined |
26 | 26 | if (isset($field['store_in'])) { |
27 | - if (! in_array($field['store_in'], $fakeFieldsColumnsArray, true)) { |
|
27 | + if (!in_array($field['store_in'], $fakeFieldsColumnsArray, true)) { |
|
28 | 28 | array_push($fakeFieldsColumnsArray, $field['store_in']); |
29 | 29 | } |
30 | 30 | } else { |
31 | 31 | //otherwise in the one defined in the $crud variable |
32 | - if (! in_array('extras', $fakeFieldsColumnsArray, true)) { |
|
32 | + if (!in_array('extras', $fakeFieldsColumnsArray, true)) { |
|
33 | 33 | array_push($fakeFieldsColumnsArray, 'extras'); |
34 | 34 | } |
35 | 35 | } |
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
39 | - if (! count($fakeFieldsColumnsArray)) { |
|
39 | + if (!count($fakeFieldsColumnsArray)) { |
|
40 | 40 | $fakeFieldsColumnsArray = ['extras']; |
41 | 41 | } |
42 | 42 |