Skip to content

Commit 4b3af2c

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

40 files changed

+66
-66
lines changed

AbstractRendererEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface
2121
/**
2222
* The variable in {@link FormView} used as cache key.
2323
*/
24-
const CACHE_KEY_VAR = 'cache_key';
24+
public const CACHE_KEY_VAR = 'cache_key';
2525

2626
protected $defaultThemes;
2727
protected $themes = [];

Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
*/
2323
class DateIntervalToArrayTransformer implements DataTransformerInterface
2424
{
25-
const YEARS = 'years';
26-
const MONTHS = 'months';
27-
const DAYS = 'days';
28-
const HOURS = 'hours';
29-
const MINUTES = 'minutes';
30-
const SECONDS = 'seconds';
31-
const INVERT = 'invert';
25+
public const YEARS = 'years';
26+
public const MONTHS = 'months';
27+
public const DAYS = 'days';
28+
public const HOURS = 'hours';
29+
public const MINUTES = 'minutes';
30+
public const SECONDS = 'seconds';
31+
public const INVERT = 'invert';
3232

3333
private static $availableFields = [
3434
self::YEARS => 'y',

Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class DateTimeToHtml5LocalDateTimeTransformer extends BaseDateTimeTransformer
2222
{
23-
const HTML5_FORMAT = 'Y-m-d\\TH:i:s';
23+
public const HTML5_FORMAT = 'Y-m-d\\TH:i:s';
2424

2525
/**
2626
* Transforms a \DateTime into a local date and time string.

Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,49 +28,49 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
2828
*
2929
* Rounds 1.4 to 2 and -1.4 to -1.
3030
*/
31-
const ROUND_CEILING = \NumberFormatter::ROUND_CEILING;
31+
public const ROUND_CEILING = \NumberFormatter::ROUND_CEILING;
3232

3333
/**
3434
* Rounds a number towards negative infinity.
3535
*
3636
* Rounds 1.4 to 1 and -1.4 to -2.
3737
*/
38-
const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR;
38+
public const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR;
3939

4040
/**
4141
* Rounds a number away from zero.
4242
*
4343
* Rounds 1.4 to 2 and -1.4 to -2.
4444
*/
45-
const ROUND_UP = \NumberFormatter::ROUND_UP;
45+
public const ROUND_UP = \NumberFormatter::ROUND_UP;
4646

4747
/**
4848
* Rounds a number towards zero.
4949
*
5050
* Rounds 1.4 to 1 and -1.4 to -1.
5151
*/
52-
const ROUND_DOWN = \NumberFormatter::ROUND_DOWN;
52+
public const ROUND_DOWN = \NumberFormatter::ROUND_DOWN;
5353

5454
/**
5555
* Rounds to the nearest number and halves to the next even number.
5656
*
5757
* Rounds 2.5, 1.6 and 1.5 to 2 and 1.4 to 1.
5858
*/
59-
const ROUND_HALF_EVEN = \NumberFormatter::ROUND_HALFEVEN;
59+
public const ROUND_HALF_EVEN = \NumberFormatter::ROUND_HALFEVEN;
6060

6161
/**
6262
* Rounds to the nearest number and halves away from zero.
6363
*
6464
* Rounds 2.5 to 3, 1.6 and 1.5 to 2 and 1.4 to 1.
6565
*/
66-
const ROUND_HALF_UP = \NumberFormatter::ROUND_HALFUP;
66+
public const ROUND_HALF_UP = \NumberFormatter::ROUND_HALFUP;
6767

6868
/**
6969
* Rounds to the nearest number and halves towards zero.
7070
*
7171
* Rounds 2.5 and 1.6 to 2, 1.5 and 1.4 to 1.
7272
*/
73-
const ROUND_HALF_DOWN = \NumberFormatter::ROUND_HALFDOWN;
73+
public const ROUND_HALF_DOWN = \NumberFormatter::ROUND_HALFDOWN;
7474

7575
protected $grouping;
7676

Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
*/
2424
class PercentToLocalizedStringTransformer implements DataTransformerInterface
2525
{
26-
const FRACTIONAL = 'fractional';
27-
const INTEGER = 'integer';
26+
public const FRACTIONAL = 'fractional';
27+
public const INTEGER = 'integer';
2828

2929
protected static $types = [
3030
self::FRACTIONAL,

Extension/Core/Type/DateTimeType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131

3232
class DateTimeType extends AbstractType
3333
{
34-
const DEFAULT_DATE_FORMAT = \IntlDateFormatter::MEDIUM;
35-
const DEFAULT_TIME_FORMAT = \IntlDateFormatter::MEDIUM;
34+
public const DEFAULT_DATE_FORMAT = \IntlDateFormatter::MEDIUM;
35+
public const DEFAULT_TIME_FORMAT = \IntlDateFormatter::MEDIUM;
3636

3737
/**
3838
* The HTML5 datetime-local format as defined in
3939
* http://w3c.github.io/html-reference/datatypes.html#form.data.datetime-local.
4040
*/
41-
const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";
41+
public const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";
4242

4343
private static $acceptedFormats = [
4444
\IntlDateFormatter::FULL,

Extension/Core/Type/DateType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828

2929
class DateType extends AbstractType
3030
{
31-
const DEFAULT_FORMAT = \IntlDateFormatter::MEDIUM;
32-
const HTML5_FORMAT = 'yyyy-MM-dd';
31+
public const DEFAULT_FORMAT = \IntlDateFormatter::MEDIUM;
32+
public const HTML5_FORMAT = 'yyyy-MM-dd';
3333

3434
private static $acceptedFormats = [
3535
\IntlDateFormatter::FULL,

Extension/Core/Type/FileType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
class FileType extends AbstractType
2727
{
28-
const KIB_BYTES = 1024;
29-
const MIB_BYTES = 1048576;
28+
public const KIB_BYTES = 1024;
29+
public const MIB_BYTES = 1048576;
3030

3131
private static $suffixes = [
3232
1 => 'bytes',

Extension/Validator/Constraints/Form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
*/
1919
class Form extends Constraint
2020
{
21-
const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca';
22-
const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854';
21+
public const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca';
22+
public const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854';
2323

2424
protected static $errorNames = [
2525
self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR',

FormErrorIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
3333
/**
3434
* The prefix used for indenting nested error messages.
3535
*/
36-
const INDENTATION = ' ';
36+
public const INDENTATION = ' ';
3737

3838
private $form;
3939
private $errors;

0 commit comments

Comments
 (0)