ModelEventsTrait   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 90
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 90
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A onBeforeCreate() 0 4 1
A onAfterCreate() 0 4 1
A onBeforeUpdate() 0 4 1
A onAfterUpdate() 0 4 1
A onBeforeSave() 0 4 1
A onAfterSave() 0 4 1
A onBeforeDelete() 0 4 1
A onAfterDelete() 0 4 1
1
<?php
2
3
namespace Arrilot\BitrixModels\Models\Traits;
4
5
trait ModelEventsTrait
6
{
7
    /**
8
     * Hook into before item create.
9
     *
10
     * @return mixed
11
     */
12
    protected function onBeforeCreate()
13
    {
14
        //
15
    }
16
17
    /**
18
     * Hook into after item create.
19
     *
20
     * @param bool $result
21
     *
22
     * @return void
23
     */
24
    protected function onAfterCreate($result)
0 ignored issues
show
Unused Code introduced by
The parameter $result is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
    {
26
        //
27
    }
28
29
    /**
30
     * Hook into before item update.
31
     *
32
     * @return mixed
33
     */
34
    protected function onBeforeUpdate()
35
    {
36
        //
37
    }
38
39
    /**
40
     * Hook into after item update.
41
     *
42
     * @param bool $result
43
     *
44
     * @return void
45
     */
46
    protected function onAfterUpdate($result)
0 ignored issues
show
Unused Code introduced by
The parameter $result is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
47
    {
48
        //
49
    }
50
51
    /**
52
     * Hook into before item create or update.
53
     *
54
     * @return mixed
55
     */
56
    protected function onBeforeSave()
57
    {
58
        //
59
    }
60
61
    /**
62
     * Hook into after item create or update.
63
     *
64
     * @param bool $result
65
     *
66
     * @return void
67
     */
68
    protected function onAfterSave($result)
0 ignored issues
show
Unused Code introduced by
The parameter $result is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
69
    {
70
        //
71
    }
72
73
    /**
74
     * Hook into before item delete.
75
     *
76
     * @return mixed
77
     */
78
    protected function onBeforeDelete()
79
    {
80
        //
81
    }
82
83
    /**
84
     * Hook into after item delete.
85
     *
86
     * @param bool $result
87
     *
88
     * @return void
89
     */
90
    protected function onAfterDelete($result)
0 ignored issues
show
Unused Code introduced by
The parameter $result is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
91
    {
92
        //
93
    }
94
}
95