mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
[symfony] add AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector (#4341)
Co-authored-by: rector-bot <tomas@getrector.org>
This commit is contained in:
parent
4103cbce07
commit
3ff3e37ecb
12
config/set/symfony-autowire.php
Normal file
12
config/set/symfony-autowire.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\Symfony\Rector\ClassMethod\AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
||||
$services->set(AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector::class);
|
||||
};
|
@ -123,7 +123,7 @@ final class NodeRepository
|
||||
* To prevent circular reference
|
||||
* @required
|
||||
*/
|
||||
public function autowireParsedNodesByType(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowireNodeRepository(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ final class ParsedClassConstFetchNodeCollector
|
||||
* To prevent circular reference
|
||||
* @required
|
||||
*/
|
||||
public function autowireParsedNodesByType(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowireParsedClassConstFetchNodeCollector(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ final class ParsedPropertyFetchNodeCollector
|
||||
* To prevent circular reference
|
||||
* @required
|
||||
*/
|
||||
public function autowireParsedNodesByType(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowireParsedPropertyFetchNodeCollector(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ final class ClassConstFetchNameResolver implements NodeNameResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireClassNameResolver(NodeNameResolver $nodeNameResolver): void
|
||||
public function autowireClassConstFetchNameResolver(NodeNameResolver $nodeNameResolver): void
|
||||
{
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ final class ClassConstNameResolver implements NodeNameResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireClassNameResolver(NodeNameResolver $nodeNameResolver): void
|
||||
public function autowireClassConstNameResolver(NodeNameResolver $nodeNameResolver): void
|
||||
{
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ final class ParamNameResolver implements NodeNameResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireClassNameResolver(NodeNameResolver $nodeNameResolver): void
|
||||
public function autowireParamNameResolver(NodeNameResolver $nodeNameResolver): void
|
||||
{
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ final class PropertyNameResolver implements NodeNameResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireClassNameResolver(NodeNameResolver $nodeNameResolver): void
|
||||
public function autowirePropertyNameResolver(NodeNameResolver $nodeNameResolver): void
|
||||
{
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ final class UseNameResolver implements NodeNameResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireClassNameResolver(NodeNameResolver $nodeNameResolver): void
|
||||
public function autowireUseNameResolver(NodeNameResolver $nodeNameResolver): void
|
||||
{
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ final class ArrayDimFetchTypeResolver implements NodeTypeResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowirePropertyTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowireArrayDimFetchTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ final class CastTypeResolver implements NodeTypeResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowirePropertyTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowireCastTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ final class ClassConstFetchTypeResolver implements NodeTypeResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowirePropertyTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowireClassConstFetchTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ final class ClassMethodOrClassConstTypeResolver implements NodeTypeResolverInter
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowirePropertyTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowireClassMethodOrClassConstTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ final class ParamTypeResolver implements NodeTypeResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowirePropertyTypeResolver(
|
||||
public function autowireParamTypeResolver(
|
||||
NodeTypeResolver $nodeTypeResolver,
|
||||
StaticTypeMapper $staticTypeMapper
|
||||
): void {
|
||||
|
@ -76,7 +76,7 @@ final class PropertyFetchTypeResolver implements NodeTypeResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowirePropertyTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowirePropertyFetchTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ final class StaticCallTypeResolver implements NodeTypeResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowirePropertyTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowireStaticCallTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ final class VariableTypeResolver implements NodeTypeResolverInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireNodeTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowireVariableTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ final class CallableTypeMapper implements TypeMapperInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireIterableTypeMapper(PHPStanStaticTypeMapper $phpStanStaticTypeMapper): void
|
||||
public function autowireCallableTypeMapper(PHPStanStaticTypeMapper $phpStanStaticTypeMapper): void
|
||||
{
|
||||
$this->phpStanStaticTypeMapper = $phpStanStaticTypeMapper;
|
||||
}
|
||||
|
@ -641,6 +641,11 @@ final class SetList
|
||||
*/
|
||||
public const SYMFONY_PHPUNIT = __DIR__ . '/../../../../config/set/symfony-phpunit.php';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const SYMFONY_AUTOWIRE = __DIR__ . '/../../../../config/set/symfony-autowire.php';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
@ -32,7 +32,7 @@ final class ArrayTypeMapper implements PhpDocTypeMapperInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireGenericPhpDocTypeMapper(PhpDocTypeMapper $phpDocTypeMapper): void
|
||||
public function autowireArrayTypeMapper(PhpDocTypeMapper $phpDocTypeMapper): void
|
||||
{
|
||||
$this->phpDocTypeMapper = $phpDocTypeMapper;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ final class NullableTypeMapper implements PhpDocTypeMapperInterface
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireGenericPhpDocTypeMapper(PhpDocTypeMapper $phpDocTypeMapper): void
|
||||
public function autowireNullableTypeMapper(PhpDocTypeMapper $phpDocTypeMapper): void
|
||||
{
|
||||
$this->phpDocTypeMapper = $phpDocTypeMapper;
|
||||
}
|
||||
|
41
phpstan.neon
41
phpstan.neon
@ -630,47 +630,6 @@ parameters:
|
||||
- src/Testing/PHPUnit/Runnable/RunnableClassFinder.php # 29
|
||||
- utils/node-documentation-generator/src/ValueObject/NodeInfo.php # 29
|
||||
|
||||
-
|
||||
message: '#Method with @required need to be named autowire\+class name#'
|
||||
paths:
|
||||
- packages/node-collector/src/NodeCollector/NodeRepository.php # 126
|
||||
- packages/node-collector/src/NodeCollector/ParsedClassConstFetchNodeCollector.php # 44
|
||||
- packages/node-collector/src/NodeCollector/ParsedPropertyFetchNodeCollector.php # 46
|
||||
- packages/node-name-resolver/src/NodeNameResolver/ClassConstFetchNameResolver.php # 22
|
||||
- packages/node-name-resolver/src/NodeNameResolver/ClassConstNameResolver.php # 22
|
||||
- packages/node-name-resolver/src/NodeNameResolver/ParamNameResolver.php # 22
|
||||
- packages/node-name-resolver/src/NodeNameResolver/PropertyNameResolver.php # 22
|
||||
- packages/node-name-resolver/src/NodeNameResolver/UseNameResolver.php # 22
|
||||
- packages/node-type-resolver/src/NodeTypeResolver/ArrayDimFetchTypeResolver.php # 24
|
||||
- packages/node-type-resolver/src/NodeTypeResolver/CastTypeResolver.php # 23
|
||||
- packages/node-type-resolver/src/NodeTypeResolver/ClassConstFetchTypeResolver.php # 23
|
||||
- packages/node-type-resolver/src/NodeTypeResolver/ClassMethodOrClassConstTypeResolver.php # 27
|
||||
- packages/node-type-resolver/src/NodeTypeResolver/ParamTypeResolver.php # 58
|
||||
- packages/node-type-resolver/src/NodeTypeResolver/PropertyFetchTypeResolver.php # 79
|
||||
- packages/node-type-resolver/src/NodeTypeResolver/StaticCallTypeResolver.php # 37
|
||||
- packages/node-type-resolver/src/NodeTypeResolver/VariableTypeResolver.php # 92
|
||||
- packages/phpstan-static-type-mapper/src/TypeMapper/CallableTypeMapper.php # 28
|
||||
- packages/static-type-mapper/src/PhpDocParser/ArrayTypeMapper.php # 35
|
||||
- packages/static-type-mapper/src/PhpDocParser/NullableTypeMapper.php # 32
|
||||
- rules/naming/src/Guard/PropertyConflictingNameGuard/MatchPropertyTypeConflictingNameGuard.php # 14
|
||||
- rules/naming/src/Guard/PropertyConflictingNameGuard/UnderscoreCamelCaseConflictingNameGuard.php # 14
|
||||
- rules/symfony/src/Rector/MethodCall/AbstractToConstructorInjectionRector.php # 37
|
||||
- rules/type-declaration/src/TypeInferer/ParamTypeInferer/PHPUnitDataProviderParamTypeInferer.php # 51
|
||||
- src/Console/Command/AbstractCommand.php # 26
|
||||
- src/Rector/AbstractRector.php # 125
|
||||
- src/Rector/AbstractRector/BetterStandardPrinterTrait.php # 37
|
||||
- src/Rector/AbstractRector/BetterStandardPrinterTrait.php # 37
|
||||
- src/Rector/AbstractRector/CallableNodeTraverserTrait.php # 24
|
||||
- src/Rector/AbstractRector/CallableNodeTraverserTrait.php # 24
|
||||
- src/Rector/AbstractRector/ComplexRemovalTrait.php # 59
|
||||
- src/Rector/AbstractRector/ComplexRemovalTrait.php # 59
|
||||
- src/Rector/AbstractRector/ConstFetchAnalyzerTrait.php # 24
|
||||
- src/Rector/AbstractRector/ConstFetchAnalyzerTrait.php # 24
|
||||
- src/Rector/AbstractRector/NodeTypeResolverTrait.php # 59
|
||||
- src/Rector/AbstractRector/NodeTypeResolverTrait.php # 59
|
||||
- src/Rector/AbstractRector/VisibilityTrait.php # 29
|
||||
- src/Rector/AbstractRector/VisibilityTrait.php # 29
|
||||
|
||||
-
|
||||
message: '#Do not use setter on a service#'
|
||||
paths:
|
||||
|
@ -24,6 +24,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
SetList::DEFLUENT,
|
||||
SetList::TYPE_DECLARATION,
|
||||
SetList::PHPUNIT_CODE_QUALITY,
|
||||
Setlist::SYMFONY_AUTOWIRE,
|
||||
]);
|
||||
|
||||
$parameters->set(Option::PATHS, [
|
||||
|
@ -11,7 +11,7 @@ final class MatchPropertyTypeConflictingNameGuard extends AbstractPropertyConfli
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireMatchPropertyTypePropertyConflictingNameGuard(
|
||||
public function autowireMatchPropertyTypeConflictingNameGuard(
|
||||
MatchPropertyTypeExpectedNameResolver $matchPropertyTypeExpectedNameResolver
|
||||
): void {
|
||||
$this->expectedNameResolver = $matchPropertyTypeExpectedNameResolver;
|
||||
|
@ -11,7 +11,7 @@ final class UnderscoreCamelCaseConflictingNameGuard extends AbstractPropertyConf
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireUnderscoreCamelCasePropertyConflictingNameGuard(
|
||||
public function autowireUnderscoreCamelCaseConflictingNameGuard(
|
||||
UnderscoreCamelCaseExpectedNameResolver $underscoreCamelCaseExpectedNameResolver
|
||||
): void {
|
||||
$this->expectedNameResolver = $underscoreCamelCaseExpectedNameResolver;
|
||||
|
@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\Symfony\Rector\ClassMethod;
|
||||
|
||||
use Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\RectorDefinition\CodeSample;
|
||||
use Rector\Core\RectorDefinition\RectorDefinition;
|
||||
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\ClassMethod\AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector\AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRectorTest
|
||||
*/
|
||||
final class AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector extends AbstractRector
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
* @see https://regex101.com/r/gn2P0C/1
|
||||
*/
|
||||
private const REQUIRED_DOCBLOCK_REGEX = '#\*\s+@required\n?#';
|
||||
|
||||
public function getDefinition(): RectorDefinition
|
||||
{
|
||||
return new RectorDefinition('Use autowire + class name suffix for method with @required annotation', [
|
||||
new CodeSample(
|
||||
<<<'CODE_SAMPLE'
|
||||
class SomeClass
|
||||
{
|
||||
/** @required */
|
||||
public function foo()
|
||||
{
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
,
|
||||
<<<'CODE_SAMPLE'
|
||||
class SomeClass
|
||||
{
|
||||
/** @required */
|
||||
public function autowireSomeClass()
|
||||
{
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getNodeTypes(): array
|
||||
{
|
||||
return [ClassMethod::class];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ClassMethod $node
|
||||
*/
|
||||
public function refactor(Node $node): ?Node
|
||||
{
|
||||
$docComment = $node->getDocComment();
|
||||
if ($docComment === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (! Strings::match($docComment->getText(), self::REQUIRED_DOCBLOCK_REGEX)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$class = $node->getAttribute('parent');
|
||||
/** @var Identifier $name */
|
||||
$name = $class->name;
|
||||
$className = $name->toString();
|
||||
$expectedMethodName = 'autowire' . $className;
|
||||
|
||||
if ((string) $node->name === $expectedMethodName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @var Identifier $method */
|
||||
$method = $node->name;
|
||||
$method->name = $expectedMethodName;
|
||||
|
||||
return $node;
|
||||
}
|
||||
}
|
@ -34,7 +34,7 @@ abstract class AbstractToConstructorInjectionRector extends AbstractRector
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireAbstractToConstructorInjectionRectorDependencies(
|
||||
public function autowireAbstractToConstructorInjectionRector(
|
||||
PropertyNaming $propertyNaming,
|
||||
ServiceMapProvider $applicationServiceMapProvider
|
||||
): void {
|
||||
|
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Rector\Symfony\Rector\ClassMethod\AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
|
||||
final class AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider provideData()
|
||||
*/
|
||||
public function test(SmartFileInfo $fileInfo): void
|
||||
{
|
||||
$this->doTestFileInfo($fileInfo);
|
||||
}
|
||||
|
||||
public function provideData(): Iterator
|
||||
{
|
||||
return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture');
|
||||
}
|
||||
|
||||
protected function getRectorClass(): string
|
||||
{
|
||||
return AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector::class;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector\Fixture;
|
||||
|
||||
final class SomeClass
|
||||
{
|
||||
/** @required */
|
||||
public function foo()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector\Fixture;
|
||||
|
||||
final class SomeClass
|
||||
{
|
||||
/** @required */
|
||||
public function autowireSomeClass()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector\Fixture;
|
||||
|
||||
final class SomeClass2
|
||||
{
|
||||
/** @required */
|
||||
public function autowireSomeClass2()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -48,7 +48,7 @@ final class PHPUnitDataProviderParamTypeInferer implements ParamTypeInfererInter
|
||||
* Prevents circular reference
|
||||
* @required
|
||||
*/
|
||||
public function autowirePHPUnitDataProviderParamTypeResolver(NodeTypeResolver $nodeTypeResolver): void
|
||||
public function autowirePHPUnitDataProviderParamTypeInferer(NodeTypeResolver $nodeTypeResolver): void
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ abstract class AbstractCommand extends Command
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireDescriptor(TextDescriptor $textDescriptor): void
|
||||
public function autowireAbstractCommand(TextDescriptor $textDescriptor): void
|
||||
{
|
||||
$this->textDescriptor = $textDescriptor;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ abstract class AbstractRector extends NodeVisitorAbstract implements PhpRectorIn
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireAbstractRectorDependencies(
|
||||
public function autowireAbstractRector(
|
||||
SymfonyStyle $symfonyStyle,
|
||||
PhpVersionProvider $phpVersionProvider,
|
||||
BuilderFactory $builderFactory,
|
||||
|
@ -34,7 +34,7 @@ trait BetterStandardPrinterTrait
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireBetterStandardPrinter(
|
||||
public function autowireBetterStandardPrinterTrait(
|
||||
BetterStandardPrinter $betterStandardPrinter,
|
||||
BetterNodeFinder $betterNodeFinder,
|
||||
SmartFileSystem $smartFileSystem
|
||||
|
@ -21,7 +21,7 @@ trait CallableNodeTraverserTrait
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function setCallableNodeTraverser(CallableNodeTraverser $callableNodeTraverser): void
|
||||
public function autowireCallableNodeTraverserTrait(CallableNodeTraverser $callableNodeTraverser): void
|
||||
{
|
||||
$this->callableNodeTraverser = $callableNodeTraverser;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ trait ComplexRemovalTrait
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireComplextRemovalTrait(
|
||||
public function autowireComplexRemovalTrait(
|
||||
PropertyManipulator $propertyManipulator,
|
||||
ParsedNodeCollector $parsedNodeCollector,
|
||||
LivingCodeManipulator $livingCodeManipulator,
|
||||
|
@ -21,7 +21,7 @@ trait ConstFetchAnalyzerTrait
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function setConstFetchAnalyzer(ConstFetchManipulator $constFetchManipulator): void
|
||||
public function autowireConstFetchAnalyzerTrait(ConstFetchManipulator $constFetchManipulator): void
|
||||
{
|
||||
$this->constFetchManipulator = $constFetchManipulator;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ trait NodeTypeResolverTrait
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireTypeAnalyzerDependencies(
|
||||
public function autowireNodeTypeResolverTrait(
|
||||
NodeTypeResolver $nodeTypeResolver,
|
||||
ArrayTypeAnalyzer $arrayTypeAnalyzer,
|
||||
CountableTypeAnalyzer $countableTypeAnalyzer,
|
||||
|
@ -26,7 +26,7 @@ trait VisibilityTrait
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public function autowireVisbilityTrait(VisibilityManipulator $visibilityManipulator): void
|
||||
public function autowireVisibilityTrait(VisibilityManipulator $visibilityManipulator): void
|
||||
{
|
||||
$this->visibilityManipulator = $visibilityManipulator;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user