Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzmany committed Mar 21, 2022
1 parent 186c4cd commit c2c4042
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
16 changes: 8 additions & 8 deletions app/bundles/LeadBundle/Event/ListChangeEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ public function getLead()
}

/**
* Returns batch array of leads.
*
* @return array
* @return LeadList
*/
public function getLeads()
public function getList()
{
return $this->leads;
return $this->list;
}

/**
* @return LeadList
* Returns batch array of leads.
*
* @return array|null
*/
public function getList()
public function getLeads()
{
return $this->list;
return $this->leads;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/LeadBundle/EventListener/WebhookSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public function onCompanyDelete(CompanyEvent $event)
);
}

public function onSegmentChange(ListChangeEvent $changeEvent)
public function onSegmentChange(ListChangeEvent $changeEvent): void
{
$contacts = null !== $changeEvent->getLeads() ? $changeEvent->getLeads() : [$changeEvent->getLead()];
foreach ($contacts as $contact) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
use Mautic\LeadBundle\LeadEvents;
use Mautic\WebhookBundle\Model\WebhookModel;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

class WebhookSubscriberTest extends \PHPUnit\Framework\TestCase
{
/**
* @var EventDispatcher|MockObject
* @var EventDispatcherInterface
*/
private $dispatcher;

Expand Down Expand Up @@ -188,7 +189,7 @@ public function testOnCompanySaveAndDelete()
$dispatcher->dispatch(LeadEvents::COMPANY_POST_DELETE, $event);
}

public function testOnSegmentChange()
public function testOnSegmentChange(): void
{
$mockModel = $this->createMock(WebhookModel::class);

Expand Down

0 comments on commit c2c4042

Please sign in to comment.