| Total Complexity | 7 |
| Total Lines | 93 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php // Copyright ⓒ 2018 Magneds IP B.V. - All Rights Reserved |
||
| 7 | class Project |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $id; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $name; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $description; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var DateTime |
||
| 26 | */ |
||
| 27 | protected $created; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var int |
||
| 31 | */ |
||
| 32 | protected $owner; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Project constructor. |
||
| 36 | * @param string $id |
||
| 37 | * @param string $name |
||
| 38 | * @param string $description |
||
| 39 | * @param DateTime $created |
||
| 40 | * @param int $owner |
||
| 41 | */ |
||
| 42 | public function __construct(ProjectID $id, string $name, string $description, DateTime $created, int $owner) |
||
| 43 | { |
||
| 44 | $this->id = $id; |
||
| 45 | $this->name = $name; |
||
| 46 | $this->description = $description; |
||
| 47 | $this->created = $created; |
||
| 48 | $this->owner = $owner; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return ProjectID |
||
| 53 | */ |
||
| 54 | public function getID(): ProjectID |
||
| 55 | { |
||
| 56 | return $this->id; |
||
|
|
|||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | public function getName(): string |
||
| 63 | { |
||
| 64 | return $this->name; |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | public function getDescription(): string |
||
| 71 | { |
||
| 72 | return $this->description; |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @return DateTime |
||
| 77 | */ |
||
| 78 | public function getCreated(): DateTime |
||
| 79 | { |
||
| 80 | return $this->created; |
||
| 81 | } |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return int |
||
| 85 | */ |
||
| 86 | public function getOwner(): int |
||
| 87 | { |
||
| 88 | return $this->owner; |
||
| 89 | } |
||
| 90 | |||
| 91 | public static function buildFromArray($array) |
||
| 100 | } |
||
| 101 | } |
||
| 102 |