| 1 | <?php |
||
| 19 | final class Activity extends StatementObject |
||
| 20 | { |
||
| 21 | private $id; |
||
| 22 | private $definition; |
||
| 23 | |||
| 24 | public function __construct(IRI $id, Definition $definition = null) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Returns the Activity's unique identifier. |
||
| 32 | */ |
||
| 33 | public function getId(): IRI |
||
| 37 | |||
| 38 | 13 | /** |
|
| 39 | 13 | * Returns the Activity's {@link Definition}. |
|
| 40 | 13 | */ |
|
| 41 | public function getDefinition(): ?Definition |
||
| 45 | |||
| 46 | /** |
||
| 47 | 1 | * {@inheritdoc} |
|
| 48 | */ |
||
| 49 | 1 | public function equals(StatementObject $object): bool |
|
| 73 | } |
||
| 74 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: