Completed
Pull Request — develop (#41)
by Axel
02:25
created

Feedback::prePersist()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Developtech\AgilityBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
use Symfony\Component\Security\Core\User\UserInterface;
8
9
/**
10
 * Feedback
11
 *
12
 * @ORM\Entity(repositoryClass="Developtech\AgilityBundle\Repository\FeedbackRepository")
13
 * @ORM\Table(name="developtech_agility__feedbacks")
14
 * @ORM\HasLifecycleCallbacks()
15
 */
16
class Feedback extends Job {
17
      /** @var UserInterface */
18
      protected $author;
19
20
      const STATUS_OPEN = 0;
21
      const STATUS_TO_DO = 1;
22
      const STATUS_IN_PROGRESS = 2;
23
      const STATUS_TO_VALIDATE = 3;
24
      const STATUS_DONE = 4;
25
      const STATUS_CLOSED = 5;
26
27
      /**
28
       * Set author
29
       *
30
       * @param UserInterface $author
31
       *
32
       * @return FeedbackModel
33
       */
34 3
      public function setAuthor(UserInterface $author)
35
      {
36 3
          $this->author = $author;
37
38 3
          return $this;
39 3
      }
40
41
      /**
42
       * Get author
43
       *
44
       * @return UserInterface
45
       */
46 2
      public function getAuthor()
47
      {
48 2
          return $this->author;
49
      }
50
51
      /**
52
       * @return string
53
       */
54 1
      public function getType() {
55 1
          return self::TYPE_FEEDBACK;
56
      }
57
}
58