Skip to content

Commit b8de1a8

Browse files
Merge branch '5.1' into 5.2
* 5.1: Update .php_cs.dist Apply "visibility_required" CS rule to constants
2 parents dd053aa + 82fbd72 commit b8de1a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+69
-69
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
@@ -26,37 +26,37 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
2626
/**
2727
* @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_CEILING instead.
2828
*/
29-
const ROUND_CEILING = \NumberFormatter::ROUND_CEILING;
29+
public const ROUND_CEILING = \NumberFormatter::ROUND_CEILING;
3030

3131
/**
3232
* @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_FLOOR instead.
3333
*/
34-
const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR;
34+
public const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR;
3535

3636
/**
3737
* @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_UP instead.
3838
*/
39-
const ROUND_UP = \NumberFormatter::ROUND_UP;
39+
public const ROUND_UP = \NumberFormatter::ROUND_UP;
4040

4141
/**
4242
* @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_DOWN instead.
4343
*/
44-
const ROUND_DOWN = \NumberFormatter::ROUND_DOWN;
44+
public const ROUND_DOWN = \NumberFormatter::ROUND_DOWN;
4545

4646
/**
4747
* @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFEVEN instead.
4848
*/
49-
const ROUND_HALF_EVEN = \NumberFormatter::ROUND_HALFEVEN;
49+
public const ROUND_HALF_EVEN = \NumberFormatter::ROUND_HALFEVEN;
5050

5151
/**
5252
* @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFUP instead.
5353
*/
54-
const ROUND_HALF_UP = \NumberFormatter::ROUND_HALFUP;
54+
public const ROUND_HALF_UP = \NumberFormatter::ROUND_HALFUP;
5555

5656
/**
5757
* @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFDOWN instead.
5858
*/
59-
const ROUND_HALF_DOWN = \NumberFormatter::ROUND_HALFDOWN;
59+
public const ROUND_HALF_DOWN = \NumberFormatter::ROUND_HALFDOWN;
6060

6161
protected $grouping;
6262

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
@@ -24,8 +24,8 @@
2424

2525
class FileType extends AbstractType
2626
{
27-
const KIB_BYTES = 1024;
28-
const MIB_BYTES = 1048576;
27+
public const KIB_BYTES = 1024;
28+
public const MIB_BYTES = 1048576;
2929

3030
private static $suffixes = [
3131
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)