Total Complexity | 4 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 88.89% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class Snapshot extends Behavior |
||
19 | { |
||
20 | use SkippableTrait; |
||
21 | |||
22 | 2 | public function notify(string $type, ModelInterface $model): ?bool |
|
23 | { |
||
24 | 2 | if (!$this->isEnabled()) { |
|
25 | return null; |
||
26 | } |
||
27 | |||
28 | 2 | if ($type === 'beforeCreate') { |
|
29 | 2 | $this->beforeCreate($model); |
|
30 | } |
||
31 | |||
32 | 2 | return null; |
|
33 | } |
||
34 | |||
35 | 2 | public function beforeCreate(ModelInterface $model): void |
|
39 | } |
||
40 | } |
||
41 |