1 | <?php |
||||
2 | |||||
3 | use Illuminate\Container\Container; |
||||
4 | |||||
5 | if (! function_exists('laraflash')) { |
||||
6 | function laraflash(...$args) |
||||
7 | { |
||||
8 | /** @var \Coderello\Laraflash\Laraflash\Laraflash $laraflash */ |
||||
9 | $laraflash = Container::getInstance()->make('laraflash'); |
||||
10 | |||||
11 | if ($args) { |
||||
0 ignored issues
–
show
|
|||||
12 | return $laraflash->message(...$args); |
||||
0 ignored issues
–
show
$args is expanded, but the parameter $content of Coderello\Laraflash\Laraflash\Laraflash::message() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
13 | } |
||||
14 | |||||
15 | return $laraflash; |
||||
16 | } |
||||
17 | } |
||||
18 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.