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.

SettingEntity::preUpdate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Application\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * Setting Entity.
9
 *
10
 * @ORM\Table(name="settings")
11
 * @ORM\Entity(repositoryClass="Application\Repository\SettingRepository")
12
 * @ORM\HasLifecycleCallbacks()
13
 *
14
 * @author Borut Balažek <[email protected]>
15
 */
16
class SettingEntity extends AbstractMeta
17
{
18
    /**
19
     * @var int
20
     *
21
     * @ORM\Column(name="id", type="integer")
22
     * @ORM\Id
23
     * @ORM\GeneratedValue(strategy="IDENTITY")
24
     */
25
    protected $id;
26
27
    /**
28
     * @var string
29
     *
30
     * @ORM\Column(name="`key`", type="string", length=255)
31
     */
32
    protected $key;
33
34
    /**
35
     * @var string
36
     *
37
     * @ORM\Column(name="`value`", type="text", nullable=true)
38
     */
39
    protected $value;
40
41
    /**
42
     * @var \DateTime
43
     *
44
     * @ORM\Column(name="time_created", type="datetime")
45
     */
46
    protected $timeCreated;
47
48
    /**
49
     * @var \DateTime
50
     *
51
     * @ORM\Column(name="time_updated", type="datetime")
52
     */
53
    protected $timeUpdated;
54
55
    /**
56
     * @ORM\PreUpdate
57
     */
58
    public function preUpdate()
59
    {
60
        $this->setTimeUpdated(new \DateTime('now'));
61
    }
62
63
    /**
64
     * @ORM\PrePersist
65
     */
66
    public function prePersist()
67
    {
68
        $this->setTimeCreated(new \DateTime('now'));
69
        $this->setTimeUpdated(new \DateTime('now'));
70
    }
71
}
72