Skip to content

Commit

Permalink
Merge branch '4.4' into 5.1
Browse files Browse the repository at this point in the history
* 4.4:
  Update .php_cs.dist
  Apply "visibility_required" CS rule to constants
  • Loading branch information
nicolas-grekas committed Dec 8, 2020
2 parents e3d1e90 + 5896f21 commit 6cecebb
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions ConsoleEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ 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
* executed by the console.
*
* @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.
Expand All @@ -43,5 +43,5 @@ final class ConsoleEvents
*
* @Event("Symfony\Component\Console\Event\ConsoleErrorEvent")
*/
const ERROR = 'console.error';
public const ERROR = 'console.error';
}
2 changes: 1 addition & 1 deletion Descriptor/ApplicationDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
class ApplicationDescription
{
const GLOBAL_NAMESPACE = '_global';
public const GLOBAL_NAMESPACE = '_global';

private $application;
private $namespace;
Expand Down
2 changes: 1 addition & 1 deletion Event/ConsoleCommandEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final 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.
Expand Down
6 changes: 3 additions & 3 deletions Input/InputArgument.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions Input/InputOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Input/StringInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/
class StringInput extends ArgvInput
{
const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)';
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';
public const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)';
public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';

/**
* @param string $input A string representing the parameters from the CLI
Expand Down
4 changes: 2 additions & 2 deletions Logger/ConsoleLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
*/
class ConsoleLogger extends AbstractLogger
{
const INFO = 'info';
const ERROR = 'error';
public const INFO = 'info';
public const ERROR = 'error';

private $output;
private $verbosityLevelMap = [
Expand Down
18 changes: 9 additions & 9 deletions Output/OutputInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
*/
interface OutputInterface
{
const VERBOSITY_QUIET = 16;
const VERBOSITY_NORMAL = 32;
const VERBOSITY_VERBOSE = 64;
const VERBOSITY_VERY_VERBOSE = 128;
const VERBOSITY_DEBUG = 256;

const OUTPUT_NORMAL = 1;
const OUTPUT_RAW = 2;
const OUTPUT_PLAIN = 4;
public const VERBOSITY_QUIET = 16;
public const VERBOSITY_NORMAL = 32;
public const VERBOSITY_VERBOSE = 64;
public const VERBOSITY_VERY_VERBOSE = 128;
public const VERBOSITY_DEBUG = 256;

public const OUTPUT_NORMAL = 1;
public const OUTPUT_RAW = 2;
public const OUTPUT_PLAIN = 4;

/**
* Writes a message to the output.
Expand Down
2 changes: 1 addition & 1 deletion Style/SymfonyStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*/
class SymfonyStyle extends OutputStyle
{
const MAX_LINE_LENGTH = 120;
public const MAX_LINE_LENGTH = 120;

private $input;
private $questionHelper;
Expand Down

0 comments on commit 6cecebb

Please sign in to comment.