Fix issues in Doctrine entities newly found by PHPStan

[MAILPOET-3029]
This commit is contained in:
Rostislav Wolny
2020-11-05 09:42:05 +01:00
committed by Veljko V
parent 54e3c52630
commit 6438081476
5 changed files with 7 additions and 7 deletions

View File

@@ -97,7 +97,7 @@ class NewsletterEntity {
private $preheader = '';
/**
* @ORM\Column(type="json")
* @ORM\Column(type="json", nullable=true)
* @var array|null
*/
private $body;

View File

@@ -39,7 +39,7 @@ class NewsletterTemplateEntity {
private $categories = '[]';
/**
* @ORM\Column(type="json")
* @ORM\Column(type="json", nullable=true)
* @Assert\NotBlank()
* @var array|null
*/

View File

@@ -58,7 +58,7 @@ class ScheduledTaskEntity {
private $processedAt;
/**
* @ORM\Column(type="json")
* @ORM\Column(type="json", nullable=true)
* @var array|null
*/
private $meta;

View File

@@ -72,7 +72,7 @@ class SendingQueueEntity {
private $countToProcess = 0;
/**
* @ORM\Column(type="json")
* @ORM\Column(type="json", nullable=true)
* @var array|null
*/
private $meta;

View File

@@ -30,7 +30,7 @@ class SubscriberEntity {
/**
* @ORM\Column(type="bigint", nullable=true)
* @var int|null
* @var string|null
*/
private $wpUserId;
@@ -133,14 +133,14 @@ class SubscriberEntity {
* @return int|null
*/
public function getWpUserId() {
return $this->wpUserId;
return $this->wpUserId ? (int)$this->wpUserId : null;
}
/**
* @param int|null $wpUserId
*/
public function setWpUserId($wpUserId) {
$this->wpUserId = $wpUserId;
$this->wpUserId = $wpUserId ? (string)$wpUserId : null;
}
/**