| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 83.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | #[ORM\Entity(repositoryClass: CatalogRepository::class)] |
||
| 13 | #[ORM\Table(name: 'catalog')] |
||
| 14 | class Catalog implements CatalogInterface |
||
| 15 | { |
||
| 16 | #[ORM\Column(type: Types::INTEGER)] |
||
| 17 | #[ORM\Id, ORM\GeneratedValue(strategy: 'AUTO')] |
||
| 18 | private int $id; |
||
| 19 | |||
| 20 | #[ORM\Column(type: Types::STRING)] |
||
| 21 | private string $path = ''; |
||
| 22 | |||
| 23 | #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)] |
||
| 24 | private ?DateTimeInterface $last_updated = null; |
||
| 25 | |||
| 26 | public function getId(): int |
||
| 29 | } |
||
| 30 | |||
| 31 | 1 | public function getPath(): string |
|
| 32 | { |
||
| 33 | 1 | return $this->path; |
|
| 34 | } |
||
| 35 | |||
| 36 | 1 | public function setPath(string $path): CatalogInterface |
|
| 37 | { |
||
| 38 | 1 | $this->path = $path; |
|
| 39 | 1 | return $this; |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Returns the date of the last catalog update |
||
| 44 | */ |
||
| 45 | 1 | public function getLastUpdated(): ?DateTimeInterface |
|
| 46 | { |
||
| 47 | 1 | return $this->last_updated; |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Sets the date of the last catalog update |
||
| 52 | */ |
||
| 53 | 1 | public function setLastUpdated(DateTimeInterface $value): CatalogInterface |
|
| 57 | } |
||
| 58 | } |
||
| 59 |