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

BetaTester   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 4
c 2
b 1
f 1
lcom 1
cbo 1
dl 0
loc 47
ccs 5
cts 5
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A prePersist() 0 3 1
A preUpdate() 0 3 1
A setId() 0 5 1
A getId() 0 3 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