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 = '';
|
private $preheader = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="json")
|
* @ORM\Column(type="json", nullable=true)
|
||||||
* @var array|null
|
* @var array|null
|
||||||
*/
|
*/
|
||||||
private $body;
|
private $body;
|
||||||
|
@@ -39,7 +39,7 @@ class NewsletterTemplateEntity {
|
|||||||
private $categories = '[]';
|
private $categories = '[]';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="json")
|
* @ORM\Column(type="json", nullable=true)
|
||||||
* @Assert\NotBlank()
|
* @Assert\NotBlank()
|
||||||
* @var array|null
|
* @var array|null
|
||||||
*/
|
*/
|
||||||
|
@@ -58,7 +58,7 @@ class ScheduledTaskEntity {
|
|||||||
private $processedAt;
|
private $processedAt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="json")
|
* @ORM\Column(type="json", nullable=true)
|
||||||
* @var array|null
|
* @var array|null
|
||||||
*/
|
*/
|
||||||
private $meta;
|
private $meta;
|
||||||
|
@@ -72,7 +72,7 @@ class SendingQueueEntity {
|
|||||||
private $countToProcess = 0;
|
private $countToProcess = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="json")
|
* @ORM\Column(type="json", nullable=true)
|
||||||
* @var array|null
|
* @var array|null
|
||||||
*/
|
*/
|
||||||
private $meta;
|
private $meta;
|
||||||
|
@@ -30,7 +30,7 @@ class SubscriberEntity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="bigint", nullable=true)
|
* @ORM\Column(type="bigint", nullable=true)
|
||||||
* @var int|null
|
* @var string|null
|
||||||
*/
|
*/
|
||||||
private $wpUserId;
|
private $wpUserId;
|
||||||
|
|
||||||
@@ -133,14 +133,14 @@ class SubscriberEntity {
|
|||||||
* @return int|null
|
* @return int|null
|
||||||
*/
|
*/
|
||||||
public function getWpUserId() {
|
public function getWpUserId() {
|
||||||
return $this->wpUserId;
|
return $this->wpUserId ? (int)$this->wpUserId : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int|null $wpUserId
|
* @param int|null $wpUserId
|
||||||
*/
|
*/
|
||||||
public function setWpUserId($wpUserId) {
|
public function setWpUserId($wpUserId) {
|
||||||
$this->wpUserId = $wpUserId;
|
$this->wpUserId = $wpUserId ? (string)$wpUserId : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user