Completed
Push — develop ( da2907...7e8dc0 )
by Axel
10s
created

BetaTester::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Developtech\AgilityBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
use Developtech\AgilityBundle\Model\BetaTesterModel;
8
9
/**
10
 * @ORM\Entity(repositoryClass="Developtech\AgilityBundle\Repository\BetaTesterRepository")
11
 * @ORM\Table(name="developtech_agility__beta_testers")
12
 * @ORM\HasLifecycleCallbacks()
13
 */
14
class BetaTester extends BetaTesterModel {
15
    /**
16
     * @ORM\Id
17
     * @ORM\GeneratedValue(strategy="AUTO")
18
     * @ORM\Column(type="integer")
19
     */
20
    protected $id;
21
    /**
22
     * @ORM\Column(name="created_at", type="datetime")
23
     */
24
    protected $createdAt;
25
    /**
26
     * @ORM\Column(name="updated_at", type="datetime")
27
     */
28
    protected $updatedAt;
29
30
    /**
31
     * @ORM\PrePersist()
32
     */
33
    public function prePersist() {
34
        $this->createdAt = $this->updatedAt = new \DateTime();
35
    }
36
37
    /**
38
     * @ORM\PreUpdate()
39
     */
40
    public function preUpdate() {
41
        $this->updatedAt = new \DateTime();
42
    }
43
44
    /**
45
     * @param integer $id
46
     * @return BetaTester
47
     */
48 1
    public function setId($id) {
49 1
        $this->id = $id;
50
51 1
        return $this;
52
    }
53
54
    /**
55
     * @return integer
56
     */
57 1
    public function getId() {
58 1
        return $this->id;
59
    }
60
}
61