1 | <?php |
||||
2 | |||||
3 | namespace FaithGen\Gallery\Observers; |
||||
4 | |||||
5 | use FaithGen\Gallery\Jobs\MessageFollowers; |
||||
6 | use FaithGen\Gallery\Models\Album; |
||||
7 | use FaithGen\SDK\Traits\FileTraits; |
||||
8 | use Illuminate\Support\Facades\DB; |
||||
9 | |||||
10 | class AlbumObserver |
||||
11 | { |
||||
12 | use FileTraits; |
||||
13 | |||||
14 | /** |
||||
15 | * Handle the album "created" event. |
||||
16 | * |
||||
17 | * @param \App\Models\Ministry\Album $album |
||||
0 ignored issues
–
show
|
|||||
18 | * @return void |
||||
19 | */ |
||||
20 | public function created(Album $album) |
||||
0 ignored issues
–
show
The parameter
$album 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. ![]() |
|||||
21 | { |
||||
22 | //event(new Created($album)); |
||||
23 | MessageFollowers::dispatch(); |
||||
24 | } |
||||
25 | |||||
26 | /** |
||||
27 | * Handle the album "updated" event. |
||||
28 | * |
||||
29 | * @param \App\Models\Ministry\Album $album |
||||
30 | * @return void |
||||
31 | */ |
||||
32 | public function updated(Album $album) |
||||
0 ignored issues
–
show
The parameter
$album 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. ![]() |
|||||
33 | { |
||||
34 | // |
||||
35 | } |
||||
36 | |||||
37 | /** |
||||
38 | * Handle the album "deleted" event. |
||||
39 | * |
||||
40 | * @param \App\Models\Ministry\Album $album |
||||
41 | * @return void |
||||
42 | */ |
||||
43 | public function deleted(Album $album) |
||||
44 | { |
||||
45 | if ($album->images()->exists()) { |
||||
46 | $this->deleteFiles($album); |
||||
47 | $imageIds = $album->images()->pluck('id')->toArray(); |
||||
48 | DB::table('images')->whereIn('id', $imageIds)->delete(); |
||||
49 | } |
||||
50 | } |
||||
51 | |||||
52 | /** |
||||
53 | * Handle the album "restored" event. |
||||
54 | * |
||||
55 | * @param \App\Models\Ministry\Album $album |
||||
56 | * @return void |
||||
57 | */ |
||||
58 | public function restored(Album $album) |
||||
0 ignored issues
–
show
The parameter
$album 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. ![]() |
|||||
59 | { |
||||
60 | // |
||||
61 | } |
||||
62 | |||||
63 | /** |
||||
64 | * Handle the album "force deleted" event. |
||||
65 | * |
||||
66 | * @param \App\Models\Ministry\Album $album |
||||
67 | * @return void |
||||
68 | */ |
||||
69 | public function forceDeleted(Album $album) |
||||
0 ignored issues
–
show
The parameter
$album 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. ![]() |
|||||
70 | { |
||||
71 | // |
||||
72 | } |
||||
73 | } |
||||
74 |
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