1 | <?php |
||
9 | class Activity implements Entity, JsonSerializable |
||
10 | { |
||
11 | private $id; |
||
12 | private $type; |
||
13 | private $note; |
||
14 | private $date; |
||
15 | private $creation; |
||
16 | private $modification; |
||
17 | |||
18 | public function __construct(array $data = null) |
||
22 | |||
23 | public function __clone() |
||
26 | |||
27 | public function getId(): ? string |
||
31 | |||
32 | public function getType(): ? string |
||
36 | |||
37 | public function getNote(): ? string |
||
41 | |||
42 | public function getDate(): ? DateTime |
||
46 | |||
47 | public function getCreation(): ? DateTime |
||
51 | |||
52 | public function getModification(): ? DateTime |
||
56 | |||
57 | public function reset(array $data = null) |
||
84 | |||
85 | public function setType(string $type) |
||
89 | |||
90 | public function setNote(string $note) |
||
94 | |||
95 | public function setDate(DateTime $date) |
||
99 | |||
100 | public function jsonSerialize(): array |
||
109 | } |
||
110 |
As per the PSR-2 coding standard, case statements should not be wrapped in curly braces. There is no need for braces, since each case is terminated by the next
break
.There is also the option to use a semicolon instead of a colon, this is discouraged because many programmers do not even know it works and the colon is universal between programming languages.
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.