Commit e0a0d60f authored by Stefan Busemann's avatar Stefan Busemann
Browse files

[BUGFIX] use correct typehints and remove unnecessary comments

parent 08f136b1
Pipeline #10240 failed with stages
in 2 minutes and 5 seconds
......@@ -22,66 +22,22 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
const STATUS_ACCEPTED = 1;
const STATUS_REJECTED = 2;
/**
* date
*
* @var \DateTime
*/
protected ?\DateTime $articleDate;
protected ?\DateTime $articleDate = null;
/**
* articleStatus
*
* @var int
*/
protected bool $articleStatus = false;
protected int $articleStatus = self::STATUS_PENDING;
/**
* title
*
* @var string
* @Extbase\Validate("NotEmpty")
*/
protected string $title = '';
/**
* teasertext
*
* @var string
*/
protected string $teasertext = '';
/**
* link
*
* @var string
*/
protected string $link = '';
/**
* isFeatured
*
* @var bool
*/
protected bool $isFeatured = false;
/**
* name
*
* @var string
*/
protected string $name = '';
/**
* email
*
* @var string
*/
protected string $email = '';
/**
* @var string
*/
protected string $feUserid = '';
/**
......@@ -90,7 +46,7 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
*/
protected ?\TYPO3\CMS\Extbase\Domain\Model\FileReference $image;
protected ?\TYPO3\CMS\Extbase\Domain\Model\FileReference $image = null;
/**
* categoryId
......@@ -106,7 +62,7 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oPlanet\Domain\Model\Tag>
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
*/
protected ?ObjectStorage $tagId;
protected ?ObjectStorage $tagId = null;
/**
* __construct
......@@ -131,8 +87,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Returns the title
*
* @return string $title
*/
public function getTitle(): string
{
......@@ -141,8 +95,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Sets the title
*
* @param string $title
*/
public function setTitle(string $title)
{
......@@ -151,8 +103,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Returns the teasertext
*
* @return string $teasertext
*/
public function getTeasertext(): string
{
......@@ -161,8 +111,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Sets the teasertext
*
* @param string $teasertext
*/
public function setTeasertext(string $teasertext)
{
......@@ -171,8 +119,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Returns the link
*
* @return string $link
*/
public function getLink(): string
{
......@@ -181,8 +127,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Sets the link
*
* @param string $link
*/
public function setLink(string $link)
{
......@@ -191,8 +135,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Returns the isFeatured
*
* @return bool $isFeatured
*/
public function getIsFeatured(): bool
{
......@@ -201,8 +143,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Sets the isFeatured
*
* @param bool $isFeatured
*/
public function setIsFeatured(bool $isFeatured)
{
......@@ -211,8 +151,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Returns the boolean state of isFeatured
*
* @return bool
*/
public function isIsFeatured(): bool
{
......@@ -221,8 +159,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Returns the name
*
* @return string $name
*/
public function getName(): string
{
......@@ -231,8 +167,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Sets the name
*
* @param string $name
*/
public function setName(string $name)
{
......@@ -241,8 +175,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Returns the email
*
* @return string $email
*/
public function getEmail(): string
{
......@@ -251,8 +183,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Sets the email
*
* @param string $email
*/
public function setEmail(string $email)
{
......@@ -261,8 +191,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Returns the feUserid
*
* @return string $feUserid
*/
public function getFeUserid(): string
{
......@@ -271,8 +199,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Sets the feUserid
*
* @param string $feUserid
*/
public function setFeUserid(string $feUserid)
{
......@@ -281,8 +207,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Returns the image
*
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
*/
public function getImage(): ?\TYPO3\CMS\Extbase\Domain\Model\FileReference
{
......@@ -291,8 +215,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Sets the image
*
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference|null $image
*/
public function setImage(?\TYPO3\CMS\Extbase\Domain\Model\FileReference $image)
{
......@@ -301,8 +223,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Adds a T3planetCategories
*
* @param \TYPO3\CMS\Extbase\Domain\Model\Category $categoryId
*/
public function addCategoryId(Category $categoryId)
{
......@@ -311,8 +231,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Removes a T3planetCategories
*
* @param \TYPO3\CMS\Extbase\Domain\Model\Category $categoryIdToRemove
*/
public function removeCategoryId(Category $categoryIdToRemove)
{
......@@ -341,8 +259,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Adds a T3planetTags
*
* @param \T3o\T3oPlanet\Domain\Model\Tag $tagId
*/
public function addTagId(\T3o\T3oPlanet\Domain\Model\Tag $tagId)
{
......@@ -381,8 +297,6 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Returns the articleDate
*
* @return \DateTime $articleDate
*/
public function getArticleDate(): \DateTime
{
......@@ -391,40 +305,24 @@ class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Sets the articleDate
*
* @param \DateTime $articleDate
*/
public function setArticleDate(\DateTime $articleDate)
{
$this->articleDate = $articleDate;
}
/**
* Returns the boolean state of articleStatus
*
* @return bool
*/
public function isArticleStatus(): bool
{
return $this->articleStatus;
}
/**
* Returns the articleStatus
*
* @return int articleStatus
*/
public function getArticleStatus(): bool
public function getArticleStatus(): int
{
return $this->articleStatus;
}
/**
* Sets the articleStatus
*
* @param bool $articleStatus
*/
public function setArticleStatus(bool $articleStatus)
public function setArticleStatus(int $articleStatus)
{
$this->articleStatus = $articleStatus;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment