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

ScriptWasCreatedEvent::broadcastOn()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
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