1 | <?php |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
2 | namespace EddIriarte\Console\Inputs\Exceptions; |
||
0 ignored issues
–
show
|
|||
3 | |||
4 | class UnknownOption extends \Exception |
||
0 ignored issues
–
show
|
|||
5 | { |
||
0 ignored issues
–
show
|
|||
6 | 2 | public function __construct(string $option) |
|
0 ignored issues
–
show
|
|||
7 | { |
||
0 ignored issues
–
show
|
|||
8 | 2 | parent::__construct("Option \"$option\" does not exists."); |
|
0 ignored issues
–
show
As per coding-style, please use concatenation or
sprintf for the variable $option instead of interpolation.
It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings. // Instead of
$x = "foo $bar $baz";
// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
![]() |
|||
9 | 2 | } |
|
0 ignored issues
–
show
|
|||
10 | } |
||
0 ignored issues
–
show
|
|||
11 |