mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-30 03:47:53 +01:00
fix cs
This commit is contained in:
parent
fa2afaabcf
commit
f43c669da8
15
example/Project/OldPresenter.php
Normal file
15
example/Project/OldPresenter.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use Nette\Application\UI\Presenter;
|
||||
|
||||
class OldPresenter extends Presenter
|
||||
{
|
||||
/**
|
||||
* @var stdClass
|
||||
*/
|
||||
private $injectMe;
|
||||
public function __construct(stdClass $injectMe)
|
||||
{
|
||||
$this->injectMe = $injectMe;
|
||||
}
|
||||
}
|
@ -5,6 +5,8 @@ namespace Rector\NodeAnalyzer;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Expr\StaticCall;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Name;
|
||||
use Rector\Node\Attribute;
|
||||
|
||||
final class MethodCallAnalyzer
|
||||
@ -62,9 +64,9 @@ final class MethodCallAnalyzer
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($node->class instanceof Node\Name) {
|
||||
if ($node->class instanceof Name) {
|
||||
$currentType = $node->class->toString();
|
||||
} elseif ($node->class instanceof Node\Expr\Variable) {
|
||||
} elseif ($node->class instanceof Variable) {
|
||||
$currentType = $node->class->getAttribute(Attribute::CLASS_NAME);
|
||||
}
|
||||
|
||||
|
@ -2,23 +2,12 @@
|
||||
|
||||
namespace Rector\NodeAnalyzer;
|
||||
|
||||
use PhpParser\Node\Expr\ArrayDimFetch;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
|
||||
final class SymfonyContainerCallsAnalyzer
|
||||
{
|
||||
/**
|
||||
* @var MethodCallAnalyzer
|
||||
*/
|
||||
private $methodCallAnalyzer;
|
||||
|
||||
public function __construct(MethodCallAnalyzer $methodCallAnalyzer)
|
||||
{
|
||||
$this->methodCallAnalyzer = $methodCallAnalyzer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds $this->get(...);
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user