1 | <?php |
||||
2 | |||||
3 | namespace Innoflash\Events\Observers; |
||||
4 | |||||
5 | use FaithGen\SDK\Traits\FileTraits; |
||||
6 | use Innoflash\Events\Guest\Saved; |
||||
0 ignored issues
–
show
|
|||||
7 | use Innoflash\Events\Models\Guest; |
||||
8 | |||||
9 | class GuestObserver |
||||
10 | { |
||||
11 | use FileTraits; |
||||
12 | |||||
13 | public function deleted(Guest $guest) |
||||
14 | { |
||||
15 | if ($guest->image()->exists()) { |
||||
16 | $this->deleteFiles($guest); |
||||
17 | $guest->image()->delete(); |
||||
18 | } |
||||
19 | } |
||||
20 | |||||
21 | public function created(Guest $guest) |
||||
22 | { |
||||
23 | event(new Saved($guest, request('image'))); |
||||
24 | } |
||||
25 | |||||
26 | public function updated(Guest $guest) |
||||
0 ignored issues
–
show
The parameter
$guest is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
27 | { |
||||
28 | } |
||||
29 | } |
||||
30 |
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.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths