Skip to content

Commit 80b042c

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

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

Generator/UrlGeneratorInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,25 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface
3434
/**
3535
* Generates an absolute URL, e.g. "http://example.com/dir/file".
3636
*/
37-
const ABSOLUTE_URL = 0;
37+
public const ABSOLUTE_URL = 0;
3838

3939
/**
4040
* Generates an absolute path, e.g. "/dir/file".
4141
*/
42-
const ABSOLUTE_PATH = 1;
42+
public const ABSOLUTE_PATH = 1;
4343

4444
/**
4545
* Generates a relative path based on the current request path, e.g. "../parent-file".
4646
*
4747
* @see UrlGenerator::getRelativePath()
4848
*/
49-
const RELATIVE_PATH = 2;
49+
public const RELATIVE_PATH = 2;
5050

5151
/**
5252
* Generates a network path, e.g. "//example.com/dir/file".
5353
* Such reference reuses the current scheme but specifies the host.
5454
*/
55-
const NETWORK_PATH = 3;
55+
public const NETWORK_PATH = 3;
5656

5757
/**
5858
* Generates a URL or path for a specific route based on the given parameters.

Loader/XmlFileLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
*/
2727
class XmlFileLoader extends FileLoader
2828
{
29-
const NAMESPACE_URI = 'http://symfony.com/schema/routing';
30-
const SCHEME_PATH = '/schema/routing/routing-1.0.xsd';
29+
public const NAMESPACE_URI = 'http://symfony.com/schema/routing';
30+
public const SCHEME_PATH = '/schema/routing/routing-1.0.xsd';
3131

3232
/**
3333
* Loads an XML file.

Matcher/TraceableUrlMatcher.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
*/
2424
class TraceableUrlMatcher extends UrlMatcher
2525
{
26-
const ROUTE_DOES_NOT_MATCH = 0;
27-
const ROUTE_ALMOST_MATCHES = 1;
28-
const ROUTE_MATCHES = 2;
26+
public const ROUTE_DOES_NOT_MATCH = 0;
27+
public const ROUTE_ALMOST_MATCHES = 1;
28+
public const ROUTE_MATCHES = 2;
2929

3030
protected $traces;
3131

Matcher/UrlMatcher.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
*/
2929
class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface
3030
{
31-
const REQUIREMENT_MATCH = 0;
32-
const REQUIREMENT_MISMATCH = 1;
33-
const ROUTE_MATCH = 2;
31+
public const REQUIREMENT_MATCH = 0;
32+
public const REQUIREMENT_MISMATCH = 1;
33+
public const ROUTE_MATCH = 2;
3434

3535
/** @var RequestContext */
3636
protected $context;

RouteCompiler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@
1919
*/
2020
class RouteCompiler implements RouteCompilerInterface
2121
{
22-
const REGEX_DELIMITER = '#';
22+
public const REGEX_DELIMITER = '#';
2323

2424
/**
2525
* This string defines the characters that are automatically considered separators in front of
2626
* optional placeholders (with default and no static text following). Such a single separator
2727
* can be left out together with the optional placeholder from matching and generating URLs.
2828
*/
29-
const SEPARATORS = '/,;.:-_~+*=@|';
29+
public const SEPARATORS = '/,;.:-_~+*=@|';
3030

3131
/**
3232
* The maximum supported length of a PCRE subpattern name
3333
* http://pcre.org/current/doc/html/pcre2pattern.html#SEC16.
3434
*
3535
* @internal
3636
*/
37-
const VARIABLE_MAXIMUM_LENGTH = 32;
37+
public const VARIABLE_MAXIMUM_LENGTH = 32;
3838

3939
/**
4040
* {@inheritdoc}

Tests/RouteCompilerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,5 +394,5 @@ public function provideRemoveCapturingGroup()
394394

395395
class Utf8RouteCompiler extends RouteCompiler
396396
{
397-
const SEPARATORS = '';
397+
public const SEPARATORS = '';
398398
}

0 commit comments

Comments
 (0)