mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Use analysis_php_version_id instead of config->getPhpVersion()
This commit is contained in:
parent
17939eda04
commit
187c214f58
@ -47,8 +47,7 @@ class HtmlFunctionTainter implements AddTaintsInterface, RemoveTaintsInterface
|
||||
$second_arg = $item->getArgs()[1]->value ?? null;
|
||||
|
||||
if ($second_arg === null) {
|
||||
$php_version = $statements_analyzer->getCodebase()->config->getPhpVersion();
|
||||
if ($php_version !== null && version_compare($php_version, '8.1', '>=')) {
|
||||
if ($statements_analyzer->getCodebase()->analysis_php_version_id >= 8_01_00) {
|
||||
return ['html', 'has_quotes'];
|
||||
}
|
||||
return ['html'];
|
||||
@ -100,8 +99,7 @@ class HtmlFunctionTainter implements AddTaintsInterface, RemoveTaintsInterface
|
||||
$second_arg = $item->getArgs()[1]->value ?? null;
|
||||
|
||||
if ($second_arg === null) {
|
||||
$php_version = $statements_analyzer->getCodebase()->config->getPhpVersion();
|
||||
if ($php_version !== null && version_compare($php_version, '8.1', '>=')) {
|
||||
if ($statements_analyzer->getCodebase()->analysis_php_version_id >= 8_01_00) {
|
||||
return ['html', 'has_quotes'];
|
||||
}
|
||||
return ['html'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user