Issues (364)

app/Events/ServerCreated.php (2 issues)

Labels
1
<?php
2
3
namespace App\Events;
4
5
use Illuminate\Broadcasting\Channel;
6
use Illuminate\Broadcasting\InteractsWithSockets;
7
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
8
use Illuminate\Foundation\Events\Dispatchable;
9
use Illuminate\Queue\SerializesModels;
10
11
class ServerCreated implements ShouldBroadcastNow
12
{
13
    use Dispatchable, InteractsWithSockets, SerializesModels;
0 ignored issues
show
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Events\ServerCreated: $collectionClass, $id, $relations, $class, $connection, $keyBy
Loading history...
14
15
    /**
16
     * Create a new event instance.
17
     *
18
     * @param \App\Models\User user
0 ignored issues
show
The type App\Events\user 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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
     * @return void
20
     */
21
    public function __construct(
22
        /**
23
         * The user that created the server.
24
         */
25
        public $message
26
    ) {
27
    }
28
29
    /**
30
     * Get the channels the event should broadcast on.
31
     *
32
     * @return \Illuminate\Broadcasting\Channel|array
33
     */
34
    public function broadcastOn()
35
    {
36
        return new Channel('chat');
37
    }
38
39
    /**
40
     * The event's broadcast name.
41
     */
42
    public function broadcastAs(): string
43
    {
44
        return 'TestEvent';
45
    }
46
}
47