| Total Complexity | 10 |
| Total Lines | 94 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Demo |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var int |
||
| 12 | */ |
||
| 13 | public $id; |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | public $firstName; |
||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | public $lastName; |
||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | public $email; |
||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | public $mobile; |
||
| 30 | /** |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | public $phone; |
||
| 34 | /** |
||
| 35 | * @var string |
||
| 36 | */ |
||
| 37 | public $deletedAt; |
||
| 38 | /** |
||
| 39 | * @var string |
||
| 40 | */ |
||
| 41 | public $createdAt; |
||
| 42 | /** |
||
| 43 | * @var string |
||
| 44 | */ |
||
| 45 | public $updatedAt; |
||
| 46 | |||
| 47 | public function __construct() |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | public function getCreatedAt(): string |
||
| 55 | { |
||
| 56 | return $this->createdAt; |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param null|string $datetime |
||
| 61 | */ |
||
| 62 | public function setCreatedAt(?string $datetime = null): void |
||
| 66 | } |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getUpdatedAt(): string |
||
| 73 | { |
||
| 74 | return $this->updatedAt; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @param null|string $datetime |
||
| 79 | */ |
||
| 80 | public function setUpdatedAt(?string $datetime = null): void |
||
| 81 | { |
||
| 82 | if (\is_string($datetime)) { |
||
| 83 | $this->updatedAt = new \DateTime($datetime); |
||
| 84 | } |
||
| 85 | } |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @return string |
||
| 89 | */ |
||
| 90 | public function getDeletedAt(): string |
||
| 93 | } |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @param null|string $datetime |
||
| 97 | */ |
||
| 98 | public function setDeletedAt(?string $datetime = null): void |
||
| 102 | } |
||
| 103 | } |
||
| 104 | } |
||
| 105 |
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..