mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 13:51:54 +01:00
Hard code possible bit-shift values
This commit is contained in:
parent
4583467325
commit
f7474faff2
@ -642,7 +642,29 @@ function preg_replace_callback($search, $replace, $subject, int $limit = -1, &$c
|
|||||||
* @param string $subject
|
* @param string $subject
|
||||||
* @param mixed $matches
|
* @param mixed $matches
|
||||||
* @param TFlags $flags
|
* @param TFlags $flags
|
||||||
* @param-out (TFlags is 256 ? list<list<array{string, int}>> : list<list<string>>) $matches
|
* @param-out (
|
||||||
|
* TFlags is 1
|
||||||
|
? array<list<string>>
|
||||||
|
: (TFlags is 2
|
||||||
|
? list<array<string>>
|
||||||
|
: (TFlags is 256|257
|
||||||
|
? array<list<array{string, int}>>
|
||||||
|
: (TFlags is 258
|
||||||
|
? list<array<array{string, int}>>
|
||||||
|
: (TFlags is 512|513
|
||||||
|
? array<list<?string>>
|
||||||
|
: (TFlags is 514
|
||||||
|
? list<array<?string>>
|
||||||
|
: (TFlags is 770
|
||||||
|
? list<array<array{?string, 1}>>
|
||||||
|
: array
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
* ) $matches
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function preg_match_all($pattern, $replace, &$matches, int $flags = 1) {}
|
function preg_match_all($pattern, $replace, &$matches, int $flags = 1) {}
|
||||||
|
@ -1327,7 +1327,7 @@ class FunctionCallTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @psalm-pure
|
* @psalm-pure
|
||||||
*
|
*
|
||||||
* @return list<list<string>>
|
* @return array<list<string>>
|
||||||
*/
|
*/
|
||||||
function extractUsernames(string $input): array {
|
function extractUsernames(string $input): array {
|
||||||
preg_match_all(\'/@[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}(?!\w)/\', $input, $matches);
|
preg_match_all(\'/@[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}(?!\w)/\', $input, $matches);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user