JobModel   A
last analyzed

Complexity

Total Complexity 16

Size/Duplication

Total Lines 172
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 16
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 172
ccs 40
cts 40
cp 1
rs 10

16 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 5 1
A getName() 0 3 1
A setSlug() 0 5 1
A getSlug() 0 3 1
A setDescription() 0 5 1
A getDescription() 0 3 1
A getProject() 0 3 1
A setStatus() 0 5 1
A getStatus() 0 3 1
A getResponsible() 0 3 1
A setCreatedAt() 0 6 1
A getCreatedAt() 0 4 1
A setUpdatedAt() 0 6 1
A getUpdatedAt() 0 4 1
A setProject() 0 5 1
A setResponsible() 0 5 1
1
<?php
2
3
namespace Developtech\AgilityBundle\Model;
4
5
use Symfony\Component\Security\Core\User\UserInterface;
6
7
abstract class JobModel {
8
  /** @var string */
9
  protected $name;
10
  /** @var string */
11
  protected $slug;
12
  /** @var string*/
13
  protected $description;
14
  /** @var \DateTime*/
15
  protected $createdAt;
16
  /** @var \DateTime */
17
  protected $updatedAt;
18
  /** @var integer */
19
  protected $status;
20
  /** @var ProjectModel */
21
  protected $project;
22
  /** @var object */
23
  protected $responsible;
24
25
  const TYPE_FEATURE = 'US';
26
  const TYPE_FEEDBACK = 'FB';
27
28
  /**
29
   * @param string $name
30
   * @return FeatureModel
31
   */
32 10
  public function setName($name) {
33 10
      $this->name = $name;
34
35 10
      return $this;
36
  }
37
38
  /**
39
   * @return string
40
   */
41 5
  public function getName() {
42 5
      return $this->name;
43
  }
44
45
  /**
46
   * @param string $slug
47
   * @return FeatureModel
48
   */
49 10
  public function setSlug($slug) {
50 10
      $this->slug = $slug;
51
52 10
      return $this;
53
  }
54
55
  /**
56
   * @return string
57
   */
58 4
  public function getSlug() {
59 4
      return $this->slug;
60
  }
61
62
  /**
63
   * @param string $description
64
   * @return FeatureModel
65
   */
66 10
  public function setDescription($description) {
67 10
      $this->description = $description;
68
69 10
      return $this;
70
  }
71
72
  /**
73
   * @return string
74
   */
75 3
  public function getDescription() {
76 3
      return $this->description;
77
  }
78
79
  /**
80
   * @param ProjectModel $project
81
   * @return FeatureModel
82
   */
83 10
  public function setProject(ProjectModel $project) {
84 10
      $this->project = $project;
85
86 10
      return $this;
87
  }
88
89
  /**
90
   * @return FeatureModel
91
   */
92 4
  public function getProject() {
93 4
      return $this->project;
94
  }
95
96
  /**
97
   * @param integer $status
98
   * @return FeatureModel
99
   */
100 5
  public function setStatus($status) {
101 5
      $this->status = $status;
102
103 5
      return $this;
104
  }
105
106
  /**
107
   * @return integer
108
   */
109 4
  public function getStatus() {
110 4
      return $this->status;
111
  }
112
113
  /**
114
   * @param UserInterface $responsible
115
   * @return FeatureModel
116
   */
117 8
  public function setResponsible(UserInterface $responsible = null) {
118 8
      $this->responsible = $responsible;
119
120 8
      return $this;
121
  }
122
123
  /**
124
   * @return object
125
   */
126 2
  public function getResponsible() {
127 2
      return $this->responsible;
128
  }
129
130
131
  /**
132
   * Set createdAt
133
   *
134
   * @param \DateTime $createdAt
135
   *
136
   * @return ProjectModel
137
   */
138 8
  public function setCreatedAt($createdAt)
139
  {
140 8
      $this->createdAt = $createdAt;
0 ignored issues
show
Documentation Bug introduced by
It seems like $createdAt of type object<DateTime> is incompatible with the declared type object<DateTime*/> of property $createdAt.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
141
142 8
      return $this;
143
  }
144
145
  /**
146
   * Get createdAt
147
   *
148
   * @return \DateTime
149
   */
150 2
  public function getCreatedAt()
151
  {
152 2
      return $this->createdAt;
153
  }
154
155
  /**
156
   * Set updatedAt
157
   *
158
   * @param \DateTime $updatedAt
159
   *
160
   * @return ProjectModel
161
   */
162 8
  public function setUpdatedAt($updatedAt)
163
  {
164 8
      $this->updatedAt = $updatedAt;
165
166 8
      return $this;
167
  }
168
169
  /**
170
   * Get updatedAt
171
   *
172
   * @return \DateTime
173
   */
174 2
  public function getUpdatedAt()
175
  {
176 2
      return $this->updatedAt;
177
  }
178
}
179