Trigger::toArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
rs 9.6666
cc 1
eloc 6
nc 1
nop 0
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