Passed
Push — master ( 12242c...e9b436 )
by Iman
08:01
created

EloquentEventsManager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 2
1
<?php
2
3
namespace Imanghafoori\HeyMan\WatchingStrategies\EloquentModels;
4
5
use Imanghafoori\HeyMan\WatchingStrategies\BaseManager;
6
7
class EloquentEventsManager extends BaseManager
8
{
9
    /**
10
     * @param $callbacks
11
     * @param $event
12
     * @param $model
13
     */
14
    protected function register(string $model, array $callbacks, string $event)
15
    {
16
        foreach ($callbacks as $cb) {
17
            $model::{$event}($cb);
18
        }
19
    }
20
}
21