We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function getTitle($action = false) |
23 | 23 | { |
24 | - if (! $action) { |
|
24 | + if (!$action) { |
|
25 | 25 | $action = $this->getActionMethod(); |
26 | 26 | } |
27 | 27 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function setTitle($string, $action = false) |
40 | 40 | { |
41 | - if (! $action) { |
|
41 | + if (!$action) { |
|
42 | 42 | $action = $this->getActionMethod(); |
43 | 43 | } |
44 | 44 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function getHeading($action = false) |
60 | 60 | { |
61 | - if (! $action) { |
|
61 | + if (!$action) { |
|
62 | 62 | $action = $this->getActionMethod(); |
63 | 63 | } |
64 | 64 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function setHeading($string, $action = false) |
77 | 77 | { |
78 | - if (! $action) { |
|
78 | + if (!$action) { |
|
79 | 79 | $action = $this->getActionMethod(); |
80 | 80 | } |
81 | 81 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function getSubheading($action = false) |
97 | 97 | { |
98 | - if (! $action) { |
|
98 | + if (!$action) { |
|
99 | 99 | $action = $this->getActionMethod(); |
100 | 100 | } |
101 | 101 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function setSubheading($string, $action = false) |
114 | 114 | { |
115 | - if (! $action) { |
|
115 | + if (!$action) { |
|
116 | 116 | $action = $this->getActionMethod(); |
117 | 117 | } |
118 | 118 |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | foreach ($fields as &$field) { |
53 | 53 | // set the value |
54 | - if (! isset($field['value'])) { |
|
54 | + if (!isset($field['value'])) { |
|
55 | 55 | if (isset($field['subfields'])) { |
56 | 56 | $field['value'] = []; |
57 | 57 | foreach ($field['subfields'] as $subfield) { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | } |
65 | 65 | |
66 | 66 | // always have a hidden input for the entry id |
67 | - if (! array_key_exists('id', $fields)) { |
|
67 | + if (!array_key_exists('id', $fields)) { |
|
68 | 68 | $fields['id'] = [ |
69 | 69 | 'name' => $entry->getKeyName(), |
70 | 70 | 'value' => $entry->getKey(), |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | { |
88 | 88 | if (isset($field['entity'])) { |
89 | 89 | $relationArray = explode('.', $field['entity']); |
90 | - $relatedModel = array_reduce(array_splice($relationArray, 0, -1), function ($obj, $method) { |
|
90 | + $relatedModel = array_reduce(array_splice($relationArray, 0, -1), function($obj, $method) { |
|
91 | 91 | return $obj->{$method} ? $obj->{$method} : $obj; |
92 | 92 | }, $model); |
93 | 93 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $this->set($op.'.access', false); |
34 | 34 | } |
35 | 35 | |
36 | - return ! $this->hasAccessToAny($operation); |
|
36 | + return !$this->hasAccessToAny($operation); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | public function hasAccessToAll($operation_array) |
74 | 74 | { |
75 | 75 | foreach ((array) $operation_array as $key => $operation) { |
76 | - if (! $this->get($operation.'.access')) { |
|
76 | + if (!$this->get($operation.'.access')) { |
|
77 | 77 | return false; |
78 | 78 | } |
79 | 79 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function hasAccessOrFail($operation) |
92 | 92 | { |
93 | - if (! $this->get($operation.'.access')) { |
|
93 | + if (!$this->get($operation.'.access')) { |
|
94 | 94 | throw new AccessDeniedException(trans('backpack::crud.unauthorized_access', ['access' => $operation])); |
95 | 95 | } |
96 | 96 |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->enableFilters(); |
60 | 60 | |
61 | 61 | // check if another filter with the same name exists |
62 | - if (! isset($options['name'])) { |
|
62 | + if (!isset($options['name'])) { |
|
63 | 63 | abort(500, 'All your filters need names.'); |
64 | 64 | } |
65 | 65 | if ($this->filters()->contains('name', $options['name'])) { |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | { |
202 | 202 | $filter = $this->filters()->firstWhere('name', $name); |
203 | 203 | |
204 | - if (! $filter) { |
|
204 | + if (!$filter) { |
|
205 | 205 | abort(500, 'CRUD Filter "'.$name.'" not found. Please check the filter exists before you modify it.'); |
206 | 206 | } |
207 | 207 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | public function removeFilter($name) |
218 | 218 | { |
219 | - $strippedFiltersCollection = $this->filters()->reject(function ($filter) use ($name) { |
|
219 | + $strippedFiltersCollection = $this->filters()->reject(function($filter) use ($name) { |
|
220 | 220 | return $filter->name == $name; |
221 | 221 | }); |
222 | 222 | |
@@ -278,16 +278,16 @@ discard block |
||
278 | 278 | |
279 | 279 | public function checkOptionsIntegrity($options) |
280 | 280 | { |
281 | - if (! isset($options['name'])) { |
|
281 | + if (!isset($options['name'])) { |
|
282 | 282 | abort(500, 'Please make sure all your filters have names.'); |
283 | 283 | } |
284 | - if (! isset($options['type'])) { |
|
284 | + if (!isset($options['type'])) { |
|
285 | 285 | abort(500, 'Please make sure all your filters have types.'); |
286 | 286 | } |
287 | - if (! \View::exists('crud::filters.'.$options['type'])) { |
|
287 | + if (!\View::exists('crud::filters.'.$options['type'])) { |
|
288 | 288 | abort(500, 'No filter view named "'.$options['type'].'.blade.php" was found.'); |
289 | 289 | } |
290 | - if (! isset($options['label'])) { |
|
290 | + if (!isset($options['label'])) { |
|
291 | 291 | abort(500, 'Please make sure all your filters have labels.'); |
292 | 292 | } |
293 | 293 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | */ |
69 | 69 | public function customOrderBy($column, $columnDirection = 'asc') |
70 | 70 | { |
71 | - if (! isset($column['orderLogic'])) { |
|
71 | + if (!isset($column['orderLogic'])) { |
|
72 | 72 | return $this->query; |
73 | 73 | } |
74 | 74 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * Order results of the query in a custom way. |
66 | 66 | * |
67 | 67 | * @param array $column Column array with all attributes |
68 | - * @param string $column_direction ASC or DESC |
|
68 | + * @param string $columnDirection ASC or DESC |
|
69 | 69 | * |
70 | 70 | * @return \Illuminate\Database\Eloquent\Builder |
71 | 71 | */ |
@@ -94,7 +94,7 @@ |
||
94 | 94 | */ |
95 | 95 | public function isRequired($inputKey) |
96 | 96 | { |
97 | - if (! $this->hasOperationSetting('requiredFields')) { |
|
97 | + if (!$this->hasOperationSetting('requiredFields')) { |
|
98 | 98 | return false; |
99 | 99 | } |
100 | 100 |
@@ -107,7 +107,6 @@ |
||
107 | 107 | * for the given operation. |
108 | 108 | * |
109 | 109 | * @param string $inputKey Field or input name. |
110 | - * @param string $operation create / update |
|
111 | 110 | * |
112 | 111 | * @return bool |
113 | 112 | */ |
@@ -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 |
@@ -41,9 +41,9 @@ |
||
41 | 41 | */ |
42 | 42 | public function withValidator($validator) |
43 | 43 | { |
44 | - $validator->after(function ($validator) { |
|
44 | + $validator->after(function($validator) { |
|
45 | 45 | // check old password matches |
46 | - if (! Hash::check($this->input('old_password'), backpack_auth()->user()->password)) { |
|
46 | + if (!Hash::check($this->input('old_password'), backpack_auth()->user()->password)) { |
|
47 | 47 | $validator->errors()->add('old_password', trans('backpack::base.old_password_incorrect')); |
48 | 48 | } |
49 | 49 | }); |