Skip to content

Commit

Permalink
Fix phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
enrise-mbraam authored and bobdenotter committed Jan 27, 2023
1 parent bb4319f commit a0c05f3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Entity/Field/CollectionField.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @ORM\Entity
*/
class CollectionField extends Field implements Excerptable, FieldInterface, FieldParentInterface, ListFieldInterface, \Iterator, RawPersistable
class CollectionField extends Field implements Excerptable, FieldInterface, FieldParentInterface, ListFieldInterface, RawPersistable
{
use FieldParentTrait;
use IterableFieldTrait;
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Field/FilelistField.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @ORM\Entity
*/
class FilelistField extends Field implements FieldInterface, ListFieldInterface, RawPersistable, \Iterator
class FilelistField extends Field implements FieldInterface, ListFieldInterface, RawPersistable
{
use IterableFieldTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Field/ImagelistField.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @ORM\Entity
*/
class ImagelistField extends Field implements FieldInterface, ListFieldInterface, RawPersistable, \Iterator
class ImagelistField extends Field implements FieldInterface, ListFieldInterface, RawPersistable
{
use IterableFieldTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Field/SelectField.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @ORM\Entity
*/
class SelectField extends Field implements FieldInterface, RawPersistable, \Iterator
class SelectField extends Field implements FieldInterface, RawPersistable
{
use IterableFieldTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Field/SetField.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* @ORM\Entity
*/
class SetField extends Field implements Excerptable, FieldInterface, FieldParentInterface, ListFieldInterface, \Iterator, RawPersistable
class SetField extends Field implements Excerptable, FieldInterface, FieldParentInterface, ListFieldInterface, RawPersistable
{
use FieldParentTrait;
use IterableFieldTrait;
Expand Down
7 changes: 5 additions & 2 deletions src/Security/AuthenticationEntryPointRedirector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Symfony\Component\HttpFoundation\Session\Session;

class AuthenticationEntryPointRedirector implements AuthenticationEntryPointInterface
{
Expand All @@ -21,10 +22,12 @@ public function __construct(TranslatorInterface $translator, UrlGeneratorInterfa
$this->urlGenerator = $urlGenerator;
}

public function start(Request $request, AuthenticationException $authException = null)
public function start(Request $request, AuthenticationException $authException = null): RedirectResponse
{
// add a custom flash message and redirect to the login page
$request->getSession()->getFlashBag()->add('warning', $this->translator->trans('You have to login in order to access this page.', [], 'security'));
/** @var Session $session */
$session = $request->getSession();
$session->getFlashBag()->add('warning', $this->translator->trans('You have to login in order to access this page.', [], 'security'));

return new RedirectResponse($this->urlGenerator->generate('bolt_login'));
}
Expand Down

0 comments on commit a0c05f3

Please sign in to comment.