From 5896f21200f780a2e374e092cc611eba1baf94ac Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 8 Dec 2020 17:59:59 +0100 Subject: [PATCH] Apply "visibility_required" CS rule to constants php-cs-fixer fix --rules='{"visibility_required": ["property", "method", "const"]}' --- ConsoleEvents.php | 6 +++--- Descriptor/ApplicationDescription.php | 2 +- Event/ConsoleCommandEvent.php | 2 +- Input/InputArgument.php | 6 +++--- Input/InputOption.php | 8 ++++---- Input/StringInput.php | 4 ++-- Logger/ConsoleLogger.php | 4 ++-- Output/OutputInterface.php | 18 +++++++++--------- Style/SymfonyStyle.php | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/ConsoleEvents.php b/ConsoleEvents.php index 4975643ae..f3c6cad5a 100644 --- a/ConsoleEvents.php +++ b/ConsoleEvents.php @@ -25,7 +25,7 @@ final class ConsoleEvents * * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") */ - const COMMAND = 'console.command'; + public const COMMAND = 'console.command'; /** * The TERMINATE event allows you to attach listeners after a command is @@ -33,7 +33,7 @@ final class ConsoleEvents * * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent") */ - const TERMINATE = 'console.terminate'; + public const TERMINATE = 'console.terminate'; /** * The ERROR event occurs when an uncaught exception or error appears. @@ -43,5 +43,5 @@ final class ConsoleEvents * * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent") */ - const ERROR = 'console.error'; + public const ERROR = 'console.error'; } diff --git a/Descriptor/ApplicationDescription.php b/Descriptor/ApplicationDescription.php index d361b4890..3192c0f6f 100644 --- a/Descriptor/ApplicationDescription.php +++ b/Descriptor/ApplicationDescription.php @@ -22,7 +22,7 @@ */ class ApplicationDescription { - const GLOBAL_NAMESPACE = '_global'; + public const GLOBAL_NAMESPACE = '_global'; private $application; private $namespace; diff --git a/Event/ConsoleCommandEvent.php b/Event/ConsoleCommandEvent.php index 79a51906a..9691db636 100644 --- a/Event/ConsoleCommandEvent.php +++ b/Event/ConsoleCommandEvent.php @@ -23,7 +23,7 @@ class ConsoleCommandEvent extends ConsoleEvent /** * The return code for skipped commands, this will also be passed into the terminate event. */ - const RETURN_CODE_DISABLED = 113; + public const RETURN_CODE_DISABLED = 113; /** * Indicates if the command should be run or skipped. diff --git a/Input/InputArgument.php b/Input/InputArgument.php index b6aa6452a..140c86d0e 100644 --- a/Input/InputArgument.php +++ b/Input/InputArgument.php @@ -21,9 +21,9 @@ */ class InputArgument { - const REQUIRED = 1; - const OPTIONAL = 2; - const IS_ARRAY = 4; + public const REQUIRED = 1; + public const OPTIONAL = 2; + public const IS_ARRAY = 4; private $name; private $mode; diff --git a/Input/InputOption.php b/Input/InputOption.php index d62e0aea0..66f857a6c 100644 --- a/Input/InputOption.php +++ b/Input/InputOption.php @@ -21,10 +21,10 @@ */ class InputOption { - const VALUE_NONE = 1; - const VALUE_REQUIRED = 2; - const VALUE_OPTIONAL = 4; - const VALUE_IS_ARRAY = 8; + public const VALUE_NONE = 1; + public const VALUE_REQUIRED = 2; + public const VALUE_OPTIONAL = 4; + public const VALUE_IS_ARRAY = 8; private $name; private $shortcut; diff --git a/Input/StringInput.php b/Input/StringInput.php index 6fddf6488..2890b0f5f 100644 --- a/Input/StringInput.php +++ b/Input/StringInput.php @@ -24,8 +24,8 @@ */ class StringInput extends ArgvInput { - const REGEX_STRING = '([^\s]+?)(?:\s|(?