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