Completed
Push — master ( 27f52c...25a546 )
by Iman
08:14
created

BeforeReaction::afterFiringEvent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace Imanghafoori\HeyMan\Reactions;
4
5
use Imanghafoori\HeyMan\Chain;
6
7
trait BeforeReaction
8
{
9
    public function afterCalling($callback, array $parameters = []): self
10
    {
11
        resolve(Chain::class)->addCallbackBeforeReaction($callback, $parameters);
12
13
        return $this;
14
    }
15
16
    public function afterFiringEvent($event, $payload = [], $halt = false): self
17
    {
18
        resolve(Chain::class)->addEventBeforeReaction($event, $payload, $halt);
19
20
        return $this;
21
    }
22
}