| Total Complexity | 5 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class Content extends AbstractComponent |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @ORM\Column() |
||
| 22 | * @Groups({"component", "content"}) |
||
| 23 | * @var null|string |
||
| 24 | */ |
||
| 25 | protected $title; |
||
| 26 | |||
| 27 | 1 | /** |
|
| 28 | * @ORM\Column(type="text") |
||
| 29 | 1 | * @Groups({"content", "component"}) |
|
| 30 | 1 | * @var string |
|
| 31 | 1 | */ |
|
| 32 | private $content; |
||
| 33 | 1 | ||
| 34 | public static function loadValidatorMetadata(ClassMetadata $metadata): void |
||
| 35 | { |
||
| 36 | $metadata->addPropertyConstraint( |
||
| 37 | 'content', |
||
| 38 | new Assert\NotNull() |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function getContent(): string |
||
| 46 | { |
||
| 47 | return $this->content; |
||
| 48 | } |
||
| 49 | |||
| 50 | public function setContent(string $content): self |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return null|string |
||
| 58 | */ |
||
| 59 | public function getTitle(): ?string |
||
| 60 | { |
||
| 61 | return $this->title; |
||
| 62 | } |
||
| 63 | |||
| 64 | public function setTitle(?string $title): self |
||
| 68 | } |
||
| 69 | } |
||
| 70 |