We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -42,13 +42,13 @@ |
||
42 | 42 | { |
43 | 43 | $this->crud->allowAccess('create'); |
44 | 44 | |
45 | - $this->crud->operation('create', function () { |
|
45 | + $this->crud->operation('create', function() { |
|
46 | 46 | $this->crud->set('create.groupedErrors', config('backpack.crud.show_grouped_errors', true)); |
47 | 47 | $this->crud->set('create.inlineErrors', config('backpack.crud.show_inline_errors', true)); |
48 | 48 | $this->crud->set('create.autoFocusOnFirstField', true); |
49 | 49 | }); |
50 | 50 | |
51 | - $this->crud->operation('list', function () { |
|
51 | + $this->crud->operation('list', function() { |
|
52 | 52 | $this->crud->addButton('top', 'create', 'view', 'crud::buttons.create'); |
53 | 53 | }); |
54 | 54 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $this->crud->allowAccess('show'); |
31 | 31 | |
32 | - $this->crud->operation('list', function () { |
|
32 | + $this->crud->operation('list', function() { |
|
33 | 33 | $this->crud->addButton('line', 'show', 'view', 'crud::buttons.show', 'beginning'); |
34 | 34 | }); |
35 | 35 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $this->crud->allowAccess('delete'); |
31 | 31 | |
32 | - $this->crud->operation(['list', 'show'], function () { |
|
32 | + $this->crud->operation(['list', 'show'], function() { |
|
33 | 33 | $this->crud->addButton('line', 'delete', 'view', 'crud::buttons.delete', 'end'); |
34 | 34 | }); |
35 | 35 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | // call the setup function inside this closure to also have the request there |
29 | 29 | // this way, developers can use things stored in session (auth variables, etc) |
30 | - $this->middleware(function ($request, $next) { |
|
30 | + $this->middleware(function($request, $next) { |
|
31 | 31 | // make a new CrudPanel object, from the one stored in Laravel's service container |
32 | 32 | $this->crud = app()->make('crud'); |
33 | 33 | $this->request = $request; |
@@ -2,10 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD\app\Http\Controllers; |
4 | 4 | |
5 | -use Illuminate\Http\Request; |
|
6 | -use Illuminate\Routing\Controller; |
|
7 | 5 | use Illuminate\Foundation\Bus\DispatchesJobs; |
8 | 6 | use Illuminate\Foundation\Validation\ValidatesRequests; |
7 | +use Illuminate\Routing\Controller; |
|
9 | 8 | |
10 | 9 | class CrudController extends Controller |
11 | 10 | { |
@@ -247,7 +247,7 @@ |
||
247 | 247 | |
248 | 248 | private function getButtonByName($name) |
249 | 249 | { |
250 | - return $this->crudPanel->buttons()->first(function ($value) use ($name) { |
|
250 | + return $this->crudPanel->buttons()->first(function($value) use ($name) { |
|
251 | 251 | return $value->name == $name; |
252 | 252 | }); |
253 | 253 | } |
@@ -110,14 +110,14 @@ |
||
110 | 110 | // if there was an order set, this will be the last one (after all others were applied) |
111 | 111 | $orderBy = $this->crud->query->getQuery()->orders; |
112 | 112 | $hasOrderByPrimaryKey = false; |
113 | - collect($orderBy)->each(function ($item, $key) use ($hasOrderByPrimaryKey) { |
|
113 | + collect($orderBy)->each(function($item, $key) use ($hasOrderByPrimaryKey) { |
|
114 | 114 | if ($item['column'] == $this->crud->model->getKeyName()) { |
115 | 115 | $hasOrderByPrimaryKey = true; |
116 | 116 | |
117 | 117 | return false; |
118 | 118 | } |
119 | 119 | }); |
120 | - if (! $hasOrderByPrimaryKey) { |
|
120 | + if (!$hasOrderByPrimaryKey) { |
|
121 | 121 | $this->crud->query->orderByDesc($this->crud->model->getKeyName()); |
122 | 122 | } |
123 | 123 |
@@ -3,9 +3,9 @@ |
||
3 | 3 | namespace Backpack\CRUD\app\Console\Commands; |
4 | 4 | |
5 | 5 | use Illuminate\Console\Command; |
6 | -use Symfony\Component\Process\Process; |
|
7 | 6 | use Illuminate\Support\Facades\Storage; |
8 | 7 | use Symfony\Component\Process\Exception\ProcessFailedException; |
8 | +use Symfony\Component\Process\Process; |
|
9 | 9 | |
10 | 10 | class AddCustomRouteContent extends Command |
11 | 11 | { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | $process = new Process($command, null, null, null, 300, null); |
68 | 68 | |
69 | - $process->run(function ($type, $buffer) { |
|
69 | + $process->run(function($type, $buffer) { |
|
70 | 70 | if (Process::ERR === $type) { |
71 | 71 | $this->line($buffer); |
72 | 72 | } else { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | }); |
76 | 76 | |
77 | 77 | // executes after the command finishes |
78 | - if (! $process->isSuccessful()) { |
|
78 | + if (!$process->isSuccessful()) { |
|
79 | 79 | throw new ProcessFailedException($process); |
80 | 80 | } |
81 | 81 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | // otherwise, in case the last line HAS been modified |
96 | 96 | // return the last line that has an ending in it |
97 | - $possible_end_lines = array_filter($file_lines, function ($k) { |
|
97 | + $possible_end_lines = array_filter($file_lines, function($k) { |
|
98 | 98 | return strpos($k, '});') === 0; |
99 | 99 | }); |
100 | 100 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | /** |
31 | 31 | * Execute the console command. |
32 | 32 | * |
33 | - * @return mixed |
|
33 | + * @return false|null |
|
34 | 34 | */ |
35 | 35 | public function handle() |
36 | 36 | { |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | /** |
153 | 153 | * Write text to the screen for the user to see. |
154 | 154 | * |
155 | - * @param [string] $type line, info, comment, question, error |
|
155 | + * @param string $type line, info, comment, question, error |
|
156 | 156 | * @param [string] $content |
157 | 157 | */ |
158 | 158 | public function echo($type, $content) |
@@ -3,8 +3,8 @@ |
||
3 | 3 | namespace Backpack\CRUD\app\Console\Commands; |
4 | 4 | |
5 | 5 | use Illuminate\Console\Command; |
6 | -use Symfony\Component\Process\Process; |
|
7 | 6 | use Symfony\Component\Process\Exception\ProcessFailedException; |
7 | +use Symfony\Component\Process\Process; |
|
8 | 8 | |
9 | 9 | class Install extends Command |
10 | 10 | { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $this->executeProcess('mkdir -p public/uploads'); |
86 | 86 | break; |
87 | 87 | case '\\': // windows |
88 | - if (! file_exists('public\uploads')) { |
|
88 | + if (!file_exists('public\uploads')) { |
|
89 | 89 | $this->executeProcess('mkdir public\uploads'); |
90 | 90 | } |
91 | 91 | break; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $this->echo('info', $beforeNotice ? ' '.$beforeNotice : $command); |
128 | 128 | |
129 | 129 | $process = new Process($command, null, null, null, $this->option('timeout'), null); |
130 | - $process->run(function ($type, $buffer) { |
|
130 | + $process->run(function($type, $buffer) { |
|
131 | 131 | if (Process::ERR === $type) { |
132 | 132 | $this->echo('comment', $buffer); |
133 | 133 | } else { |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | }); |
137 | 137 | |
138 | 138 | // executes after the command finishes |
139 | - if (! $process->isSuccessful()) { |
|
139 | + if (!$process->isSuccessful()) { |
|
140 | 140 | throw new ProcessFailedException($process); |
141 | 141 | } |
142 | 142 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | /** |
34 | 34 | * Execute the console command. |
35 | 35 | * |
36 | - * @return bool|null |
|
36 | + * @return false|null |
|
37 | 37 | */ |
38 | 38 | public function handle() |
39 | 39 | { |
@@ -71,9 +71,8 @@ discard block |
||
71 | 71 | * Replace the User model, if it was moved to App\Models\User. |
72 | 72 | * |
73 | 73 | * @param string $stub |
74 | - * @param string $name |
|
75 | 74 | * |
76 | - * @return $this |
|
75 | + * @return string |
|
77 | 76 | */ |
78 | 77 | protected function makeReplacements(&$stub) |
79 | 78 | { |