Skip to content

Commit

Permalink
Merge pull request #10122 from weirdan/strip_tags-allowed_tags-as-list
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Aug 17, 2023
2 parents 57f6359 + 3244502 commit 28f5b1e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Psalm/Config.php
Expand Up @@ -2258,6 +2258,10 @@ public function visitStubFiles(Codebase $codebase, ?Progress $progress = null):
$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';
Expand Down
11 changes: 11 additions & 0 deletions stubs/Php74.phpstub
@@ -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 {}

0 comments on commit 28f5b1e

Please sign in to comment.