We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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 | { |
@@ -66,20 +66,20 @@ |
||
66 | 66 | |
67 | 67 | // if a closure was passed as "filter_logic" |
68 | 68 | if ($this->doingListOperation()) { |
69 | - if ( $this->request->has( $options['name'] ) ) { |
|
70 | - if ( is_callable( $filter_logic ) ) { |
|
71 | - // apply it |
|
72 | - $filter_logic( $this->request->input( $options['name'] ) ); |
|
73 | - } else { |
|
74 | - $this->addDefaultFilterLogic( $filter->name, $filter_logic ); |
|
75 | - } |
|
76 | - } else { |
|
77 | - //if the filter is not active, but fallback logic was supplied |
|
78 | - if ( is_callable( $fallback_logic ) ) { |
|
79 | - // apply the fallback logic |
|
80 | - $fallback_logic(); |
|
81 | - } |
|
82 | - } |
|
69 | + if ( $this->request->has( $options['name'] ) ) { |
|
70 | + if ( is_callable( $filter_logic ) ) { |
|
71 | + // apply it |
|
72 | + $filter_logic( $this->request->input( $options['name'] ) ); |
|
73 | + } else { |
|
74 | + $this->addDefaultFilterLogic( $filter->name, $filter_logic ); |
|
75 | + } |
|
76 | + } else { |
|
77 | + //if the filter is not active, but fallback logic was supplied |
|
78 | + if ( is_callable( $fallback_logic ) ) { |
|
79 | + // apply the fallback logic |
|
80 | + $fallback_logic(); |
|
81 | + } |
|
82 | + } |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | public function filtersEnabled() |
10 | 10 | { |
11 | - return ! is_array($this->filters); |
|
11 | + return !is_array($this->filters); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | public function filtersDisabled() |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $this->enableFilters(); |
54 | 54 | |
55 | 55 | // check if another filter with the same name exists |
56 | - if (! isset($options['name'])) { |
|
56 | + if (!isset($options['name'])) { |
|
57 | 57 | abort(500, 'All your filters need names.'); |
58 | 58 | } |
59 | 59 | if ($this->filters->contains('name', $options['name'])) { |
@@ -66,16 +66,16 @@ discard block |
||
66 | 66 | |
67 | 67 | // if a closure was passed as "filter_logic" |
68 | 68 | if ($this->doingListOperation()) { |
69 | - if ( $this->request->has( $options['name'] ) ) { |
|
70 | - if ( is_callable( $filter_logic ) ) { |
|
69 | + if ($this->request->has($options['name'])) { |
|
70 | + if (is_callable($filter_logic)) { |
|
71 | 71 | // apply it |
72 | - $filter_logic( $this->request->input( $options['name'] ) ); |
|
72 | + $filter_logic($this->request->input($options['name'])); |
|
73 | 73 | } else { |
74 | - $this->addDefaultFilterLogic( $filter->name, $filter_logic ); |
|
74 | + $this->addDefaultFilterLogic($filter->name, $filter_logic); |
|
75 | 75 | } |
76 | 76 | } else { |
77 | 77 | //if the filter is not active, but fallback logic was supplied |
78 | - if ( is_callable( $fallback_logic ) ) { |
|
78 | + if (is_callable($fallback_logic)) { |
|
79 | 79 | // apply the fallback logic |
80 | 80 | $fallback_logic(); |
81 | 81 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | public function removeFilter($name) |
140 | 140 | { |
141 | - $this->filters = $this->filters->reject(function ($filter) use ($name) { |
|
141 | + $this->filters = $this->filters->reject(function($filter) use ($name) { |
|
142 | 142 | return $filter->name == $name; |
143 | 143 | }); |
144 | 144 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | $this->type = $options['type']; |
209 | 209 | $this->label = $options['label']; |
210 | 210 | |
211 | - if (! isset($options['placeholder'])) { |
|
211 | + if (!isset($options['placeholder'])) { |
|
212 | 212 | $this->placeholder = ''; |
213 | 213 | } else { |
214 | 214 | $this->placeholder = $options['placeholder']; |
@@ -225,16 +225,16 @@ discard block |
||
225 | 225 | |
226 | 226 | public function checkOptionsIntegrity($options) |
227 | 227 | { |
228 | - if (! isset($options['name'])) { |
|
228 | + if (!isset($options['name'])) { |
|
229 | 229 | abort(500, 'Please make sure all your filters have names.'); |
230 | 230 | } |
231 | - if (! isset($options['type'])) { |
|
231 | + if (!isset($options['type'])) { |
|
232 | 232 | abort(500, 'Please make sure all your filters have types.'); |
233 | 233 | } |
234 | - if (! \View::exists('crud::filters.'.$options['type'])) { |
|
234 | + if (!\View::exists('crud::filters.'.$options['type'])) { |
|
235 | 235 | abort(500, 'No filter view named "'.$options['type'].'.blade.php" was found.'); |
236 | 236 | } |
237 | - if (! isset($options['label'])) { |
|
237 | + if (!isset($options['label'])) { |
|
238 | 238 | abort(500, 'Please make sure all your filters have labels.'); |
239 | 239 | } |
240 | 240 | } |
@@ -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 |
@@ -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 | ?> |
@@ -87,7 +87,7 @@ |
||
87 | 87 | { |
88 | 88 | $all_relation_fields = $this->getRelationFields($form); |
89 | 89 | |
90 | - return array_where($all_relation_fields, function ($value, $key) { |
|
90 | + return array_where($all_relation_fields, function($value, $key) { |
|
91 | 91 | return isset($value['pivot']) && $value['pivot']; |
92 | 92 | }); |
93 | 93 | } |