Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
24 / 24
100.00% covered (success)
100.00%
16 / 16
CRAP
100.00% covered (success)
100.00%
1 / 1
SeoEntity
100.00% covered (success)
100.00%
24 / 24
100.00% covered (success)
100.00%
16 / 16
16
100.00% covered (success)
100.00%
1 / 1
 getId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getSeoType
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setSeoType
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getReferenceId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setReferenceId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getReferenceLanguage
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setReferenceLanguage
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getTitle
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setTitle
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getDescription
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setDescription
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getSlug
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setSlug
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCreated
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCreated
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * SEO entity class.
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public License,
7 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
8 * obtain one at https://mozilla.org/MPL/2.0/.
9 *
10 * @package   phpMyFAQ
11 * @author    Thorsten Rinne <thorsten@phpmyfaq.de>
12 * @copyright 2024-2026 phpMyFAQ Team
13 * @license   https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
14 * @link      https://www.phpmyfaq.de
15 * @since     2024-06-23
16 */
17
18declare(strict_types=1);
19
20namespace phpMyFAQ\Entity;
21
22use DateTime;
23use phpMyFAQ\Enums\SeoType;
24
25class SeoEntity
26{
27    private ?int $id = null;
28
29    private SeoType $seoType;
30
31    private int $referenceId;
32
33    private string $referenceLanguage;
34
35    private ?string $title = null;
36
37    private ?string $description = null;
38
39    private ?string $slug = null;
40
41    private DateTime $created;
42
43    public function getId(): ?int
44    {
45        return $this->id ?? null;
46    }
47
48    public function setId(int $id): SeoEntity
49    {
50        $this->id = $id;
51        return $this;
52    }
53
54    public function getSeoType(): SeoType
55    {
56        return $this->seoType;
57    }
58
59    public function setSeoType(SeoType $seoType): SeoEntity
60    {
61        $this->seoType = $seoType;
62        return $this;
63    }
64
65    public function getReferenceId(): int
66    {
67        return $this->referenceId;
68    }
69
70    public function setReferenceId(int $referenceId): SeoEntity
71    {
72        $this->referenceId = $referenceId;
73        return $this;
74    }
75
76    public function getReferenceLanguage(): string
77    {
78        return $this->referenceLanguage;
79    }
80
81    public function setReferenceLanguage(string $referenceLanguage): SeoEntity
82    {
83        $this->referenceLanguage = $referenceLanguage;
84        return $this;
85    }
86
87    public function getTitle(): ?string
88    {
89        return $this->title ?? null;
90    }
91
92    public function setTitle(string $title): SeoEntity
93    {
94        $this->title = $title;
95        return $this;
96    }
97
98    public function getDescription(): ?string
99    {
100        return $this->description ?? null;
101    }
102
103    public function setDescription(string $description): SeoEntity
104    {
105        $this->description = $description;
106        return $this;
107    }
108
109    public function getSlug(): ?string
110    {
111        return $this->slug ?? null;
112    }
113
114    public function setSlug(string $slug): SeoEntity
115    {
116        $this->slug = $slug;
117        return $this;
118    }
119
120    public function getCreated(): DateTime
121    {
122        return $this->created;
123    }
124
125    public function setCreated(DateTime $created): SeoEntity
126    {
127        $this->created = $created;
128        return $this;
129    }
130}