ImageSaved   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 34
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getImage() 0 3 1
A broadcastOn() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace FaithGen\SDK\Events\Ministry\Profile;
4
5
use FaithGen\SDK\Models\Image;
6
use Illuminate\Broadcasting\InteractsWithSockets;
7
use Illuminate\Broadcasting\PrivateChannel;
8
use Illuminate\Foundation\Events\Dispatchable;
9
use Illuminate\Queue\SerializesModels;
10
11
class ImageSaved
12
{
13
    use Dispatchable, InteractsWithSockets, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by FaithGen\SDK\Events\Ministry\Profile\ImageSaved: $id, $relations, $class, $connection, $keyBy
Loading history...
14
    /**
15
     * @var Image
16
     */
17
    private $image;
18
19
    /**
20
     * Create a new event instance.
21
     *
22
     * @param Image $image
23
     */
24
    public function __construct(Image $image)
25
    {
26
        $this->image = $image;
27
    }
28
29
    /**
30
     * @return Image
31
     */
32
    public function getImage(): Image
33
    {
34
        return $this->image;
35
    }
36
37
    /**
38
     * Get the channels the event should broadcast on.
39
     *
40
     * @return \Illuminate\Broadcasting\Channel|array
41
     */
42
    public function broadcastOn()
43
    {
44
        return new PrivateChannel('channel-name');
45
    }
46
}
47