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

Add scoper for incorrectly-namespaced constant

This commit is contained in:
Matthew Brown 2018-03-18 08:22:57 -04:00
parent 28522c4f94
commit fd2cd024bb

View File

@ -92,6 +92,17 @@ return [
);
}
return $contents;
},
function ($filePath, $prefix, $contents) {
if ($filePath === realpath(__DIR__ . '/src/psalm.php')) {
return str_replace(
'\\' . $prefix . '\\PSALM_VERSION',
'PSALM_VERSION',
$contents
);
}
return $contents;
},
],