mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 12:24:49 +01:00
Fix namespacing of generated if
This commit is contained in:
parent
0d40fdaaa0
commit
b13eaa20d2
@ -13,22 +13,24 @@ $search = '/* @var FullyQualified $originalName */
|
||||
$replace = '/* @var FullyQualified $originalName */
|
||||
$aliasStmt = $this->createAliasStmt($originalName, $stmt);
|
||||
|
||||
$stmts[] = new If_(
|
||||
new FuncCall(
|
||||
new FullyQualified(\'class_exists\'),
|
||||
[
|
||||
new Node\Arg(
|
||||
new Node\Expr\ClassConstFetch(
|
||||
$originalName,
|
||||
\'class\'
|
||||
$stmts[] = new Node\Stmt\If_(
|
||||
new Node\Expr\BooleanNot(
|
||||
new Node\Expr\FuncCall(
|
||||
new FullyQualified(\'class_exists\'),
|
||||
[
|
||||
new Node\Arg(
|
||||
new Node\Expr\ClassConstFetch(
|
||||
$originalName,
|
||||
\'class\'
|
||||
)
|
||||
),
|
||||
new Node\Arg(
|
||||
new Node\Expr\ConstFetch(
|
||||
new Node\Name(\'false\')
|
||||
)
|
||||
)
|
||||
),
|
||||
new Node\Arg(
|
||||
new Node\Expr\ConstFetch(
|
||||
new Node\Name(\'false\')
|
||||
)
|
||||
)
|
||||
]
|
||||
]
|
||||
)
|
||||
),
|
||||
[\'stmts\' => [$aliasStmt]]
|
||||
);';
|
||||
|
Loading…
Reference in New Issue
Block a user