Skip to content

Commit 4f31364

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

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

Caster/Caster.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@
2222
*/
2323
class Caster
2424
{
25-
const EXCLUDE_VERBOSE = 1;
26-
const EXCLUDE_VIRTUAL = 2;
27-
const EXCLUDE_DYNAMIC = 4;
28-
const EXCLUDE_PUBLIC = 8;
29-
const EXCLUDE_PROTECTED = 16;
30-
const EXCLUDE_PRIVATE = 32;
31-
const EXCLUDE_NULL = 64;
32-
const EXCLUDE_EMPTY = 128;
33-
const EXCLUDE_NOT_IMPORTANT = 256;
34-
const EXCLUDE_STRICT = 512;
35-
36-
const PREFIX_VIRTUAL = "\0~\0";
37-
const PREFIX_DYNAMIC = "\0+\0";
38-
const PREFIX_PROTECTED = "\0*\0";
25+
public const EXCLUDE_VERBOSE = 1;
26+
public const EXCLUDE_VIRTUAL = 2;
27+
public const EXCLUDE_DYNAMIC = 4;
28+
public const EXCLUDE_PUBLIC = 8;
29+
public const EXCLUDE_PROTECTED = 16;
30+
public const EXCLUDE_PRIVATE = 32;
31+
public const EXCLUDE_NULL = 64;
32+
public const EXCLUDE_EMPTY = 128;
33+
public const EXCLUDE_NOT_IMPORTANT = 256;
34+
public const EXCLUDE_STRICT = 512;
35+
36+
public const PREFIX_VIRTUAL = "\0~\0";
37+
public const PREFIX_DYNAMIC = "\0+\0";
38+
public const PREFIX_PROTECTED = "\0*\0";
3939

4040
/**
4141
* Casts objects to arrays and adds the dynamic property prefix.

Caster/ReflectionCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
class ReflectionCaster
2424
{
25-
const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__.'::unsetClosureFileInfo'];
25+
public const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__.'::unsetClosureFileInfo'];
2626

2727
private static $extraMap = [
2828
'docComment' => 'getDocComment',

Cloner/Cursor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
*/
1919
class Cursor
2020
{
21-
const HASH_INDEXED = Stub::ARRAY_INDEXED;
22-
const HASH_ASSOC = Stub::ARRAY_ASSOC;
23-
const HASH_OBJECT = Stub::TYPE_OBJECT;
24-
const HASH_RESOURCE = Stub::TYPE_RESOURCE;
21+
public const HASH_INDEXED = Stub::ARRAY_INDEXED;
22+
public const HASH_ASSOC = Stub::ARRAY_ASSOC;
23+
public const HASH_OBJECT = Stub::TYPE_OBJECT;
24+
public const HASH_RESOURCE = Stub::TYPE_RESOURCE;
2525

2626
public $depth = 0;
2727
public $refIndex = 0;

Cloner/Stub.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
*/
1919
class Stub
2020
{
21-
const TYPE_REF = 1;
22-
const TYPE_STRING = 2;
23-
const TYPE_ARRAY = 3;
24-
const TYPE_OBJECT = 4;
25-
const TYPE_RESOURCE = 5;
21+
public const TYPE_REF = 1;
22+
public const TYPE_STRING = 2;
23+
public const TYPE_ARRAY = 3;
24+
public const TYPE_OBJECT = 4;
25+
public const TYPE_RESOURCE = 5;
2626

27-
const STRING_BINARY = 1;
28-
const STRING_UTF8 = 2;
27+
public const STRING_BINARY = 1;
28+
public const STRING_UTF8 = 2;
2929

30-
const ARRAY_ASSOC = 1;
31-
const ARRAY_INDEXED = 2;
30+
public const ARRAY_ASSOC = 1;
31+
public const ARRAY_INDEXED = 2;
3232

3333
public $type = self::TYPE_REF;
3434
public $class = '';

Dumper/AbstractDumper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
*/
2222
abstract class AbstractDumper implements DataDumperInterface, DumperInterface
2323
{
24-
const DUMP_LIGHT_ARRAY = 1;
25-
const DUMP_STRING_LENGTH = 2;
26-
const DUMP_COMMA_SEPARATOR = 4;
27-
const DUMP_TRAILING_COMMA = 8;
24+
public const DUMP_LIGHT_ARRAY = 1;
25+
public const DUMP_STRING_LENGTH = 2;
26+
public const DUMP_COMMA_SEPARATOR = 4;
27+
public const DUMP_TRAILING_COMMA = 8;
2828

2929
public static $defaultOutput = 'php://output';
3030

0 commit comments

Comments
 (0)