Skip to content

Commit

Permalink
Merge pull request Sylius#9540 from pamil/1.1-phpstan-fixes
Browse files Browse the repository at this point in the history
PHPStan 0.10 upgrade & road to level 2 checks
  • Loading branch information
pamil authored Jul 3, 2018
2 parents 66f01d0 + 31eb1bb commit 272232a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion EventListener/ResourceDeleteSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\KernelEvents;
Expand Down Expand Up @@ -86,7 +87,9 @@ public function onResourceDelete(GetResponseForExceptionEvent $event): void
return;
}

$this->session->getBag('flashes')->add('error', [
/** @var FlashBagInterface $flashBag */
$flashBag = $this->session->getBag('flashes');
$flashBag->add('error', [
'message' => 'sylius.resource.delete_error',
'parameters' => ['%resource%' => $resourceName],
]);
Expand Down

0 comments on commit 272232a

Please sign in to comment.