Passed
Push — master ( 617e52...ff4e9f )
by Arthur
35:51
created

ScriptWasCreatedEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 33
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A broadcastOn() 0 3 1
1
<?php
2
3
namespace Modules\Script\Events;
4
5
use Foundation\Abstracts\Events\Event;
6
use Modules\Script\Entities\Script;
7
use Modules\Script\Listeners\PublishInitialScriptRelease;
8
9
class ScriptWasCreatedEvent extends Event
10
{
11
12
    /**
13
     * The listeners that will be fired when the event is dispatched.
14
     * @var array
15
     */
16
    public $listeners = [
17
        PublishInitialScriptRelease::class
18
    ];
19
20
    /**
21
     * @var Script
22
     */
23
    public $script;
24
25
    /**
26
     * Create a new event instance.
27
     *
28
     */
29 7
    public function __construct(Script $script)
30
    {
31 7
        $this->script = $script;
32 7
    }
33
34
    /**
35
     * Get the channels the event should be broadcast on.
36
     *
37
     * @return array
38
     */
39
    public function broadcastOn()
40
    {
41
        return [];
42
    }
43
}
44