Completed
Pull Request — master (#9)
by Samuel
03:17
created

AbstractBehaviour   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 6
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 44
ccs 8
cts 12
cp 0.6667
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A beforeInsert() 0 3 1
A afterInsert() 0 3 1
A beforeUpdate() 0 3 1
A afterUpdate() 0 3 1
A beforeDelete() 0 3 1
A afterDelete() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace SimpleMapper\Behaviour;
5
6
use SimpleMapper\ActiveRow;
7
8
abstract class AbstractBehaviour implements Behaviour
9
{
10
    /**
11
     * @inheritdoc
12
     */
13
    public function beforeInsert(array $data): array
14
    {
15
    }
16
17
    /**
18
     * @inheritdoc
19
     */
20 2
    public function afterInsert(ActiveRow $record, array $data): void
21
    {
22 2
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27
    public function beforeUpdate(ActiveRow $record, array $data): array
28
    {
29
    }
30
31
    /**
32
     * @inheritdoc
33
     */
34 2
    public function afterUpdate(ActiveRow $oldRecord, ActiveRow $newRecord, array $data): void
35
    {
36 2
    }
37
38
    /**
39
     * @inheritdoc
40
     */
41 2
    public function beforeDelete(ActiveRow $record, bool $soft): void
42
    {
43 2
    }
44
45
    /**
46
     * @inheritdoc
47
     */
48 2
    public function afterDelete(ActiveRow $record, bool $soft): void
49
    {
50 2
    }
51
}
52