Skip to content

Commit

Permalink
[CodingStyle] Trigger RemoveFinalFromConstRector (#1733)
Browse files Browse the repository at this point in the history
* [CodingStyle] Trigger RemoveFinalFromConstRector

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
  • Loading branch information
samsonasik and actions-user committed Jan 26, 2022
1 parent 15e28c6 commit cfd0d61
Show file tree
Hide file tree
Showing 122 changed files with 432 additions and 432 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ final class PhpDocFromTypeDeclarationDecorator
/**
* @var class-string<ReturnTypeWillChange>
*/
final public const RETURN_TYPE_WILL_CHANGE_ATTRIBUTE = 'ReturnTypeWillChange';
public const RETURN_TYPE_WILL_CHANGE_ATTRIBUTE = 'ReturnTypeWillChange';

/**
* @var array<string, array<string, string[]>>
*/
final public const ADD_RETURN_TYPE_WILL_CHANGE = [
public const ADD_RETURN_TYPE_WILL_CHANGE = [
'PHPStan\Type\MixedType' => [
'ArrayAccess' => ['offsetGet'],
],
Expand Down
2 changes: 1 addition & 1 deletion packages/BetterPhpDocParser/Printer/PhpDocInfoPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class PhpDocInfoPrinter
* @var string
* @see https://regex101.com/r/Ab0Vey/1
*/
final public const CLOSING_DOCBLOCK_REGEX = '#\*\/(\s+)?$#';
public const CLOSING_DOCBLOCK_REGEX = '#\*\/(\s+)?$#';

/**
* @var string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class SilentKeyMap
/**
* @var array<string, string>
*/
final public const CLASS_NAMES_TO_SILENT_KEYS = [
public const CLASS_NAMES_TO_SILENT_KEYS = [
'Symfony\Component\Routing\Annotation\Route' => 'path',
];
}
4 changes: 2 additions & 2 deletions packages/BetterPhpDocParser/ValueObject/NodeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class NodeTypes
/**
* @var array<class-string<PhpDocTagValueNode>>
*/
final public const TYPE_AWARE_NODES = [
public const TYPE_AWARE_NODES = [
VarTagValueNode::class,
ParamTagValueNode::class,
ReturnTagValueNode::class,
Expand All @@ -29,7 +29,7 @@ final class NodeTypes
/**
* @var string[]
*/
final public const TYPE_AWARE_DOCTRINE_ANNOTATION_CLASSES = [
public const TYPE_AWARE_DOCTRINE_ANNOTATION_CLASSES = [
'JMS\Serializer\Annotation\Type',
'Doctrine\ORM\Mapping\OneToMany',
'Symfony\Component\Validator\Constraints\Choice',
Expand Down
10 changes: 5 additions & 5 deletions packages/BetterPhpDocParser/ValueObject/PhpDocAttributeKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ final class PhpDocAttributeKey
/**
* @var string
*/
final public const START_AND_END = 'start_and_end';
public const START_AND_END = 'start_and_end';

/**
* Fully qualified name of identifier type class
* @var string
*/
final public const RESOLVED_CLASS = 'resolved_class';
public const RESOLVED_CLASS = 'resolved_class';

/**
* @var string
*/
final public const PARENT = NativePhpDocAttributeKey::PARENT;
public const PARENT = NativePhpDocAttributeKey::PARENT;

/**
* @var string
*/
final public const LAST_PHP_DOC_TOKEN_POSITION = 'last_token_position';
public const LAST_PHP_DOC_TOKEN_POSITION = 'last_token_position';

/**
* @var string
*/
final public const ORIG_NODE = NativePhpDocAttributeKey::ORIG_NODE;
public const ORIG_NODE = NativePhpDocAttributeKey::ORIG_NODE;
}
6 changes: 3 additions & 3 deletions packages/Caching/Enum/CacheKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ final class CacheKey
/**
* @var string
*/
final public const CONFIGURATION_HASH_KEY = 'configuration_hash';
public const CONFIGURATION_HASH_KEY = 'configuration_hash';

/**
* @var string
*/
final public const FILE_HASH_KEY = 'file_hash';
public const FILE_HASH_KEY = 'file_hash';

/**
* @var string
*/
final public const DEPENDENT_FILES_KEY = 'dependency_files_key';
public const DEPENDENT_FILES_KEY = 'dependency_files_key';
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class ConsoleOutputFormatter implements OutputFormatterInterface
/**
* @var string
*/
final public const NAME = 'console';
public const NAME = 'console';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion packages/ChangesReporting/Output/JsonOutputFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class JsonOutputFormatter implements OutputFormatterInterface
/**
* @var string
*/
final public const NAME = 'json';
public const NAME = 'json';

public function __construct(
private readonly RectorsChangelogResolver $rectorsChangelogResolver
Expand Down
2 changes: 1 addition & 1 deletion packages/Comments/NodeDocBlock/DocBlockUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class DocBlockUpdater
* @var string
* @see https://regex101.com/r/VdaVGL/1
*/
final public const SPACE_OR_ASTERISK_REGEX = '#(\s|\*)+#';
public const SPACE_OR_ASTERISK_REGEX = '#(\s|\*)+#';

public function __construct(
private readonly PhpDocInfoPrinter $phpDocInfoPrinter
Expand Down
10 changes: 5 additions & 5 deletions packages/FileFormatter/ValueObject/EditorConfigOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ final class EditorConfigOption
/**
* @var string
*/
final public const INDENT_STYLE = 'indent_style';
public const INDENT_STYLE = 'indent_style';

/**
* @var string
*/
final public const INDENT_SIZE = 'indent_size';
public const INDENT_SIZE = 'indent_size';

/**
* @var string
*/
final public const END_OF_LINE = 'end_of_line';
public const END_OF_LINE = 'end_of_line';

/**
* @var string
*/
final public const INSERT_FINAL_NEWLINE = 'insert_final_newline';
public const INSERT_FINAL_NEWLINE = 'insert_final_newline';

/**
* @var string
*/
final public const TAB_WIDTH = 'tab_width';
public const TAB_WIDTH = 'tab_width';
}
2 changes: 1 addition & 1 deletion packages/FileFormatter/ValueObject/Indent.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class Indent implements Stringable
/**
* @var array<string, string>
*/
final public const CHARACTERS = [
public const CHARACTERS = [
self::SPACE => ' ',
self::TAB => "\t",
];
Expand Down
6 changes: 3 additions & 3 deletions packages/FileFormatter/ValueObject/NewLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ final class NewLine implements Stringable
/**
* @var string
*/
final public const LINE_FEED = 'lf';
public const LINE_FEED = 'lf';

/**
* @var string
*/
final public const CARRIAGE_RETURN = 'cr';
public const CARRIAGE_RETURN = 'cr';

/**
* @var string
*/
final public const CARRIAGE_RETURN_LINE_FEED = 'crlf';
public const CARRIAGE_RETURN_LINE_FEED = 'crlf';

/**
* @var array<string, string>
Expand Down
6 changes: 3 additions & 3 deletions packages/NodeNestingScope/ValueObject/ControlStructure.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class ControlStructure
/**
* @var array<class-string<FunctionLike>>
*/
final public const RETURN_ISOLATING_SCOPE_NODE_TYPES = [
public const RETURN_ISOLATING_SCOPE_NODE_TYPES = [
Function_::class,
ClassMethod::class,
Closure::class,
Expand All @@ -37,7 +37,7 @@ final class ControlStructure
/**
* @var array<class-string<Node>>
*/
final public const BREAKING_SCOPE_NODE_TYPES = [
public const BREAKING_SCOPE_NODE_TYPES = [
For_::class,
Foreach_::class,
If_::class,
Expand All @@ -54,7 +54,7 @@ final class ControlStructure
* These situations happens only if condition is met
* @var array<class-string<Node>>
*/
final public const CONDITIONAL_NODE_SCOPE_TYPES = [
public const CONDITIONAL_NODE_SCOPE_TYPES = [
If_::class,
While_::class,
Do_::class,
Expand Down
Loading

0 comments on commit cfd0d61

Please sign in to comment.