From 822cfe4278065d01eb5a44c8cda1dfaa749552bc Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Fri, 13 Jul 2018 16:44:20 +0200 Subject: [PATCH 1/2] Update Security.php --- .../Component/Security/Core/Security.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Security.php b/src/Symfony/Component/Security/Core/Security.php index 5f25b41ccade5..4f9f47a2b0678 100644 --- a/src/Symfony/Component/Security/Core/Security.php +++ b/src/Symfony/Component/Security/Core/Security.php @@ -32,10 +32,7 @@ public function __construct(ContainerInterface $container) $this->container = $container; } - /** - * @return UserInterface|null - */ - public function getUser() + public function getUser(): ?UserInterface { if (!$token = $this->getToken()) { return null; @@ -51,22 +48,14 @@ public function getUser() /** * Checks if the attributes are granted against the current authentication token and optionally supplied subject. - * - * @param mixed $attributes - * @param mixed $subject - * - * @return bool */ - public function isGranted($attributes, $subject = null) + public function isGranted($attributes, $subject = null): bool { return $this->container->get('security.authorization_checker') ->isGranted($attributes, $subject); } - /** - * @return TokenInterface|null - */ - public function getToken() + public function getToken(): ?TokenInterface { return $this->container->get('security.token_storage')->getToken(); } From 5ddb9804ec79f4b28e2b9d0679b8bc4aab285ce8 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Fri, 13 Jul 2018 16:46:16 +0200 Subject: [PATCH 2/2] Update Security.php --- src/Symfony/Component/Security/Core/Security.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Security.php b/src/Symfony/Component/Security/Core/Security.php index 4f9f47a2b0678..fc445d46e2e9e 100644 --- a/src/Symfony/Component/Security/Core/Security.php +++ b/src/Symfony/Component/Security/Core/Security.php @@ -20,10 +20,10 @@ */ final class Security { - const ACCESS_DENIED_ERROR = '_security.403_error'; - const AUTHENTICATION_ERROR = '_security.last_error'; - const LAST_USERNAME = '_security.last_username'; - const MAX_USERNAME_LENGTH = 4096; + public const ACCESS_DENIED_ERROR = '_security.403_error'; + public const AUTHENTICATION_ERROR = '_security.last_error'; + public const LAST_USERNAME = '_security.last_username'; + public const MAX_USERNAME_LENGTH = 4096; private $container; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy