1 | <?php |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
2 | namespace EddIriarte\Console\Providers; |
||
0 ignored issues
–
show
|
|||
3 | |||
4 | use EddIriarte\Console\Helpers\SelectionHelper; |
||
5 | use EddIriarte\Console\Inputs\CheckboxInput; |
||
6 | use EddIriarte\Console\Inputs\RadioInput; |
||
7 | use Illuminate\Console\Command; |
||
0 ignored issues
–
show
The type
Illuminate\Console\Command was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
8 | use Illuminate\Support\ServiceProvider; |
||
9 | |||
10 | /** |
||
11 | * Class ConsoleSelectServiceProvider |
||
12 | * |
||
13 | * @package EddIriarte\Console\Providers |
||
0 ignored issues
–
show
|
|||
14 | * @author Eduardo Iriarte <eddiriarte[at]gmail[dot]com> |
||
0 ignored issues
–
show
Content of the @author tag must be in the form "Display Name <[email protected]>"
![]() |
|||
15 | */ |
||
0 ignored issues
–
show
|
|||
16 | class SelectServiceProvider extends ServiceProvider |
||
17 | { |
||
0 ignored issues
–
show
|
|||
18 | /** |
||
19 | * {@inheritdoc} |
||
20 | */ |
||
0 ignored issues
–
show
|
|||
21 | public function boot() |
||
0 ignored issues
–
show
|
|||
22 | { |
||
0 ignored issues
–
show
|
|||
23 | /* |
||
24 | * Returns a select builder. |
||
0 ignored issues
–
show
|
|||
25 | * |
||
0 ignored issues
–
show
|
|||
26 | * @param string $message |
||
0 ignored issues
–
show
|
|||
27 | * @param array $options |
||
0 ignored issues
–
show
|
|||
28 | * @param bool $allowMultiple |
||
0 ignored issues
–
show
|
|||
29 | * |
||
0 ignored issues
–
show
|
|||
30 | * @return array |
||
0 ignored issues
–
show
|
|||
31 | */ |
||
0 ignored issues
–
show
|
|||
32 | Command::macro( |
||
33 | 'select', |
||
34 | function (string $message = '', array $options = [], bool $allowMultiple = true) { |
||
0 ignored issues
–
show
|
|||
35 | $helper = new SelectionHelper($this->input, $this->output); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
36 | $question = $allowMultiple ? new CheckboxInput($message, $options) : new RadioInput($message, $options); |
||
0 ignored issues
–
show
|
|||
37 | |||
38 | return $helper->select($question); |
||
39 | } |
||
40 | ); |
||
41 | } |
||
0 ignored issues
–
show
|
|||
42 | } |
||
0 ignored issues
–
show
|
|||
43 |