Skip to content

Commit

Permalink
minor #5425 Cleanup 3.0 todos (keradus)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 2.17 branch.

Discussion
----------

Cleanup 3.0 todos

ping @SpacePossum @kubawerlos @julienfalque @localheinz

Commits
-------

2f7a612 Cleanup 3.0 todos
  • Loading branch information
keradus committed Jan 13, 2021
2 parents 7d57530 + 2f7a612 commit 21934b5
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Console/WarningsDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(ToolInfoInterface $toolInfo)

public function detectOldMajor()
{
// @TODO 3.0 to be activated with new MAJOR release
// @TODO 2.99 to be activated with new MAJOR release
// $this->warnings[] = 'You are running PHP CS Fixer v2, which is not maintained anymore. Please update to v3.';
}

Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/ClassNotation/VisibilityRequiredFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function createConfigurationDefinition()
(new FixerOptionBuilder('elements', 'The structural elements to fix (PHP >= 7.1 required for `const`).'))
->setAllowedTypes(['array'])
->setAllowedValues([new AllowedValueSubset(['property', 'method', 'const'])])
->setDefault(['property', 'method'])
->setDefault(['property', 'method']) // @TODO v3 / PHP 7.1 add `const`
->getOption(),
], $this->getName());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Whitespace/IndentationTypeFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private function fixIndentToken(Tokens $tokens, $index)
$content = $tokens[$index]->getContent();
$previousTokenHasTrailingLinebreak = false;

// @TODO 3.0 this can be removed when we have a transformer for "T_OPEN_TAG" to "T_OPEN_TAG + T_WHITESPACE"
// @TODO this can be removed when we have a transformer for "T_OPEN_TAG" to "T_OPEN_TAG + T_WHITESPACE"
if (false !== strpos($tokens[$index - 1]->getContent(), "\n")) {
$content = "\n".$content;
$previousTokenHasTrailingLinebreak = true;
Expand Down
2 changes: 0 additions & 2 deletions src/FixerConfiguration/AliasedFixerOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* @author ntzm
*
* @internal
*
* @todo 3.0 Drop this class
*/
final class AliasedFixerOption implements FixerOptionInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/FixerConfiguration/AliasedFixerOptionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* @author ntzm
*
* @internal
*
* @todo 3.0 Drop this class
*/
final class AliasedFixerOptionBuilder
{
Expand Down
2 changes: 0 additions & 2 deletions tests/Test/AbstractFixerWithAliasedOptionsTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
* @author ntzm
*
* @internal
*
* @todo 3.0 Drop this class
*/
abstract class AbstractFixerWithAliasedOptionsTestCase extends AbstractFixerTestCase
{
Expand Down

0 comments on commit 21934b5

Please sign in to comment.