Fix issues in Doctrine entities newly found by PHPStan
[MAILPOET-3029]
This commit is contained in:
committed by
Veljko V
parent
54e3c52630
commit
6438081476
@@ -97,7 +97,7 @@ class NewsletterEntity {
|
||||
private $preheader = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
* @ORM\Column(type="json", nullable=true)
|
||||
* @var array|null
|
||||
*/
|
||||
private $body;
|
||||
|
@@ -39,7 +39,7 @@ class NewsletterTemplateEntity {
|
||||
private $categories = '[]';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
* @ORM\Column(type="json", nullable=true)
|
||||
* @Assert\NotBlank()
|
||||
* @var array|null
|
||||
*/
|
||||
|
@@ -58,7 +58,7 @@ class ScheduledTaskEntity {
|
||||
private $processedAt;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
* @ORM\Column(type="json", nullable=true)
|
||||
* @var array|null
|
||||
*/
|
||||
private $meta;
|
||||
|
@@ -72,7 +72,7 @@ class SendingQueueEntity {
|
||||
private $countToProcess = 0;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
* @ORM\Column(type="json", nullable=true)
|
||||
* @var array|null
|
||||
*/
|
||||
private $meta;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user