We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -47,19 +47,19 @@ discard block |
||
47 | 47 | |
48 | 48 | // Validate validation option |
49 | 49 | $validation = $this->handleValidationOption(); |
50 | - if (! $validation) { |
|
50 | + if (!$validation) { |
|
51 | 51 | return false; |
52 | 52 | } |
53 | 53 | |
54 | 54 | // Create the CRUD Model and show output |
55 | - $this->call('backpack:crud-model', ['name' => $name]); |
|
55 | + $this->call('backpack:crud-model', [ 'name' => $name ]); |
|
56 | 56 | |
57 | 57 | // Create the CRUD Controller and show output |
58 | - $this->call('backpack:crud-controller', ['name' => $name, '--validation' => $validation]); |
|
58 | + $this->call('backpack:crud-controller', [ 'name' => $name, '--validation' => $validation ]); |
|
59 | 59 | |
60 | 60 | // Create the CRUD Request and show output |
61 | 61 | if ($validation === 'request') { |
62 | - $this->call('backpack:crud-request', ['name' => $name]); |
|
62 | + $this->call('backpack:crud-request', [ 'name' => $name ]); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | // Create the CRUD route |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | $url = Str::of(config('app.url')) |
84 | 84 | ->finish('/') |
85 | - ->when($routePrefix !== '', function ($string) use ($routePrefix) { |
|
85 | + ->when($routePrefix !== '', function($string) use ($routePrefix) { |
|
86 | 86 | return $string->append($routePrefix)->finish('/'); |
87 | 87 | }) |
88 | 88 | ->append($nameKebab); |
@@ -99,24 +99,24 @@ discard block |
||
99 | 99 | */ |
100 | 100 | private function handleValidationOption() |
101 | 101 | { |
102 | - $options = ['request', 'array', 'field']; |
|
102 | + $options = [ 'request', 'array', 'field' ]; |
|
103 | 103 | |
104 | 104 | // Validate validation option |
105 | 105 | $validation = $this->option('validation'); |
106 | 106 | |
107 | - if (! $validation) { |
|
107 | + if (!$validation) { |
|
108 | 108 | $validation = $this->askHint( |
109 | 109 | 'How would you like to define your validation rules, for the Create and Update operations?', [ |
110 | 110 | 'More info at <fg=blue>https://backpackforlaravel.com/docs/5.x/crud-operation-create#validation</>', |
111 | 111 | 'Valid options are <fg=blue>request</>, <fg=blue>array</> or <fg=blue>field</>', |
112 | - ], $options[0]); |
|
112 | + ], $options[ 0 ]); |
|
113 | 113 | |
114 | - if (! $this->option('no-interaction')) { |
|
114 | + if (!$this->option('no-interaction')) { |
|
115 | 115 | $this->deleteLines(5); |
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
119 | - if (! in_array($validation, $options)) { |
|
119 | + if (!in_array($validation, $options)) { |
|
120 | 120 | $this->errorBlock("The validation must be request, array or field. '$validation' is not valid."); |
121 | 121 | |
122 | 122 | return false; |