Skip to content

Commit

Permalink
Apply "visibility_required" CS rule to constants
Browse files Browse the repository at this point in the history
php-cs-fixer fix --rules='{"visibility_required": ["property", "method", "const"]}'
  • Loading branch information
nicolas-grekas committed Dec 8, 2020
1 parent 9f1d1d8 commit ebd0965
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
*/
class Finder implements \IteratorAggregate, \Countable
{
const IGNORE_VCS_FILES = 1;
const IGNORE_DOT_FILES = 2;
const IGNORE_VCS_IGNORED_FILES = 4;
public const IGNORE_VCS_FILES = 1;
public const IGNORE_DOT_FILES = 2;
public const IGNORE_VCS_IGNORED_FILES = 4;

private $mode = 0;
private $names = [];
Expand Down
4 changes: 2 additions & 2 deletions Iterator/FileTypeFilterIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/
class FileTypeFilterIterator extends \FilterIterator
{
const ONLY_FILES = 1;
const ONLY_DIRECTORIES = 2;
public const ONLY_FILES = 1;
public const ONLY_DIRECTORIES = 2;

private $mode;

Expand Down
14 changes: 7 additions & 7 deletions Iterator/SortableIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
*/
class SortableIterator implements \IteratorAggregate
{
const SORT_BY_NONE = 0;
const SORT_BY_NAME = 1;
const SORT_BY_TYPE = 2;
const SORT_BY_ACCESSED_TIME = 3;
const SORT_BY_CHANGED_TIME = 4;
const SORT_BY_MODIFIED_TIME = 5;
const SORT_BY_NAME_NATURAL = 6;
public const SORT_BY_NONE = 0;
public const SORT_BY_NAME = 1;
public const SORT_BY_TYPE = 2;
public const SORT_BY_ACCESSED_TIME = 3;
public const SORT_BY_CHANGED_TIME = 4;
public const SORT_BY_MODIFIED_TIME = 5;
public const SORT_BY_NAME_NATURAL = 6;

private $iterator;
private $sort;
Expand Down
6 changes: 3 additions & 3 deletions Tests/Iterator/MockSplFileInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

class MockSplFileInfo extends \SplFileInfo
{
const TYPE_DIRECTORY = 1;
const TYPE_FILE = 2;
const TYPE_UNKNOWN = 3;
public const TYPE_DIRECTORY = 1;
public const TYPE_FILE = 2;
public const TYPE_UNKNOWN = 3;

private $contents = null;
private $mode = null;
Expand Down

0 comments on commit ebd0965

Please sign in to comment.