Skip to content

Commit d6fd1d4

Browse files
Merge branch '5.1' into 5.2
* 5.1: Update .php_cs.dist Apply "visibility_required" CS rule to constants
2 parents 0b06390 + 6cecebb commit d6fd1d4

File tree

10 files changed

+29
-29
lines changed

10 files changed

+29
-29
lines changed

ConsoleEvents.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ final class ConsoleEvents
3030
*
3131
* @Event("Symfony\Component\Console\Event\ConsoleCommandEvent")
3232
*/
33-
const COMMAND = 'console.command';
33+
public const COMMAND = 'console.command';
3434

3535
/**
3636
* The SIGNAL event allows you to perform some actions
3737
* after the command execution was interrupted.
3838
*
3939
* @Event("Symfony\Component\Console\Event\ConsoleSignalEvent")
4040
*/
41-
const SIGNAL = 'console.signal';
41+
public const SIGNAL = 'console.signal';
4242

4343
/**
4444
* The TERMINATE event allows you to attach listeners after a command is
4545
* executed by the console.
4646
*
4747
* @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent")
4848
*/
49-
const TERMINATE = 'console.terminate';
49+
public const TERMINATE = 'console.terminate';
5050

5151
/**
5252
* The ERROR event occurs when an uncaught exception or error appears.
@@ -56,14 +56,14 @@ final class ConsoleEvents
5656
*
5757
* @Event("Symfony\Component\Console\Event\ConsoleErrorEvent")
5858
*/
59-
const ERROR = 'console.error';
59+
public const ERROR = 'console.error';
6060

6161
/**
6262
* Event aliases.
6363
*
6464
* These aliases can be consumed by RegisterListenersPass.
6565
*/
66-
const ALIASES = [
66+
public const ALIASES = [
6767
ConsoleCommandEvent::class => self::COMMAND,
6868
ConsoleErrorEvent::class => self::ERROR,
6969
ConsoleSignalEvent::class => self::SIGNAL,

Descriptor/ApplicationDescription.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
class ApplicationDescription
2424
{
25-
const GLOBAL_NAMESPACE = '_global';
25+
public const GLOBAL_NAMESPACE = '_global';
2626

2727
private $application;
2828
private $namespace;

Event/ConsoleCommandEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class ConsoleCommandEvent extends ConsoleEvent
2121
/**
2222
* The return code for skipped commands, this will also be passed into the terminate event.
2323
*/
24-
const RETURN_CODE_DISABLED = 113;
24+
public const RETURN_CODE_DISABLED = 113;
2525

2626
/**
2727
* Indicates if the command should be run or skipped.

Helper/TableCellStyle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
class TableCellStyle
2020
{
21-
const DEFAULT_ALIGN = 'left';
21+
public const DEFAULT_ALIGN = 'left';
2222

2323
private $options = [
2424
'fg' => 'default',

Input/InputArgument.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
*/
2222
class InputArgument
2323
{
24-
const REQUIRED = 1;
25-
const OPTIONAL = 2;
26-
const IS_ARRAY = 4;
24+
public const REQUIRED = 1;
25+
public const OPTIONAL = 2;
26+
public const IS_ARRAY = 4;
2727

2828
private $name;
2929
private $mode;

Input/InputOption.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
*/
2222
class InputOption
2323
{
24-
const VALUE_NONE = 1;
25-
const VALUE_REQUIRED = 2;
26-
const VALUE_OPTIONAL = 4;
27-
const VALUE_IS_ARRAY = 8;
24+
public const VALUE_NONE = 1;
25+
public const VALUE_REQUIRED = 2;
26+
public const VALUE_OPTIONAL = 4;
27+
public const VALUE_IS_ARRAY = 8;
2828

2929
private $name;
3030
private $shortcut;

Input/StringInput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
*/
2525
class StringInput extends ArgvInput
2626
{
27-
const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)';
28-
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';
27+
public const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)';
28+
public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';
2929

3030
/**
3131
* @param string $input A string representing the parameters from the CLI

Logger/ConsoleLogger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
*/
2727
class ConsoleLogger extends AbstractLogger
2828
{
29-
const INFO = 'info';
30-
const ERROR = 'error';
29+
public const INFO = 'info';
30+
public const ERROR = 'error';
3131

3232
private $output;
3333
private $verbosityLevelMap = [

Output/OutputInterface.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
*/
2121
interface OutputInterface
2222
{
23-
const VERBOSITY_QUIET = 16;
24-
const VERBOSITY_NORMAL = 32;
25-
const VERBOSITY_VERBOSE = 64;
26-
const VERBOSITY_VERY_VERBOSE = 128;
27-
const VERBOSITY_DEBUG = 256;
28-
29-
const OUTPUT_NORMAL = 1;
30-
const OUTPUT_RAW = 2;
31-
const OUTPUT_PLAIN = 4;
23+
public const VERBOSITY_QUIET = 16;
24+
public const VERBOSITY_NORMAL = 32;
25+
public const VERBOSITY_VERBOSE = 64;
26+
public const VERBOSITY_VERY_VERBOSE = 128;
27+
public const VERBOSITY_DEBUG = 256;
28+
29+
public const OUTPUT_NORMAL = 1;
30+
public const OUTPUT_RAW = 2;
31+
public const OUTPUT_PLAIN = 4;
3232

3333
/**
3434
* Writes a message to the output.

Style/SymfonyStyle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*/
3636
class SymfonyStyle extends OutputStyle
3737
{
38-
const MAX_LINE_LENGTH = 120;
38+
public const MAX_LINE_LENGTH = 120;
3939

4040
private $input;
4141
private $questionHelper;

0 commit comments

Comments
 (0)