We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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 | |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | return $this->respondToUnauthorizedRequest($request); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - if (! $this->checkIfUserIsAdmin(backpack_user())) { |
|
| 59 | + if (!$this->checkIfUserIsAdmin(backpack_user())) { |
|
| 60 | 60 | return $this->respondToUnauthorizedRequest($request); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | public function showRegistrationForm() |
| 89 | 89 | { |
| 90 | 90 | // if registration is closed, deny access |
| 91 | - if (! config('backpack.base.registration_open')) { |
|
| 91 | + if (!config('backpack.base.registration_open')) { |
|
| 92 | 92 | abort(403, trans('backpack::base.registration_closed')); |
| 93 | 93 | } |
| 94 | 94 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | public function register(Request $request) |
| 108 | 108 | { |
| 109 | 109 | // if registration is closed, deny access |
| 110 | - if (! config('backpack.base.registration_open')) { |
|
| 110 | + if (!config('backpack.base.registration_open')) { |
|
| 111 | 111 | abort(403, trans('backpack::base.registration_closed')); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -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 | }); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | private function sendUsageStats() |
| 39 | 39 | { |
| 40 | 40 | // only send usage stats in production |
| 41 | - if (! $this->runningInProduction()) { |
|
| 41 | + if (!$this->runningInProduction()) { |
|
| 42 | 42 | return; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | // will update the password on an actual user model and persist it to the |
| 46 | 46 | // database. Otherwise we will parse the error and return the response. |
| 47 | 47 | $response = $this->broker()->reset( |
| 48 | - $this->credentials($request), function ($user, $password) { |
|
| 48 | + $this->credentials($request), function($user, $password) { |
|
| 49 | 49 | $this->resetPassword($user, $password); |
| 50 | 50 | } |
| 51 | 51 | ); |
@@ -34,11 +34,11 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function verify(Request $request) |
| 36 | 36 | { |
| 37 | - if (! hash_equals((string) $request->route('id'), (string) $request->user()->getKey())) { |
|
| 37 | + if (!hash_equals((string) $request->route('id'), (string) $request->user()->getKey())) { |
|
| 38 | 38 | throw new AuthorizationException; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if (! hash_equals((string) $request->route('hash'), sha1($request->user()->getEmailForVerification()))) { |
|
| 41 | + if (!hash_equals((string) $request->route('hash'), sha1($request->user()->getEmailForVerification()))) { |
|
| 42 | 42 | throw new AuthorizationException; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | public function settings() |
| 59 | 59 | { |
| 60 | - return Arr::sort($this->settings, function ($value, $key) { |
|
| 60 | + return Arr::sort($this->settings, function($value, $key) { |
|
| 61 | 61 | return $key; |
| 62 | 62 | }); |
| 63 | 63 | } |
@@ -224,10 +224,10 @@ |
||
| 224 | 224 | // add the details_row button to the first column |
| 225 | 225 | if ($this->getOperationSetting('detailsRow')) { |
| 226 | 226 | $details_row_button = \View::make('crud::columns.inc.details_row_button') |
| 227 | - ->with('crud', $this) |
|
| 228 | - ->with('entry', $entry) |
|
| 229 | - ->with('row_number', $rowNumber) |
|
| 230 | - ->render(); |
|
| 227 | + ->with('crud', $this) |
|
| 228 | + ->with('entry', $entry) |
|
| 229 | + ->with('row_number', $rowNumber) |
|
| 230 | + ->render(); |
|
| 231 | 231 | $row_items[0] = $details_row_button.$row_items[0]; |
| 232 | 232 | } |
| 233 | 233 | |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | public function applySearchTerm($searchTerm) |
| 24 | 24 | { |
| 25 | - return $this->query->where(function ($query) use ($searchTerm) { |
|
| 25 | + return $this->query->where(function($query) use ($searchTerm) { |
|
| 26 | 26 | foreach ($this->columns() as $column) { |
| 27 | - if (! isset($column['type'])) { |
|
| 27 | + if (!isset($column['type'])) { |
|
| 28 | 28 | abort(500, 'Missing column type when trying to apply search term.', ['developer-error-exception']); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | case 'select': |
| 86 | 86 | case 'select_multiple': |
| 87 | - $query->orWhereHas($column['entity'], function ($q) use ($column, $searchTerm, $searchOperator) { |
|
| 87 | + $query->orWhereHas($column['entity'], function($q) use ($column, $searchTerm, $searchOperator) { |
|
| 88 | 88 | $q->where($this->getColumnWithTableNamePrefixed($q, $column['attribute']), $searchOperator, '%'.$searchTerm.'%'); |
| 89 | 89 | }); |
| 90 | 90 | break; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $column_direction = (strtolower((string) $order['dir']) == 'asc' ? 'ASC' : 'DESC'); |
| 109 | 109 | $column = $this->findColumnById($column_number); |
| 110 | 110 | |
| 111 | - if ($column['tableColumn'] && ! isset($column['orderLogic'])) { |
|
| 111 | + if ($column['tableColumn'] && !isset($column['orderLogic'])) { |
|
| 112 | 112 | if (method_exists($this->model, 'translationEnabled') && |
| 113 | 113 | $this->model->translationEnabled() && |
| 114 | 114 | $this->model->isTranslatableAttribute($column['name']) && |
@@ -136,12 +136,12 @@ discard block |
||
| 136 | 136 | $key = $this->model->getKeyName(); |
| 137 | 137 | $groupBy = $this->query->toBase()->groups; |
| 138 | 138 | |
| 139 | - $hasOrderByPrimaryKey = collect($orderBy)->some(function ($item) use ($key, $table) { |
|
| 139 | + $hasOrderByPrimaryKey = collect($orderBy)->some(function($item) use ($key, $table) { |
|
| 140 | 140 | return (isset($item['column']) && $item['column'] === $key) |
| 141 | 141 | || (isset($item['sql']) && str_contains($item['sql'], "$table.$key")); |
| 142 | 142 | }); |
| 143 | 143 | |
| 144 | - if (! $hasOrderByPrimaryKey && empty($groupBy)) { |
|
| 144 | + if (!$hasOrderByPrimaryKey && empty($groupBy)) { |
|
| 145 | 145 | $this->orderByWithPrefix($key, 'DESC'); |
| 146 | 146 | } |
| 147 | 147 | } |
@@ -320,13 +320,13 @@ discard block |
||
| 320 | 320 | if (isset($column['type'])) { |
| 321 | 321 | // create a list of paths to column blade views |
| 322 | 322 | // including the configured view_namespaces |
| 323 | - $columnPaths = array_map(function ($item) use ($column) { |
|
| 323 | + $columnPaths = array_map(function($item) use ($column) { |
|
| 324 | 324 | return $item.'.'.$column['type']; |
| 325 | 325 | }, ViewNamespaces::getFor('columns')); |
| 326 | 326 | |
| 327 | 327 | // but always fall back to the stock 'text' column |
| 328 | 328 | // if a view doesn't exist |
| 329 | - if (! in_array('crud::columns.text', $columnPaths)) { |
|
| 329 | + if (!in_array('crud::columns.text', $columnPaths)) { |
|
| 330 | 330 | $columnPaths[] = 'crud::columns.text'; |
| 331 | 331 | } |
| 332 | 332 | |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | */ |
| 366 | 366 | private function renderCellView($view, $column, $entry, $rowNumber = false) |
| 367 | 367 | { |
| 368 | - if (! view()->exists($view)) { |
|
| 368 | + if (!view()->exists($view)) { |
|
| 369 | 369 | $view = 'crud::columns.text'; // fallback to text column |
| 370 | 370 | } |
| 371 | 371 | |