GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — develop ( 747436...d7218c )
by Borut
02:56
created

AbstractBasicEntity::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4286
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace Application\Entity;
4
5
/**
6
 * Abstract basic entity
7
 *
8
 * Some of the basic variables and methods (id, timeCreated and timeUpdated)
9
 *
10
 * @author Borut Balažek <[email protected]>
11
 */
12
class AbstractBasicEntity
13
{
14
    /**
15
     * @var integer
16
     */
17
    protected $id;
18
19
    /**
20
     * @var \DateTime
21
     */
22
    protected $timeCreated;
23
24
    /**
25
     * @var \DateTime
26
     */
27
    protected $timeUpdated;
28
29
    /*** Id ***/
30
    /**
31
     * @return integer
32
     */
33
    public function getId()
34
    {
35
        return $this->id;
36
    }
37
38
    /**
39
     * @param integer $id
40
     *
41
     * @return AbstractBasicEntity
42
     */
43
    public function setId($id)
44
    {
45
        $this->id = $id;
46
47
        return $this;
48
    }
49
50
    /*** Time created ***/
51
    /**
52
     * @return \DateTime
53
     */
54
    public function getTimeCreated()
55
    {
56
        return $this->timeCreated;
57
    }
58
59
    /**
60
     * @param \DateTime $timeCreated
61
     *
62
     * @return AbstractBasicEntity
63
     */
64
    public function setTimeCreated(\DateTime $timeCreated)
65
    {
66
        $this->timeCreated = $timeCreated;
67
68
        return $this;
69
    }
70
71
    /*** Time updated ***/
72
    /**
73
     * @return \DateTime
74
     */
75
    public function getTimeUpdated()
76
    {
77
        return $this->timeUpdated;
78
    }
79
80
    /**
81
     * @param \DateTime $timeUpdated
82
     *
83
     * @return AbstractBasicEntity
84
     */
85
    public function setTimeUpdated(\DateTime $timeUpdated)
86
    {
87
        $this->timeUpdated = $timeUpdated;
88
89
        return $this;
90
    }
91
92
    /**
93
     * Returns data in array
94
     *
95
     * @return array
96
     */
97
    public function toArray()
98
    {
99
        return array(
100
            'id' => $this->getId(),
101
            'time_created' => $this->getTimeCreated()->format(DATE_ATOM),
102
            'time_updated' => $this->getTimeUpdated()->format(DATE_ATOM),
103
        );
104
    }
105
}
106