Trigger   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 81
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 3
Bugs 1 Features 2
Metric Value
wmc 8
c 3
b 1
f 2
lcom 1
cbo 0
dl 0
loc 81
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 9 1
A getId() 0 4 1
A setName() 0 4 1
A getNotificationId() 0 4 1
A getServiceName() 0 4 1
A getType() 0 4 1
A getValue() 0 4 1
A getOperator() 0 4 1
1
<?php
2
namespace Monitor\Model;
3
4
/**
5
 * @Entity @Table(name="notification_triggers")
6
 **/
7
class Trigger
8
{
9
    /**
10
     * @Id @Column(type="integer") @GeneratedValue
11
     **/
12
    private $id;
13
    /**
14
     * @Column(type="integer")
15
     **/
16
    private $notification_id;
17
    /**
18
     * @Column(type="string")
19
     **/
20
    private $value;
21
    /**
22
     * @Column(type="string")
23
     **/
24
    private $name;
25
    /**
26
     * @Column(type="string")
27
     **/
28
    private $serviceName;
29
    /**
30
     * @Column(type="string")
31
     **/
32
    private $operator;
33
    /**
34
     * @Column(type="string")
35
     **/
36
    private $type;
37
    
38
    /**
39
     * Return properties
40
     *
41
     * @return array
42
     */
43
    public function toArray()
44
    {
45
        return [
46
            'triggerName'   => $this->name,
47
            'triggerValue'  => $this->value,
48
            'serviceName'   => $this->serviceName,
49
            'operator'      => $this->operator
50
        ];
51
    }
52
    
53
    public function getId()
54
    {
55
        return $this->id;
56
    }
57
58
    public function setName($name)
59
    {
60
        $this->name = $name;
61
    }
62
63
    public function getNotificationId()
64
    {
65
        return $this->notification_id;
66
    }
67
    
68
    public function getServiceName()
69
    {
70
        return $this->serviceName;
71
    }
72
    
73
    public function getType()
74
    {
75
        return $this->type;
76
    }
77
78
    public function getValue()
79
    {
80
        return $this->value;
81
    }
82
83
    public function getOperator()
84
    {
85
        return $this->operator;
86
    }
87
}
88