Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 99eef8c

Browse files
Apply "visibility_required" CS rule to constants
php-cs-fixer fix --rules='{"visibility_required": ["property", "method", "const"]}'
1 parent 55a838c commit 99eef8c

15 files changed

+28
-28
lines changed

Core/Authentication/Provider/AuthenticationProviderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ interface AuthenticationProviderInterface extends AuthenticationManagerInterface
2929
*
3030
* @var string
3131
*/
32-
const USERNAME_NONE_PROVIDED = 'NONE_PROVIDED';
32+
public const USERNAME_NONE_PROVIDED = 'NONE_PROVIDED';
3333

3434
/**
3535
* Checks whether this provider supports the given token.

Core/AuthenticationEvents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ final class AuthenticationEvents
1919
*
2020
* @Event("Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent")
2121
*/
22-
const AUTHENTICATION_SUCCESS = 'security.authentication.success';
22+
public const AUTHENTICATION_SUCCESS = 'security.authentication.success';
2323

2424
/**
2525
* The AUTHENTICATION_FAILURE event occurs after a user cannot be
2626
* authenticated by any of the providers.
2727
*
2828
* @Event("Symfony\Component\Security\Core\Event\AuthenticationFailureEvent")
2929
*/
30-
const AUTHENTICATION_FAILURE = 'security.authentication.failure';
30+
public const AUTHENTICATION_FAILURE = 'security.authentication.failure';
3131
}

Core/Authorization/AccessDecisionManager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
*/
2323
class AccessDecisionManager implements AccessDecisionManagerInterface
2424
{
25-
const STRATEGY_AFFIRMATIVE = 'affirmative';
26-
const STRATEGY_CONSENSUS = 'consensus';
27-
const STRATEGY_UNANIMOUS = 'unanimous';
25+
public const STRATEGY_AFFIRMATIVE = 'affirmative';
26+
public const STRATEGY_CONSENSUS = 'consensus';
27+
public const STRATEGY_UNANIMOUS = 'unanimous';
2828

2929
private $voters;
3030
private $strategy;

Core/Authorization/Voter/AuthenticatedVoter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
*/
2626
class AuthenticatedVoter implements VoterInterface
2727
{
28-
const IS_AUTHENTICATED_FULLY = 'IS_AUTHENTICATED_FULLY';
29-
const IS_AUTHENTICATED_REMEMBERED = 'IS_AUTHENTICATED_REMEMBERED';
30-
const IS_AUTHENTICATED_ANONYMOUSLY = 'IS_AUTHENTICATED_ANONYMOUSLY';
28+
public const IS_AUTHENTICATED_FULLY = 'IS_AUTHENTICATED_FULLY';
29+
public const IS_AUTHENTICATED_REMEMBERED = 'IS_AUTHENTICATED_REMEMBERED';
30+
public const IS_AUTHENTICATED_ANONYMOUSLY = 'IS_AUTHENTICATED_ANONYMOUSLY';
3131

3232
private $authenticationTrustResolver;
3333

Core/Authorization/Voter/VoterInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
*/
2121
interface VoterInterface
2222
{
23-
const ACCESS_GRANTED = 1;
24-
const ACCESS_ABSTAIN = 0;
25-
const ACCESS_DENIED = -1;
23+
public const ACCESS_GRANTED = 1;
24+
public const ACCESS_ABSTAIN = 0;
25+
public const ACCESS_DENIED = -1;
2626

2727
/**
2828
* Returns the vote for the given parameters.

Core/Encoder/BCryptPasswordEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
class BCryptPasswordEncoder extends BasePasswordEncoder implements SelfSaltingEncoderInterface
2525
{
26-
const MAX_PASSWORD_LENGTH = 72;
26+
public const MAX_PASSWORD_LENGTH = 72;
2727

2828
private $cost;
2929

Core/Encoder/BasePasswordEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
abstract class BasePasswordEncoder implements PasswordEncoderInterface
2020
{
21-
const MAX_PASSWORD_LENGTH = 4096;
21+
public const MAX_PASSWORD_LENGTH = 4096;
2222

2323
/**
2424
* {@inheritdoc}

Core/Security.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
*/
2323
class Security
2424
{
25-
const ACCESS_DENIED_ERROR = '_security.403_error';
26-
const AUTHENTICATION_ERROR = '_security.last_error';
27-
const LAST_USERNAME = '_security.last_username';
28-
const MAX_USERNAME_LENGTH = 4096;
25+
public const ACCESS_DENIED_ERROR = '_security.403_error';
26+
public const AUTHENTICATION_ERROR = '_security.last_error';
27+
public const LAST_USERNAME = '_security.last_username';
28+
public const MAX_USERNAME_LENGTH = 4096;
2929

3030
private $container;
3131

Csrf/TokenStorage/NativeSessionTokenStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class NativeSessionTokenStorage implements ClearableTokenStorageInterface
2323
/**
2424
* The namespace used to store values in the session.
2525
*/
26-
const SESSION_NAMESPACE = '_csrf';
26+
public const SESSION_NAMESPACE = '_csrf';
2727

2828
private $sessionStarted = false;
2929
private $namespace;

Csrf/TokenStorage/SessionTokenStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SessionTokenStorage implements ClearableTokenStorageInterface
2424
/**
2525
* The namespace used to store values in the session.
2626
*/
27-
const SESSION_NAMESPACE = '_csrf';
27+
public const SESSION_NAMESPACE = '_csrf';
2828

2929
private $session;
3030
private $namespace;

Http/Firewall/SwitchUserListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class SwitchUserListener extends AbstractListener implements ListenerInterface
4343
{
4444
use LegacyListenerTrait;
4545

46-
const EXIT_VALUE = '_exit';
46+
public const EXIT_VALUE = '_exit';
4747

4848
private $tokenStorage;
4949
private $provider;

Http/RememberMe/AbstractRememberMeServices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434
abstract class AbstractRememberMeServices implements RememberMeServicesInterface, LogoutHandlerInterface
3535
{
36-
const COOKIE_DELIMITER = ':';
36+
public const COOKIE_DELIMITER = ':';
3737

3838
protected $logger;
3939
protected $options = [

Http/RememberMe/RememberMeServicesInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ interface RememberMeServicesInterface
3131
* This attribute name can be used by the implementation if it needs to set
3232
* a cookie on the Request when there is no actual Response, yet.
3333
*/
34-
const COOKIE_ATTR_NAME = '_security_remember_me_cookie';
34+
public const COOKIE_ATTR_NAME = '_security_remember_me_cookie';
3535

3636
/**
3737
* This method will be called whenever the TokenStorage does not contain

Http/SecurityEvents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ final class SecurityEvents
2222
*
2323
* @Event("Symfony\Component\Security\Http\Event\InteractiveLoginEvent")
2424
*/
25-
const INTERACTIVE_LOGIN = 'security.interactive_login';
25+
public const INTERACTIVE_LOGIN = 'security.interactive_login';
2626

2727
/**
2828
* The SWITCH_USER event occurs before switch to another user and
2929
* before exit from an already switched user.
3030
*
3131
* @Event("Symfony\Component\Security\Http\Event\SwitchUserEvent")
3232
*/
33-
const SWITCH_USER = 'security.switch_user';
33+
public const SWITCH_USER = 'security.switch_user';
3434
}

Http/Session/SessionAuthenticationStrategy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
*/
2727
class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInterface
2828
{
29-
const NONE = 'none';
30-
const MIGRATE = 'migrate';
31-
const INVALIDATE = 'invalidate';
29+
public const NONE = 'none';
30+
public const MIGRATE = 'migrate';
31+
public const INVALIDATE = 'invalidate';
3232

3333
private $strategy;
3434

0 commit comments

Comments
 (0)