mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-06 03:10:50 +00:00
namespace typos fix
This commit is contained in:
parent
deaaa019ad
commit
82e8858158
8
src/NodeTraverser/PriorityAwareNodeTraverser.php
Normal file
8
src/NodeTraverser/PriorityAwareNodeTraverser.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\NodeTraverser;
|
||||
|
||||
final class PriorityAwareNodeTraverser
|
||||
{
|
||||
// ...
|
||||
}
|
|
@ -1,21 +1,17 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\NodeVisitor\DependencyInjection\NamedServicesToConstrutor;
|
||||
namespace Rector\NodeVisitor\DependencyInjection\NamedServicesToConstructor;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\Assign;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Expr\PropertyFetch;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\NodeVisitorAbstract;
|
||||
use Rector\Builder\Kernel\ServiceFromKernelResolver;
|
||||
use Rector\Builder\Naming\NameResolver;
|
||||
use Rector\Tests\NodeVisitor\DependencyInjection\NamedServicesToConstructorReconstructor\Source\LocalKernel;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
/**
|
||||
* Converts all:
|
||||
|
@ -134,15 +130,21 @@ final class GetterToPropertyNodeVisitor extends NodeVisitorAbstract
|
|||
$serviceName, LocalKernel::class
|
||||
);
|
||||
|
||||
// Get property name
|
||||
$propertyName = $this->nameResolver->resolvePropertyNameFromType($serviceType);
|
||||
|
||||
// creates "$this->propertyName"
|
||||
return $this->createPropertyFetch($propertyName);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates "$this->propertyName"
|
||||
*/
|
||||
private function createPropertyFetch(string $propertyName): PropertyFetch
|
||||
{
|
||||
return new PropertyFetch(
|
||||
new Variable('this', [
|
||||
'name' => $propertyName
|
||||
]), $propertyName
|
||||
);
|
||||
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\NodeVisitor\DependencyInjection;
|
||||
namespace Rector\NodeVisitor\DependencyInjection\NamedServicesToConstructor;
|
||||
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\Assign;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Expr\PropertyFetch;
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Rector\Tests\NodeVisitor\DependencyInjection\NamedServicesToConstructorReconstructor;
|
||||
|
||||
use Rector\NodeVisitor\DependencyInjection\NamedServicesToConstructorNodeVisitor;
|
||||
use Rector\NodeVisitor\DependencyInjection\NamedServicesToConstructor\NamedServicesToConstructorNodeVisitor;
|
||||
use Rector\Testing\PHPUnit\AbstractReconstructorTestCase;
|
||||
|
||||
final class Test extends AbstractReconstructorTestCase
|
||||
|
|
Loading…
Reference in New Issue
Block a user