File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 5
5
namespace DrupalRector \Rector \BestPractice ;
6
6
7
7
use PhpParser \Node ;
8
- use Rector \Rector \AbstractRector ;
9
- use Symplify \RuleDocGenerator \ValueObject \RuleDefinition ;
10
- use Symplify \RuleDocGenerator \ValueObject \CodeSample \ConfiguredCodeSample ;
11
8
use PhpParser \Node \Expr \FuncCall ;
12
- use Rector \NodeTypeResolver \Node \AttributeKey ;
13
9
use PhpParser \Node \Stmt \Class_ ;
10
+ use Rector \NodeTypeResolver \Node \AttributeKey ;
11
+ use Rector \Rector \AbstractRector ;
12
+ use Symplify \RuleDocGenerator \ValueObject \CodeSample \ConfiguredCodeSample ;
13
+ use Symplify \RuleDocGenerator \ValueObject \RuleDefinition ;
14
14
15
15
/**
16
16
* Replaces t() with $this->t().
17
17
*/
18
18
final class UseThisTInsteadOfTRector extends AbstractRector
19
19
{
20
-
21
20
public function getRuleDefinition (): RuleDefinition
22
21
{
23
22
return new RuleDefinition (
@@ -50,7 +49,7 @@ public function refactor(Node $node): ?Node
50
49
}
51
50
52
51
// not to refactor here
53
- $ isVirtual = (bool )$ node ->name ->getAttribute (
52
+ $ isVirtual = (bool ) $ node ->name ->getAttribute (
54
53
AttributeKey::VIRTUAL_NODE
55
54
);
56
55
if ($ isVirtual ) {
@@ -75,6 +74,7 @@ public function refactor(Node $node): ?Node
75
74
$ node ->args
76
75
);
77
76
}
77
+
78
78
return null ;
79
79
}
80
80
}
You can’t perform that action at this time.
0 commit comments