1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

Resolve __DIR__ / __FILE__ when const/variable is used for include CS fix

This commit is contained in:
Tomasz Kusy 2022-02-04 19:43:55 +01:00
parent bcbfbed072
commit b73f2c96d8

View File

@ -87,7 +87,7 @@ class MagicConstAnalyzer
} elseif ($stmt instanceof PhpParser\Node\Scalar\MagicConst\Dir) {
$statements_analyzer->node_data->setType(
$stmt,
Type::getString(dirname($statements_analyzer->getSource()->getFilePath()))
Type::getString(\dirname($statements_analyzer->getSource()->getFilePath()))
);
} elseif ($stmt instanceof PhpParser\Node\Scalar\MagicConst\File) {
$statements_analyzer->node_data->setType(