Skip to content

Commit 7f17092

Browse files
Merge branch '4.4' into 5.1
* 4.4: Update .php_cs.dist Apply "visibility_required" CS rule to constants
2 parents 6a83b15 + 79c82bb commit 7f17092

File tree

7 files changed

+124
-124
lines changed

7 files changed

+124
-124
lines changed

Collator/Collator.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,38 @@
3636
abstract class Collator
3737
{
3838
/* Attribute constants */
39-
const FRENCH_COLLATION = 0;
40-
const ALTERNATE_HANDLING = 1;
41-
const CASE_FIRST = 2;
42-
const CASE_LEVEL = 3;
43-
const NORMALIZATION_MODE = 4;
44-
const STRENGTH = 5;
45-
const HIRAGANA_QUATERNARY_MODE = 6;
46-
const NUMERIC_COLLATION = 7;
39+
public const FRENCH_COLLATION = 0;
40+
public const ALTERNATE_HANDLING = 1;
41+
public const CASE_FIRST = 2;
42+
public const CASE_LEVEL = 3;
43+
public const NORMALIZATION_MODE = 4;
44+
public const STRENGTH = 5;
45+
public const HIRAGANA_QUATERNARY_MODE = 6;
46+
public const NUMERIC_COLLATION = 7;
4747

4848
/* Attribute constants values */
49-
const DEFAULT_VALUE = -1;
49+
public const DEFAULT_VALUE = -1;
5050

51-
const PRIMARY = 0;
52-
const SECONDARY = 1;
53-
const TERTIARY = 2;
54-
const DEFAULT_STRENGTH = 2;
55-
const QUATERNARY = 3;
56-
const IDENTICAL = 15;
51+
public const PRIMARY = 0;
52+
public const SECONDARY = 1;
53+
public const TERTIARY = 2;
54+
public const DEFAULT_STRENGTH = 2;
55+
public const QUATERNARY = 3;
56+
public const IDENTICAL = 15;
5757

58-
const OFF = 16;
59-
const ON = 17;
58+
public const OFF = 16;
59+
public const ON = 17;
6060

61-
const SHIFTED = 20;
62-
const NON_IGNORABLE = 21;
61+
public const SHIFTED = 20;
62+
public const NON_IGNORABLE = 21;
6363

64-
const LOWER_FIRST = 24;
65-
const UPPER_FIRST = 25;
64+
public const LOWER_FIRST = 24;
65+
public const UPPER_FIRST = 25;
6666

6767
/* Sorting options */
68-
const SORT_REGULAR = 0;
69-
const SORT_NUMERIC = 2;
70-
const SORT_STRING = 1;
68+
public const SORT_REGULAR = 0;
69+
public const SORT_NUMERIC = 2;
70+
public const SORT_STRING = 1;
7171

7272
/**
7373
* @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en")

DateFormatter/IntlDateFormatter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ abstract class IntlDateFormatter
6363
protected $errorMessage = 'U_ZERO_ERROR';
6464

6565
/* date/time format types */
66-
const NONE = -1;
67-
const FULL = 0;
68-
const LONG = 1;
69-
const MEDIUM = 2;
70-
const SHORT = 3;
66+
public const NONE = -1;
67+
public const FULL = 0;
68+
public const LONG = 1;
69+
public const MEDIUM = 2;
70+
public const SHORT = 3;
7171

7272
/* calendar formats */
73-
const TRADITIONAL = 0;
74-
const GREGORIAN = 1;
73+
public const TRADITIONAL = 0;
74+
public const GREGORIAN = 1;
7575

7676
/**
7777
* Patterns used to format the date when no pattern is provided.

Exception/NotImplementedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
class NotImplementedException extends RuntimeException
2020
{
21-
const INTL_INSTALL_MESSAGE = 'Please install the "intl" extension for full localization capabilities.';
21+
public const INTL_INSTALL_MESSAGE = 'Please install the "intl" extension for full localization capabilities.';
2222

2323
/**
2424
* @param string $message The exception message. A note to install the intl extension is appended to this string

Globals/IntlGlobals.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ abstract class IntlGlobals
2323
/**
2424
* Indicates that no error occurred.
2525
*/
26-
const U_ZERO_ERROR = 0;
26+
public const U_ZERO_ERROR = 0;
2727

2828
/**
2929
* Indicates that an invalid argument was passed.
3030
*/
31-
const U_ILLEGAL_ARGUMENT_ERROR = 1;
31+
public const U_ILLEGAL_ARGUMENT_ERROR = 1;
3232

3333
/**
3434
* Indicates that the parse() operation failed.
3535
*/
36-
const U_PARSE_ERROR = 9;
36+
public const U_PARSE_ERROR = 9;
3737

3838
/**
3939
* All known error codes.

Intl.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,32 @@ final class Intl
2222
* The number of resource bundles to buffer. Loading the same resource
2323
* bundle for n locales takes up n spots in the buffer.
2424
*/
25-
const BUFFER_SIZE = 10;
25+
public const BUFFER_SIZE = 10;
2626

2727
/**
2828
* The directory name of the currency data.
2929
*/
30-
const CURRENCY_DIR = 'currencies';
30+
public const CURRENCY_DIR = 'currencies';
3131

3232
/**
3333
* The directory name of the language data.
3434
*/
35-
const LANGUAGE_DIR = 'languages';
35+
public const LANGUAGE_DIR = 'languages';
3636

3737
/**
3838
* The directory name of the script data.
3939
*/
40-
const SCRIPT_DIR = 'scripts';
40+
public const SCRIPT_DIR = 'scripts';
4141

4242
/**
4343
* The directory name of the locale data.
4444
*/
45-
const LOCALE_DIR = 'locales';
45+
public const LOCALE_DIR = 'locales';
4646

4747
/**
4848
* The directory name of the region data.
4949
*/
50-
const REGION_DIR = 'regions';
50+
public const REGION_DIR = 'regions';
5151

5252
/**
5353
* The directory name of the zone data.

Locale/Locale.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626
*/
2727
abstract class Locale
2828
{
29-
const DEFAULT_LOCALE = null;
29+
public const DEFAULT_LOCALE = null;
3030

3131
/* Locale method constants */
32-
const ACTUAL_LOCALE = 0;
33-
const VALID_LOCALE = 1;
32+
public const ACTUAL_LOCALE = 0;
33+
public const VALID_LOCALE = 1;
3434

3535
/* Language tags constants */
36-
const LANG_TAG = 'language';
37-
const EXTLANG_TAG = 'extlang';
38-
const SCRIPT_TAG = 'script';
39-
const REGION_TAG = 'region';
40-
const VARIANT_TAG = 'variant';
41-
const GRANDFATHERED_LANG_TAG = 'grandfathered';
42-
const PRIVATE_TAG = 'private';
36+
public const LANG_TAG = 'language';
37+
public const EXTLANG_TAG = 'extlang';
38+
public const SCRIPT_TAG = 'script';
39+
public const REGION_TAG = 'region';
40+
public const VARIANT_TAG = 'variant';
41+
public const GRANDFATHERED_LANG_TAG = 'grandfathered';
42+
public const PRIVATE_TAG = 'private';
4343

4444
/**
4545
* Not supported. Returns the best available locale based on HTTP "Accept-Language" header according to RFC 2616.

NumberFormatter/NumberFormatter.php

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -43,91 +43,91 @@
4343
abstract class NumberFormatter
4444
{
4545
/* Format style constants */
46-
const PATTERN_DECIMAL = 0;
47-
const DECIMAL = 1;
48-
const CURRENCY = 2;
49-
const PERCENT = 3;
50-
const SCIENTIFIC = 4;
51-
const SPELLOUT = 5;
52-
const ORDINAL = 6;
53-
const DURATION = 7;
54-
const PATTERN_RULEBASED = 9;
55-
const IGNORE = 0;
56-
const DEFAULT_STYLE = 1;
46+
public const PATTERN_DECIMAL = 0;
47+
public const DECIMAL = 1;
48+
public const CURRENCY = 2;
49+
public const PERCENT = 3;
50+
public const SCIENTIFIC = 4;
51+
public const SPELLOUT = 5;
52+
public const ORDINAL = 6;
53+
public const DURATION = 7;
54+
public const PATTERN_RULEBASED = 9;
55+
public const IGNORE = 0;
56+
public const DEFAULT_STYLE = 1;
5757

5858
/* Format type constants */
59-
const TYPE_DEFAULT = 0;
60-
const TYPE_INT32 = 1;
61-
const TYPE_INT64 = 2;
62-
const TYPE_DOUBLE = 3;
63-
const TYPE_CURRENCY = 4;
59+
public const TYPE_DEFAULT = 0;
60+
public const TYPE_INT32 = 1;
61+
public const TYPE_INT64 = 2;
62+
public const TYPE_DOUBLE = 3;
63+
public const TYPE_CURRENCY = 4;
6464

6565
/* Numeric attribute constants */
66-
const PARSE_INT_ONLY = 0;
67-
const GROUPING_USED = 1;
68-
const DECIMAL_ALWAYS_SHOWN = 2;
69-
const MAX_INTEGER_DIGITS = 3;
70-
const MIN_INTEGER_DIGITS = 4;
71-
const INTEGER_DIGITS = 5;
72-
const MAX_FRACTION_DIGITS = 6;
73-
const MIN_FRACTION_DIGITS = 7;
74-
const FRACTION_DIGITS = 8;
75-
const MULTIPLIER = 9;
76-
const GROUPING_SIZE = 10;
77-
const ROUNDING_MODE = 11;
78-
const ROUNDING_INCREMENT = 12;
79-
const FORMAT_WIDTH = 13;
80-
const PADDING_POSITION = 14;
81-
const SECONDARY_GROUPING_SIZE = 15;
82-
const SIGNIFICANT_DIGITS_USED = 16;
83-
const MIN_SIGNIFICANT_DIGITS = 17;
84-
const MAX_SIGNIFICANT_DIGITS = 18;
85-
const LENIENT_PARSE = 19;
66+
public const PARSE_INT_ONLY = 0;
67+
public const GROUPING_USED = 1;
68+
public const DECIMAL_ALWAYS_SHOWN = 2;
69+
public const MAX_INTEGER_DIGITS = 3;
70+
public const MIN_INTEGER_DIGITS = 4;
71+
public const INTEGER_DIGITS = 5;
72+
public const MAX_FRACTION_DIGITS = 6;
73+
public const MIN_FRACTION_DIGITS = 7;
74+
public const FRACTION_DIGITS = 8;
75+
public const MULTIPLIER = 9;
76+
public const GROUPING_SIZE = 10;
77+
public const ROUNDING_MODE = 11;
78+
public const ROUNDING_INCREMENT = 12;
79+
public const FORMAT_WIDTH = 13;
80+
public const PADDING_POSITION = 14;
81+
public const SECONDARY_GROUPING_SIZE = 15;
82+
public const SIGNIFICANT_DIGITS_USED = 16;
83+
public const MIN_SIGNIFICANT_DIGITS = 17;
84+
public const MAX_SIGNIFICANT_DIGITS = 18;
85+
public const LENIENT_PARSE = 19;
8686

8787
/* Text attribute constants */
88-
const POSITIVE_PREFIX = 0;
89-
const POSITIVE_SUFFIX = 1;
90-
const NEGATIVE_PREFIX = 2;
91-
const NEGATIVE_SUFFIX = 3;
92-
const PADDING_CHARACTER = 4;
93-
const CURRENCY_CODE = 5;
94-
const DEFAULT_RULESET = 6;
95-
const PUBLIC_RULESETS = 7;
88+
public const POSITIVE_PREFIX = 0;
89+
public const POSITIVE_SUFFIX = 1;
90+
public const NEGATIVE_PREFIX = 2;
91+
public const NEGATIVE_SUFFIX = 3;
92+
public const PADDING_CHARACTER = 4;
93+
public const CURRENCY_CODE = 5;
94+
public const DEFAULT_RULESET = 6;
95+
public const PUBLIC_RULESETS = 7;
9696

9797
/* Format symbol constants */
98-
const DECIMAL_SEPARATOR_SYMBOL = 0;
99-
const GROUPING_SEPARATOR_SYMBOL = 1;
100-
const PATTERN_SEPARATOR_SYMBOL = 2;
101-
const PERCENT_SYMBOL = 3;
102-
const ZERO_DIGIT_SYMBOL = 4;
103-
const DIGIT_SYMBOL = 5;
104-
const MINUS_SIGN_SYMBOL = 6;
105-
const PLUS_SIGN_SYMBOL = 7;
106-
const CURRENCY_SYMBOL = 8;
107-
const INTL_CURRENCY_SYMBOL = 9;
108-
const MONETARY_SEPARATOR_SYMBOL = 10;
109-
const EXPONENTIAL_SYMBOL = 11;
110-
const PERMILL_SYMBOL = 12;
111-
const PAD_ESCAPE_SYMBOL = 13;
112-
const INFINITY_SYMBOL = 14;
113-
const NAN_SYMBOL = 15;
114-
const SIGNIFICANT_DIGIT_SYMBOL = 16;
115-
const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17;
98+
public const DECIMAL_SEPARATOR_SYMBOL = 0;
99+
public const GROUPING_SEPARATOR_SYMBOL = 1;
100+
public const PATTERN_SEPARATOR_SYMBOL = 2;
101+
public const PERCENT_SYMBOL = 3;
102+
public const ZERO_DIGIT_SYMBOL = 4;
103+
public const DIGIT_SYMBOL = 5;
104+
public const MINUS_SIGN_SYMBOL = 6;
105+
public const PLUS_SIGN_SYMBOL = 7;
106+
public const CURRENCY_SYMBOL = 8;
107+
public const INTL_CURRENCY_SYMBOL = 9;
108+
public const MONETARY_SEPARATOR_SYMBOL = 10;
109+
public const EXPONENTIAL_SYMBOL = 11;
110+
public const PERMILL_SYMBOL = 12;
111+
public const PAD_ESCAPE_SYMBOL = 13;
112+
public const INFINITY_SYMBOL = 14;
113+
public const NAN_SYMBOL = 15;
114+
public const SIGNIFICANT_DIGIT_SYMBOL = 16;
115+
public const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17;
116116

117117
/* Rounding mode values used by NumberFormatter::setAttribute() with NumberFormatter::ROUNDING_MODE attribute */
118-
const ROUND_CEILING = 0;
119-
const ROUND_FLOOR = 1;
120-
const ROUND_DOWN = 2;
121-
const ROUND_UP = 3;
122-
const ROUND_HALFEVEN = 4;
123-
const ROUND_HALFDOWN = 5;
124-
const ROUND_HALFUP = 6;
118+
public const ROUND_CEILING = 0;
119+
public const ROUND_FLOOR = 1;
120+
public const ROUND_DOWN = 2;
121+
public const ROUND_UP = 3;
122+
public const ROUND_HALFEVEN = 4;
123+
public const ROUND_HALFDOWN = 5;
124+
public const ROUND_HALFUP = 6;
125125

126126
/* Pad position values used by NumberFormatter::setAttribute() with NumberFormatter::PADDING_POSITION attribute */
127-
const PAD_BEFORE_PREFIX = 0;
128-
const PAD_AFTER_PREFIX = 1;
129-
const PAD_BEFORE_SUFFIX = 2;
130-
const PAD_AFTER_SUFFIX = 3;
127+
public const PAD_BEFORE_PREFIX = 0;
128+
public const PAD_AFTER_PREFIX = 1;
129+
public const PAD_BEFORE_SUFFIX = 2;
130+
public const PAD_AFTER_SUFFIX = 3;
131131

132132
/**
133133
* The error code from the last operation.

0 commit comments

Comments
 (0)