Skip to content

Commit

Permalink
Fixing type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
escopecz committed Feb 8, 2024
1 parent 5716e5b commit 6df2df8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions app/bundles/CampaignBundle/Event/CampaignLeadChangeEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
class CampaignLeadChangeEvent extends Event
{
/**
* @var Lead
* @var ?Lead
*/
private $lead;

/**
* @var Lead[]
*/
private array $leads = [];

/**
* @param string $action
* @param Lead|Lead[] $leads
* @param ?string $action
*/
public function __construct(
private Campaign $campaign,
Expand All @@ -43,7 +47,7 @@ public function getCampaign()
/**
* Returns the Lead entity.
*
* @return Lead
* @return Lead|null
*/
public function getLead()
{
Expand All @@ -53,7 +57,7 @@ public function getLead()
/**
* If this is a batch event, return array of leads.
*
* @return array
* @return Lead[]|null
*/
public function getLeads()
{
Expand All @@ -63,7 +67,7 @@ public function getLeads()
/**
* Returns added or removed.
*
* @return mixed
* @return string|null
*/
public function getAction()
{
Expand All @@ -75,14 +79,14 @@ public function getAction()
*/
public function wasRemoved(): bool
{
return 'removed' == $this->action;
return 'removed' === $this->action;
}

/**
* Lead was added to the campaign.
*/
public function wasAdded(): bool
{
return 'added' == $this->action;
return 'added' === $this->action;
}
}

0 comments on commit 6df2df8

Please sign in to comment.