1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Fix namespacing of generated if

This commit is contained in:
Matthew Brown 2019-06-08 20:27:49 -04:00
parent 0d40fdaaa0
commit b13eaa20d2

View File

@ -13,8 +13,9 @@ $search = '/* @var FullyQualified $originalName */
$replace = '/* @var FullyQualified $originalName */ $replace = '/* @var FullyQualified $originalName */
$aliasStmt = $this->createAliasStmt($originalName, $stmt); $aliasStmt = $this->createAliasStmt($originalName, $stmt);
$stmts[] = new If_( $stmts[] = new Node\Stmt\If_(
new FuncCall( new Node\Expr\BooleanNot(
new Node\Expr\FuncCall(
new FullyQualified(\'class_exists\'), new FullyQualified(\'class_exists\'),
[ [
new Node\Arg( new Node\Arg(
@ -29,6 +30,7 @@ $replace = '/* @var FullyQualified $originalName */
) )
) )
] ]
)
), ),
[\'stmts\' => [$aliasStmt]] [\'stmts\' => [$aliasStmt]]
);'; );';