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

Merge pull request #10122 from weirdan/strip_tags-allowed_tags-as-list

This commit is contained in:
Bruce Weirdan 2023-08-17 21:48:31 +02:00 committed by GitHub
commit 28f5b1eb54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -2258,6 +2258,10 @@ class Config
$stubsDir . 'SPL.phpstub',
];
if ($codebase->analysis_php_version_id >= 7_04_00) {
$this->internal_stubs[] = $stubsDir . 'Php74.phpstub';
}
if ($codebase->analysis_php_version_id >= 8_00_00) {
$this->internal_stubs[] = $stubsDir . 'CoreGenericAttributes.phpstub';
$this->internal_stubs[] = $stubsDir . 'Php80.phpstub';

11
stubs/Php74.phpstub Normal file
View File

@ -0,0 +1,11 @@
<?php
/**
* @psalm-pure
*
* @psalm-taint-escape html
* @psalm-flow ($string) -> return
*
* @param null|string|array<array-key,string> $allowed_tags
*/
function strip_tags(string $string, null|string|array $allowed_tags = null) : string {}