We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -1,11 +1,11 @@ |
||
1 | 1 | <!-- text input --> |
2 | 2 | <?php |
3 | 3 | |
4 | -$value = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : '' )); |
|
4 | +$value = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : '')); |
|
5 | 5 | |
6 | 6 | // if attribute casting is used, convert to JSON |
7 | 7 | if (is_array($value)) { |
8 | - $value = json_encode((object)$value); |
|
8 | + $value = json_encode((object) $value); |
|
9 | 9 | } elseif (is_object($value)) { |
10 | 10 | $value = json_encode($value); |
11 | 11 | } else { |
@@ -124,7 +124,7 @@ |
||
124 | 124 | |
125 | 125 | /** |
126 | 126 | * Determine if the current CRUD action is a list operation (using standard or ajax DataTables). |
127 | - * @return bool |
|
127 | + * @return boolean|null |
|
128 | 128 | */ |
129 | 129 | public function doingListOperation() |
130 | 130 | { |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | public function filtersEnabled() |
12 | 12 | { |
13 | - return ! is_array($this->filters); |
|
13 | + return !is_array($this->filters); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | public function filtersDisabled() |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $this->enableFilters(); |
55 | 55 | |
56 | 56 | // check if another filter with the same name exists |
57 | - if (! isset($options['name'])) { |
|
57 | + if (!isset($options['name'])) { |
|
58 | 58 | abort(500, 'All your filters need names.'); |
59 | 59 | } |
60 | 60 | if ($this->filters->contains('name', $options['name'])) { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | public function removeFilter($name) |
133 | 133 | { |
134 | - $this->filters = $this->filters->reject(function ($filter) use ($name) { |
|
134 | + $this->filters = $this->filters->reject(function($filter) use ($name) { |
|
135 | 135 | return $filter->name == $name; |
136 | 136 | }); |
137 | 137 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $this->type = $options['type']; |
202 | 202 | $this->label = $options['label']; |
203 | 203 | |
204 | - if (! isset($options['placeholder'])) { |
|
204 | + if (!isset($options['placeholder'])) { |
|
205 | 205 | $this->placeholder = ''; |
206 | 206 | } else { |
207 | 207 | $this->placeholder = $options['placeholder']; |
@@ -218,16 +218,16 @@ discard block |
||
218 | 218 | |
219 | 219 | public function checkOptionsIntegrity($options) |
220 | 220 | { |
221 | - if (! isset($options['name'])) { |
|
221 | + if (!isset($options['name'])) { |
|
222 | 222 | abort(500, 'Please make sure all your filters have names.'); |
223 | 223 | } |
224 | - if (! isset($options['type'])) { |
|
224 | + if (!isset($options['type'])) { |
|
225 | 225 | abort(500, 'Please make sure all your filters have types.'); |
226 | 226 | } |
227 | - if (! \View::exists('crud::filters.'.$options['type'])) { |
|
227 | + if (!\View::exists('crud::filters.'.$options['type'])) { |
|
228 | 228 | abort(500, 'No filter view named "'.$options['type'].'.blade.php" was found.'); |
229 | 229 | } |
230 | - if (! isset($options['label'])) { |
|
230 | + if (!isset($options['label'])) { |
|
231 | 231 | abort(500, 'Please make sure all your filters have labels.'); |
232 | 232 | } |
233 | 233 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | public function addColumn($column) |
55 | 55 | { |
56 | 56 | // if a string was passed, not an array, change it to an array |
57 | - if (! is_array($column)) { |
|
57 | + if (!is_array($column)) { |
|
58 | 58 | $column = ['name' => $column]; |
59 | 59 | } |
60 | 60 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function addDefaultLabel($array) |
107 | 107 | { |
108 | - if (! array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) { |
|
108 | + if (!array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) { |
|
109 | 109 | $array = array_merge(['label' => ucfirst($this->makeLabel($array['name']))], $array); |
110 | 110 | |
111 | 111 | return $array; |
@@ -139,8 +139,8 @@ discard block |
||
139 | 139 | */ |
140 | 140 | public function remove($entity, $fields) |
141 | 141 | { |
142 | - return array_values(array_filter($this->{$entity}, function ($field) use ($fields) { |
|
143 | - return ! in_array($field['name'], (array) $fields); |
|
142 | + return array_values(array_filter($this->{$entity}, function($field) use ($fields) { |
|
143 | + return !in_array($field['name'], (array) $fields); |
|
144 | 144 | })); |
145 | 145 | } |
146 | 146 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | { |
192 | 192 | $columns = $this->getColumns(); |
193 | 193 | |
194 | - return collect($columns)->pluck('entity')->reject(function ($value, $key) { |
|
194 | + return collect($columns)->pluck('entity')->reject(function($value, $key) { |
|
195 | 195 | return $value == null; |
196 | 196 | })->toArray(); |
197 | 197 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | {{-- single relationships (1-1, 1-n) --}} |
2 | 2 | <td> |
3 | 3 | <?php |
4 | - if ($entry->{$column['entity']}) { |
|
5 | - echo $entry->{$column['entity']}->{$column['attribute']}; |
|
6 | - } |
|
7 | - ?> |
|
4 | + if ($entry->{$column['entity']}) { |
|
5 | + echo $entry->{$column['entity']}->{$column['attribute']}; |
|
6 | + } |
|
7 | + ?> |
|
8 | 8 | </td> |
@@ -3,7 +3,7 @@ |
||
3 | 3 | <?php |
4 | 4 | // if the column has been cast to Carbon or Date (using attribute casting) |
5 | 5 | // get the value as a date string |
6 | -if (isset($field['value']) && ( $field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date )) { |
|
6 | +if (isset($field['value']) && ($field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date)) { |
|
7 | 7 | $field['value'] = $field['value']->toDateString(); |
8 | 8 | } |
9 | 9 | ?> |
@@ -3,11 +3,11 @@ |
||
3 | 3 | <?php |
4 | 4 | // if the column has been cast to Carbon or Date (using attribute casting) |
5 | 5 | // get the value as a date string |
6 | -if (isset($field['value']) && ( $field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date )) { |
|
6 | +if (isset($field['value']) && ($field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date)) { |
|
7 | 7 | $field['value'] = $field['value']->format('Y-m-d H:i:s'); |
8 | 8 | } |
9 | 9 | |
10 | - $field_language = isset($field['datetime_picker_options']['language'])?$field['datetime_picker_options']['language']:\App::getLocale(); |
|
10 | + $field_language = isset($field['datetime_picker_options']['language']) ? $field['datetime_picker_options']['language'] : \App::getLocale(); |
|
11 | 11 | ?> |
12 | 12 | |
13 | 13 | <div @include('crud::inc.field_wrapper_attributes') > |
@@ -3,7 +3,7 @@ |
||
3 | 3 | <?php |
4 | 4 | // if the column has been cast to Carbon or Date (using attribute casting) |
5 | 5 | // get the value as a date string |
6 | -if (isset($field['value']) && ( $field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date )) { |
|
6 | +if (isset($field['value']) && ($field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date)) { |
|
7 | 7 | $field['value'] = $field['value']->toDateTimeString(); |
8 | 8 | } |
9 | 9 | ?> |
@@ -3,11 +3,11 @@ |
||
3 | 3 | <?php |
4 | 4 | // if the column has been cast to Carbon or Date (using attribute casting) |
5 | 5 | // get the value as a date string |
6 | - if (isset($field['value']) && ( $field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date )) { |
|
6 | + if (isset($field['value']) && ($field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date)) { |
|
7 | 7 | $field['value'] = $field['value']->format('Y-m-d'); |
8 | 8 | } |
9 | 9 | |
10 | - $field_language = isset($field['date_picker_options']['language'])?$field['date_picker_options']['language']:\App::getLocale(); |
|
10 | + $field_language = isset($field['date_picker_options']['language']) ? $field['date_picker_options']['language'] : \App::getLocale(); |
|
11 | 11 | ?> |
12 | 12 | |
13 | 13 | <div @include('crud::inc.field_wrapper_attributes') > |
@@ -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 |