mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
[Privatization] Move MakeUnusedClassesWithChildrenAbstractRector here (#4987)
This commit is contained in:
parent
bfcdd22a7c
commit
a2dbaedb0e
@ -136,7 +136,6 @@
|
||||
"Rector\\Php74\\": "rules/php74/src",
|
||||
"Rector\\Php80\\": "rules/php80/src",
|
||||
"Rector\\PhpAttribute\\": "packages/php-attribute/src",
|
||||
"Rector\\PhpDeglobalize\\": "rules/php-deglobalize/src",
|
||||
"Rector\\PhpSpecToPHPUnit\\": "rules/php-spec-to-phpunit/src",
|
||||
"Rector\\Polyfill\\": "rules/polyfill/src",
|
||||
"Rector\\PostRector\\": "packages/post-rector/src",
|
||||
@ -259,7 +258,6 @@
|
||||
"Rector\\Php73\\Tests\\": "rules/php73/tests",
|
||||
"Rector\\Php74\\Tests\\": "rules/php74/tests",
|
||||
"Rector\\Php80\\Tests\\": "rules/php80/tests",
|
||||
"Rector\\PhpDeglobalize\\Tests\\": "rules/php-deglobalize/tests",
|
||||
"Rector\\PhpSpecToPHPUnit\\Tests\\": "rules/php-spec-to-phpunit/tests",
|
||||
"Rector\\Polyfill\\Tests\\": "rules/polyfill/tests",
|
||||
"Rector\\Privatization\\Tests\\": "rules/privatization/tests",
|
||||
|
@ -25,6 +25,7 @@ use Rector\CodingStyle\Rector\Include_\FollowRequireByDirRector;
|
||||
use Rector\CodingStyle\Rector\MethodCall\UseMessageVariableForSprintfInSymfonyStyleRector;
|
||||
use Rector\CodingStyle\Rector\Plus\UseIncrementAssignRector;
|
||||
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
|
||||
use Rector\CodingStyle\Rector\Property\AddFalseDefaultToBoolPropertyRector;
|
||||
use Rector\CodingStyle\Rector\String_\SplitStringClassConstantToClassConstFetchRector;
|
||||
use Rector\CodingStyle\Rector\String_\SymplifyQuoteEscapeRector;
|
||||
use Rector\CodingStyle\Rector\Switch_\BinarySwitchToIfElseRector;
|
||||
@ -58,6 +59,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services->set(NewlineBeforeNewAssignSetRector::class);
|
||||
$services->set(ManualJsonStringToJsonEncodeArrayRector::class);
|
||||
$services->set(AddArrayDefaultToArrayPropertyRector::class);
|
||||
$services->set(AddFalseDefaultToBoolPropertyRector::class);
|
||||
$services->set(MakeInheritedMethodVisibilitySameAsParentRector::class);
|
||||
$services->set(CallUserFuncCallToVariadicRector::class);
|
||||
$services->set(VersionCompareFuncCallToConstantRector::class);
|
||||
|
@ -2,12 +2,16 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\Privatization\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector;
|
||||
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
|
||||
use Rector\Privatization\Rector\Class_\MakeUnusedClassesWithChildrenAbstractRector;
|
||||
use Rector\Privatization\Rector\Class_\RepeatedLiteralToClassConstantRector;
|
||||
use Rector\Privatization\Rector\ClassConst\PrivatizeLocalClassConstantRector;
|
||||
use Rector\Privatization\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector;
|
||||
use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector;
|
||||
use Rector\Privatization\Rector\ClassMethod\PrivatizeLocalOnlyMethodRector;
|
||||
use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector;
|
||||
use Rector\Privatization\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector;
|
||||
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
|
||||
use Rector\Privatization\Rector\Property\PrivatizeLocalPropertyToPrivatePropertyRector;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
@ -17,6 +21,11 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
|
||||
$services->set(MakeUnusedClassesWithChildrenAbstractRector::class);
|
||||
$services->set(FinalizeClassesWithoutChildrenRector::class);
|
||||
$services->set(ChangeGlobalVariablesToPropertiesRector::class);
|
||||
$services->set(ChangeReadOnlyPropertyWithDefaultValueToConstantRector::class);
|
||||
$services->set(ChangeReadOnlyVariableWithDefaultValueToConstantRector::class);
|
||||
$services->set(RepeatedLiteralToClassConstantRector::class);
|
||||
|
||||
$services->set(PrivatizeLocalOnlyMethodRector::class);
|
||||
$services->set(PrivatizeLocalGetterToPropertyRector::class);
|
||||
$services->set(PrivatizeLocalPropertyToPrivatePropertyRector::class);
|
||||
|
@ -2,19 +2,11 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\SOLID\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector;
|
||||
use Rector\SOLID\Rector\Class_\RepeatedLiteralToClassConstantRector;
|
||||
use Rector\SOLID\Rector\Property\AddFalseDefaultToBoolPropertyRector;
|
||||
use Rector\SOLID\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector;
|
||||
use Rector\SOLID\Rector\Variable\MoveVariableDeclarationNearReferenceRector;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
||||
$services->set(ChangeReadOnlyPropertyWithDefaultValueToConstantRector::class);
|
||||
$services->set(ChangeReadOnlyVariableWithDefaultValueToConstantRector::class);
|
||||
$services->set(RepeatedLiteralToClassConstantRector::class);
|
||||
$services->set(AddFalseDefaultToBoolPropertyRector::class);
|
||||
$services->set(MoveVariableDeclarationNearReferenceRector::class);
|
||||
};
|
||||
|
@ -12854,7 +12854,7 @@ Change docs types to union types, where possible (properties are covered by Type
|
||||
|
||||
Change global `$variables` to private properties
|
||||
|
||||
- class: `Rector\PhpDeglobalize\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector`
|
||||
- class: `Rector\Privatization\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector`
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
@ -14405,7 +14405,7 @@ Rename file to respect class name
|
||||
|
||||
Add false default to bool properties, to prevent null compare errors
|
||||
|
||||
- class: `Rector\SOLID\Rector\Property\AddFalseDefaultToBoolPropertyRector`
|
||||
- class: `Rector\CodingStyle\Rector\Property\AddFalseDefaultToBoolPropertyRector`
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
@ -14424,7 +14424,7 @@ Add false default to bool properties, to prevent null compare errors
|
||||
|
||||
Change property with read only status with default value to constant
|
||||
|
||||
- class: `Rector\SOLID\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector`
|
||||
- class: `Rector\Privatization\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector`
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
@ -14454,7 +14454,7 @@ Change property with read only status with default value to constant
|
||||
|
||||
Change variable with read only status with default value to constant
|
||||
|
||||
- class: `Rector\SOLID\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector`
|
||||
- class: `Rector\Privatization\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector`
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
@ -14605,7 +14605,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
|
||||
Replace repeated strings with constant
|
||||
|
||||
- class: `Rector\SOLID\Rector\Class_\RepeatedLiteralToClassConstantRector`
|
||||
- class: `Rector\Privatization\Rector\Class_\RepeatedLiteralToClassConstantRector`
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
|
3
ecs.php
3
ecs.php
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
use PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff;
|
||||
use PhpCsFixer\Fixer\Basic\Psr4Fixer;
|
||||
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
|
||||
use PhpCsFixer\Fixer\Import\GlobalNamespaceImportFixer;
|
||||
use PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer;
|
||||
use PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixer;
|
||||
@ -29,6 +30,8 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services->set(StandaloneLineInMultilineArrayFixer::class);
|
||||
$services->set(ArrayOpenerAndCloserNewlineFixer::class);
|
||||
|
||||
$services->set(ClassAttributesSeparationFixer::class);
|
||||
|
||||
$services->set(GeneralPhpdocAnnotationRemoveFixer::class)
|
||||
->call('configure', [[
|
||||
'annotations' => ['throws', 'author', 'package', 'group'],
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\SOLID\Rector\Property;
|
||||
namespace Rector\CodingStyle\Rector\Property;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Property;
|
||||
@ -14,7 +14,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
|
||||
/**
|
||||
* @see \Rector\SOLID\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector\AddFalseDefaultToBoolPropertyRectorTest
|
||||
* @see \Rector\CodingStyle\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector\AddFalseDefaultToBoolPropertyRectorTest
|
||||
*/
|
||||
final class AddFalseDefaultToBoolPropertyRector extends AbstractRector
|
||||
{
|
@ -2,10 +2,10 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector;
|
||||
namespace Rector\CodingStyle\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\SOLID\Rector\Property\AddFalseDefaultToBoolPropertyRector;
|
||||
use Rector\CodingStyle\Rector\Property\AddFalseDefaultToBoolPropertyRector;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $isDisabled;
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $isDisabled = false;
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector\Fixture;
|
||||
|
||||
class SkipDefault
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $isDisabled = true;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector\Fixture;
|
||||
|
||||
class SkipString
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $isDisabled;
|
||||
}
|
@ -55,6 +55,7 @@ final class FluentMethodCallSkipper
|
||||
* @var GetterMethodCallAnalyzer
|
||||
*/
|
||||
private $getterMethodCallAnalyzer;
|
||||
|
||||
/**
|
||||
* @var StringMatcher
|
||||
*/
|
||||
|
@ -32,6 +32,7 @@ final class MakeIsserClassMethodNameStartWithIsRector extends AbstractRector
|
||||
* @var MethodNameResolver
|
||||
*/
|
||||
private $methodNameResolver;
|
||||
|
||||
/**
|
||||
* @var MethodCallRenamer
|
||||
*/
|
||||
|
@ -42,6 +42,7 @@ final class EventValueObjectClassFactory
|
||||
* @var NodeFactory
|
||||
*/
|
||||
private $nodeFactory;
|
||||
|
||||
/**
|
||||
* @var NodeNameResolver
|
||||
*/
|
||||
|
@ -35,6 +35,7 @@ final class PhpSpecRenaming
|
||||
* @var NodeNameResolver
|
||||
*/
|
||||
private $nodeNameResolver;
|
||||
|
||||
/**
|
||||
* @var ClassNaming
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@ final class CountableAnalyzer
|
||||
* @var NodeTypeResolver
|
||||
*/
|
||||
private $nodeTypeResolver;
|
||||
|
||||
/**
|
||||
* @var NodeNameResolver
|
||||
*/
|
||||
|
@ -37,6 +37,7 @@ final class CountOnNullRector extends AbstractRector
|
||||
* @var string
|
||||
*/
|
||||
private const ALREADY_CHANGED_ON_COUNT = 'already_changed_on_count';
|
||||
|
||||
/**
|
||||
* @var CountableAnalyzer
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\PhpDeglobalize\Rector\ClassMethod;
|
||||
namespace Rector\Privatization\Rector\ClassMethod;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\PropertyFetch;
|
||||
@ -19,7 +19,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
* @see https://3v4l.org/DWC4P
|
||||
*
|
||||
* @see https://stackoverflow.com/a/12446305/1348344
|
||||
* @see \Rector\PhpDeglobalize\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector\ChangeGlobalVariablesToPropertiesRectorTest
|
||||
* @see \Rector\Privatization\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector\ChangeGlobalVariablesToPropertiesRectorTest
|
||||
*/
|
||||
final class ChangeGlobalVariablesToPropertiesRector extends AbstractRector
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\SOLID\Rector\Class_;
|
||||
namespace Rector\Privatization\Rector\Class_;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Const_;
|
||||
@ -25,7 +25,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
|
||||
/**
|
||||
* @see \Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\ChangeReadOnlyVariableWithDefaultValueToConstantRectorTest
|
||||
* @see \Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\ChangeReadOnlyVariableWithDefaultValueToConstantRectorTest
|
||||
*/
|
||||
final class ChangeReadOnlyVariableWithDefaultValueToConstantRector extends AbstractRector
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\SOLID\Rector\Class_;
|
||||
namespace Rector\Privatization\Rector\Class_;
|
||||
|
||||
use Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
@ -20,7 +20,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
|
||||
/**
|
||||
* @see \Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\RepeatedLiteralToClassConstantRectorTest
|
||||
* @see \Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\RepeatedLiteralToClassConstantRectorTest
|
||||
*/
|
||||
final class RepeatedLiteralToClassConstantRector extends AbstractRector
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\SOLID\Rector\Property;
|
||||
namespace Rector\Privatization\Rector\Property;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Const_;
|
||||
@ -25,7 +25,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
|
||||
/**
|
||||
* @see \Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\ChangeReadOnlyPropertyWithDefaultValueToConstantRectorTest
|
||||
* @see \Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\ChangeReadOnlyPropertyWithDefaultValueToConstantRectorTest
|
||||
*/
|
||||
final class ChangeReadOnlyPropertyWithDefaultValueToConstantRector extends AbstractRector
|
||||
{
|
@ -2,10 +2,10 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\PhpDeglobalize\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector;
|
||||
namespace Rector\Privatization\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\PhpDeglobalize\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector;
|
||||
use Rector\Privatization\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\PhpDeglobalize\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
||||
@ -21,7 +21,7 @@ class Fixture
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\PhpDeglobalize\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\PhpDeglobalize\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector\Fixture;
|
||||
|
||||
class GlobalAfter
|
||||
{
|
||||
@ -23,7 +23,7 @@ class GlobalAfter
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\PhpDeglobalize\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector\Fixture;
|
||||
|
||||
class GlobalAfter
|
||||
{
|
@ -2,10 +2,10 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\SOLID\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector;
|
||||
use Rector\Privatization\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use Nette\Utils\Strings;
|
||||
|
||||
@ -42,7 +42,7 @@ class AddMissingConst
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use Nette\Utils\Strings;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
||||
@ -20,7 +20,7 @@ class Fixture
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class MultipleUsage
|
||||
{
|
||||
@ -23,7 +23,7 @@ class MultipleUsage
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class MultipleUsage
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use Nette\Utils\Strings;
|
||||
|
||||
@ -29,7 +29,7 @@ class ReplaceInArgs
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use Nette\Utils\Strings;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class Scalar
|
||||
{
|
||||
@ -17,7 +17,7 @@ class Scalar
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class Scalar
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipArrayAssign
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
final class SkipArrayPush
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use Rector\Renaming\Rector\Name\RenameClassRector;
|
||||
use Symfony\Component\Yaml\Yaml;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use Rector\BetterPhpDocParser\Contract\PhpDocNode\TagAwareNodeInterface;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipByRefParam
|
||||
{
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipDoubleAssign
|
||||
{
|
||||
protected function run()
|
||||
{
|
||||
$a = $b = $c = $d = '';
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipDoubleMethodSameVariable
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipEnscapedString
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use Nette\Utils\Strings;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipOverriden
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipReferenceDirect
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipReferenced
|
||||
{
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Source\ReferenceInConstructor;
|
||||
|
||||
class SkipReferencedInConstructor
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$value = 'name';
|
||||
$servicesConfigurator = new ReferenceInConstructor($value);
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipShifted
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipSortReference
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
trait SkipTrait
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipUnpackArray
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipUnpackList
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipUsedAsParameter
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipVariableAssign
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Source;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Source;
|
||||
|
||||
final class ReferenceInConstructor
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class BeginningWithNumber
|
||||
{
|
||||
@ -18,7 +18,7 @@ class BeginningWithNumber
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class BeginningWithNumber
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class CamelCase
|
||||
{
|
||||
@ -18,7 +18,7 @@ class CamelCase
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class CamelCase
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class DashToUnderscore
|
||||
{
|
||||
@ -18,7 +18,7 @@ class DashToUnderscore
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class DashToUnderscore
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
||||
@ -18,7 +18,7 @@ class Fixture
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class SkipKeywords
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class SkipPartOfAnotherConstant
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class SkipRegexPatterns
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
use Nette\Utils\Strings;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class SkipTrueFalseNullStrings
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class WithDashAndNumber
|
||||
{
|
||||
@ -27,7 +27,7 @@ class WithDashAndNumber
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class WithDashAndNumber
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
final class WithNonLocalConstant
|
||||
{
|
||||
@ -24,7 +24,7 @@ final class WithNonLocalConstant
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
final class WithNonLocalConstant
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class WithSlash
|
||||
{
|
||||
@ -18,7 +18,7 @@ class WithSlash
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector\Fixture;
|
||||
|
||||
class WithSlash
|
||||
{
|
@ -2,10 +2,10 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector;
|
||||
namespace Rector\Privatization\Tests\Rector\Class_\RepeatedLiteralToClassConstantRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\SOLID\Rector\Class_\RepeatedLiteralToClassConstantRector;
|
||||
use Rector\Privatization\Rector\Class_\RepeatedLiteralToClassConstantRector;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector;
|
||||
namespace Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\SOLID\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector;
|
||||
use Rector\Privatization\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
||||
@ -24,7 +24,7 @@ class Fixture
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
final class SkipEndFunction
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipMultipleProperties
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipOverriden
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
trait SkipTrait
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class StaticProperty
|
||||
{
|
||||
@ -24,7 +24,7 @@ class StaticProperty
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
namespace Rector\Privatization\Tests\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class StaticProperty
|
||||
{
|
@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
class SkipDoubleAssign
|
||||
{
|
||||
protected function run()
|
||||
{
|
||||
$a = $b = $c = $d = '';
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Fixture;
|
||||
|
||||
use Rector\SOLID\Tests\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector\Source\ReferenceInConstructor;
|
||||
|
||||
class SkipReferencedInConstructor
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$value = 'name';
|
||||
$servicesConfigurator = new ReferenceInConstructor($value);
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $isDisabled;
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector\Fixture;
|
||||
|
||||
class Fixture
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $isDisabled = false;
|
||||
}
|
||||
|
||||
?>
|
@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector\Fixture;
|
||||
|
||||
class SkipDefault
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $isDisabled = true;
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\SOLID\Tests\Rector\Property\AddFalseDefaultToBoolPropertyRector\Fixture;
|
||||
|
||||
class SkipString
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $isDisabled;
|
||||
}
|
@ -33,6 +33,7 @@ final class GetterPropertyTypeInferer extends AbstractTypeInferer implements Pro
|
||||
* @var FunctionLikeReturnTypeResolver
|
||||
*/
|
||||
private $functionLikeReturnTypeResolver;
|
||||
|
||||
/**
|
||||
* @var ClassMethodAndPropertyAnalyzer
|
||||
*/
|
||||
|
@ -21,6 +21,7 @@ final class GetterTypeDeclarationPropertyTypeInferer extends AbstractTypeInferer
|
||||
* @var FunctionLikeReturnTypeResolver
|
||||
*/
|
||||
private $functionLikeReturnTypeResolver;
|
||||
|
||||
/**
|
||||
* @var ClassMethodAndPropertyAnalyzer
|
||||
*/
|
||||
|
@ -4,10 +4,9 @@ sonar.projectKey=rectorphp_rector
|
||||
|
||||
# relative paths to source
|
||||
# wildcards don't work :(
|
||||
sonar.sources=src,rules/autodiscovery/src,rules/architecture/src,packages/attribute-aware-php-doc/src,packages/better-php-doc-parser/src,rules/cakephp/src,rules/code-quality/src,rules/coding-style/src,packages/console-differ/src,rules/dead-code/src,rules/doctrine/src,rules/doctrine-code-quality/src,packages/file-system-rector/src,rules/laravel/src,rules/legacy/src,rules/mysql-to-mysqli/src,rules/nette-tester-to-phpunit/src,rules/nette-to-symfony/src,rules/nette/src,packages/node-collector/src,packages/node-type-resolver/src,packages/node-name-resolver/src,packages/phpstan-static-type-mapper/src,rules/phpunit-symfony/src,rules/phpunit/src,rules/psr4/src,rules/php-spec-to-phpunit/src,rules/php52/src,rules/php53/src,rules/php54/src,rules/php55/src,rules/php56/src,rules/php70/src,rules/php71/src,rules/php72/src,rules/php73/src,rules/php74/src,rules/php80/src,rules/removing-static/src,rules/renaming/src,rules/restoration/src,rules/solid/src,rules/sensio/src,packages/static-type-mapper/src,rules/symfony-code-quality/src,rules/symfony-phpunit/src,rules/symfony/src,rules/twig/src,rules/type-declaration/src,packages/vendor-locker/src,packages/rector-generator/src,rules/strict-code-quality/src,rules/php-deglobalize/src,rules/phalcon/src,rules/doctrine-gedmo-to-knplabs/src,rules/polyfill/src,rules/generic/src
|
||||
sonar.sources=src,rules/autodiscovery/src,rules/architecture/src,packages/attribute-aware-php-doc/src,packages/better-php-doc-parser/src,rules/cakephp/src,rules/code-quality/src,rules/coding-style/src,packages/console-differ/src,rules/dead-code/src,rules/doctrine/src,rules/doctrine-code-quality/src,packages/file-system-rector/src,rules/laravel/src,rules/legacy/src,rules/mysql-to-mysqli/src,rules/nette-tester-to-phpunit/src,rules/nette-to-symfony/src,rules/nette/src,packages/node-collector/src,packages/node-type-resolver/src,packages/node-name-resolver/src,packages/phpstan-static-type-mapper/src,rules/phpunit-symfony/src,rules/phpunit/src,rules/psr4/src,rules/php-spec-to-phpunit/src,rules/php52/src,rules/php53/src,rules/php54/src,rules/php55/src,rules/php56/src,rules/php70/src,rules/php71/src,rules/php72/src,rules/php73/src,rules/php74/src,rules/php80/src,rules/removing-static/src,rules/renaming/src,rules/restoration/src,rules/solid/src,rules/sensio/src,packages/static-type-mapper/src,rules/symfony-code-quality/src,rules/symfony-phpunit/src,rules/symfony/src,rules/twig/src,rules/type-declaration/src,packages/vendor-locker/src,packages/rector-generator/src,rules/strict-code-quality/src,rules/php-deglobalize/src,rules/phalcon/src,rules/doctrine-gedmo-to-knplabs/src,rules/polyfill/src,rules/generic/src
|
||||
sonar.sources=src,rules/autodiscovery/src,rules/architecture/src,packages/attribute-aware-php-doc/src,packages/better-php-doc-parser/src,rules/cakephp/src,rules/code-quality/src,rules/coding-style/src,packages/console-differ/src,rules/dead-code/src,rules/doctrine/src,rules/doctrine-code-quality/src,packages/file-system-rector/src,rules/laravel/src,rules/legacy/src,rules/mysql-to-mysqli/src,rules/nette-tester-to-phpunit/src,rules/nette-to-symfony/src,rules/nette/src,packages/node-collector/src,packages/node-type-resolver/src,packages/node-name-resolver/src,packages/phpstan-static-type-mapper/src,rules/phpunit-symfony/src,rules/phpunit/src,rules/psr4/src,rules/php-spec-to-phpunit/src,rules/php52/src,rules/php53/src,rules/php54/src,rules/php55/src,rules/php56/src,rules/php70/src,rules/php71/src,rules/php72/src,rules/php73/src,rules/php74/src,rules/php80/src,rules/removing-static/src,rules/renaming/src,rules/restoration/src,rules/solid/src,rules/sensio/src,packages/static-type-mapper/src,rules/symfony-code-quality/src,rules/symfony-phpunit/src,rules/symfony/src,rules/twig/src,rules/type-declaration/src,packages/vendor-locker/src,packages/rector-generator/src,rules/strict-code-quality/src,rules/phalcon/src,rules/doctrine-gedmo-to-knplabs/src,rules/polyfill/src,rules/generic/src
|
||||
|
||||
sonar.tests=tests,rules/autodiscovery/tests,rules/architecture/tests,packages/better-php-doc-parser/tests,rules/cakephp/tests,rules/code-quality/tests,rules/coding-style/tests,rules/dead-code/tests,rules/doctrine/tests,rules/doctrine-code-quality/tests,rules/laravel/tests,rules/legacy/tests,rules/mysql-to-mysqli/tests,rules/nette-tester-to-phpunit/tests,rules/nette-to-symfony/tests,rules/nette/tests,packages/node-type-resolver/tests,utils/phpstan-extensions/src,rules/phpunit-symfony/tests,rules/phpunit/tests,rules/psr4/tests,rules/php-spec-to-phpunit/tests,rules/php52/tests,rules/php53/tests,rules/php54/tests,rules/php55/tests,rules/php56/tests,rules/php70/tests,rules/php71/tests,rules/php72/tests,rules/php73/tests,rules/php74/tests,rules/php80/tests,rules/removing-static/tests,rules/renaming/tests,rules/restoration/tests,rules/solid/tests,rules/sensio/tests,rules/symfony-code-quality/tests,rules/symfony-phpunit/tests,rules/symfony/tests,rules/twig/tests,rules/type-declaration/tests,rules/strict-code-quality/tests,rules/php-deglobalize/tests,rules/phalcon/tests,utils/node-documentation-generator/src,utils/phpstan-attribute-type-syncer/src,utils/phpstan-type-mapper-checker/src,rules/doctrine-gedmo-to-knplabs/tests,rules/polyfill/tests,rules/generic/tests
|
||||
sonar.tests=tests,rules/autodiscovery/tests,rules/architecture/tests,packages/better-php-doc-parser/tests,rules/cakephp/tests,rules/code-quality/tests,rules/coding-style/tests,rules/dead-code/tests,rules/doctrine/tests,rules/doctrine-code-quality/tests,rules/laravel/tests,rules/legacy/tests,rules/mysql-to-mysqli/tests,rules/nette-tester-to-phpunit/tests,rules/nette-to-symfony/tests,rules/nette/tests,packages/node-type-resolver/tests,utils/phpstan-extensions/src,rules/phpunit-symfony/tests,rules/phpunit/tests,rules/psr4/tests,rules/php-spec-to-phpunit/tests,rules/php52/tests,rules/php53/tests,rules/php54/tests,rules/php55/tests,rules/php56/tests,rules/php70/tests,rules/php71/tests,rules/php72/tests,rules/php73/tests,rules/php74/tests,rules/php80/tests,rules/removing-static/tests,rules/renaming/tests,rules/restoration/tests,rules/solid/tests,rules/sensio/tests,rules/symfony-code-quality/tests,rules/symfony-phpunit/tests,rules/symfony/tests,rules/twig/tests,rules/type-declaration/tests,rules/strict-code-quality/tests,rules/phalcon/tests,utils/node-documentation-generator/src,utils/phpstan-attribute-type-syncer/src,utils/phpstan-type-mapper-checker/src,rules/doctrine-gedmo-to-knplabs/tests,rules/polyfill/tests,rules/generic/tests
|
||||
|
||||
# possibly manual operation needed :/
|
||||
# https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/
|
||||
|
@ -93,14 +93,17 @@ final class ValidateFixtureClassnameCommand extends Command
|
||||
* @var SmartFileSystem
|
||||
*/
|
||||
private $smartFileSystem;
|
||||
|
||||
/**
|
||||
* @var FixtureFinder
|
||||
*/
|
||||
private $fixtureFinder;
|
||||
|
||||
/**
|
||||
* @var NamespaceMatcher
|
||||
*/
|
||||
private $namespaceMather;
|
||||
|
||||
/**
|
||||
* @var ExpectedNameResolver
|
||||
*/
|
||||
|
@ -44,10 +44,12 @@ final class ValidateFixtureNamespaceCommand extends Command
|
||||
* @var SmartFileSystem
|
||||
*/
|
||||
private $smartFileSystem;
|
||||
|
||||
/**
|
||||
* @var FixtureFinder
|
||||
*/
|
||||
private $fixtureFinder;
|
||||
|
||||
/**
|
||||
* @var NamespaceMatcher
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user