Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix phpstan errors #3395

Merged
merged 1 commit into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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