Skip to content

Commit 78d922a

Browse files
authored
Merge pull request #1670 from deguif/add-visibility-required-cs-rule
Add visibility required cs rule
2 parents 309a7c9 + f4dcf2a commit 78d922a

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ return PhpCsFixer\Config::create()
2323
'phpdoc_no_empty_return' => false,
2424
'ternary_to_null_coalescing' => true,
2525
'nullable_type_declaration_for_default_null_value' => true,
26+
'visibility_required' => ['property', 'method', 'const'],
2627
])
2728
->setUsingCache(true)
2829
->setFinder(

src/DependencyInjection/Compiler/ConfigSourcePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class ConfigSourcePass implements CompilerPassInterface
1919
{
20-
const SOURCE_TYPE_INDEX_TEMPLATE = 'index_template';
20+
public const SOURCE_TYPE_INDEX_TEMPLATE = 'index_template';
2121

2222
/**
2323
* {@inheritdoc}

src/Doctrine/ORM/ElasticaToModelTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class ElasticaToModelTransformer extends AbstractElasticaToModelTransformer
2323
{
24-
const ENTITY_ALIAS = 'o';
24+
public const ENTITY_ALIAS = 'o';
2525

2626
/**
2727
* Fetch objects for theses identifier values.

src/Doctrine/ORMPagerProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
final class ORMPagerProvider implements PagerProviderInterface
2424
{
25-
const ENTITY_ALIAS = 'a';
25+
public const ENTITY_ALIAS = 'a';
2626

2727
/**
2828
* @var string

src/Doctrine/PHPCRPagerProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
final class PHPCRPagerProvider implements PagerProviderInterface
2222
{
23-
const ENTITY_ALIAS = 'a';
23+
public const ENTITY_ALIAS = 'a';
2424

2525
/**
2626
* @var string

0 commit comments

Comments
 (0)