UserStory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 14
dl 0
loc 62
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A prePersist() 0 3 1
A preUpdate() 0 3 1
1
<?php
2
3
namespace Scrumban\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
use Scrumban\Model\UserStory as UserStoryModel;
8
9
/**
10
 * @ORM\Entity()
11
 * @ORM\Table(name="scrumban__user_stories")
12
 * @ORM\HasLifecycleCallbacks
13
 */
14
class UserStory extends UserStoryModel
15
{
16
    /**
17
     * @ORM\Id
18
     * @ORM\Column(type="string", length=30)
19
     */
20
    protected $id;
21
    /**
22
     * @ORM\Column(type="string", length=255)
23
     */
24
    protected $title;
25
    /**
26
     * @ORM\Column(type="text")
27
     */
28
    protected $description;
29
    /**
30
     * @ORM\Column(type="integer")
31
     */
32
    protected $value;
33
    /**
34
     * @ORM\Column(type="string", length=30)
35
     */
36
    protected $status;
37
    /**
38
     * @ORM\Column(type="float")
39
     */
40
    protected $estimatedTime;
41
    /**
42
     * @ORM\Column(type="float")
43
     */
44
    protected $spentTime;
45
    /**
46
     * @ORM\ManyToOne(targetEntity="Sprint")
47
     */
48
    protected $sprint;
49
    /**
50
     * @ORM\ManyToOne(targetEntity="Epic")
51
     */
52
    protected $epic;
53
    /**
54
     * @ORM\Column(type="datetime")
55
     */
56
    protected $createdAt;
57
    /**
58
     * @ORM\Column(type="datetime")
59
     */
60
    protected $updatedAt;
61
    
62
    /**
63
     * @ORM\PrePersist()
64
     */
65
    public function prePersist()
66
    {
67
        $this->updatedAt = new \DateTime();
68
    }
69
    
70
    /**
71
     * @ORM\PreUpdate()
72
     */
73
    public function preUpdate()
74
    {
75
        $this->updatedAt = new \DateTime();
76
    }
77
}