Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions generated/8.1/pcre.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array
*
*
* The above example will output:
* @return int|null Returns the number of full pattern matches (which might be zero).
* @return int Returns the number of full pattern matches (which might be zero).
* @throws PcreException
*
*/
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): ?int
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
{
error_clear_last();
$safeResult = \preg_match_all($pattern, $subject, $matches, $flags, $offset);
Expand Down
4 changes: 2 additions & 2 deletions generated/8.2/pcre.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array
*
*
* The above example will output:
* @return int|null Returns the number of full pattern matches (which might be zero).
* @return int Returns the number of full pattern matches (which might be zero).
* @throws PcreException
*
*/
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): ?int
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
{
error_clear_last();
$safeResult = \preg_match_all($pattern, $subject, $matches, $flags, $offset);
Expand Down
4 changes: 2 additions & 2 deletions generated/8.3/pcre.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array
*
*
* The above example will output:
* @return int|null Returns the number of full pattern matches (which might be zero).
* @return int Returns the number of full pattern matches (which might be zero).
* @throws PcreException
*
*/
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): ?int
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
{
error_clear_last();
$safeResult = \preg_match_all($pattern, $subject, $matches, $flags, $offset);
Expand Down
4 changes: 2 additions & 2 deletions generated/8.4/pcre.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array
*
*
* The above example will output:
* @return int|null Returns the number of full pattern matches (which might be zero).
* @return int Returns the number of full pattern matches (which might be zero).
* @throws PcreException
*
*/
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): ?int
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
{
error_clear_last();
$safeResult = \preg_match_all($pattern, $subject, $matches, $flags, $offset);
Expand Down
4 changes: 2 additions & 2 deletions generated/8.5/pcre.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array
*
*
* The above example will output:
* @return int|null Returns the number of full pattern matches (which might be zero).
* @return int Returns the number of full pattern matches (which might be zero).
* @throws PcreException
*
*/
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): ?int
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
{
error_clear_last();
$safeResult = \preg_match_all($pattern, $subject, $matches, $flags, $offset);
Expand Down
1 change: 1 addition & 0 deletions generator/config/CustomPhpStanFunctionMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'fgetcsv' => ['array|false|null', 'fp'=>'resource', 'length='=>'0|positive-int', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'], //phpstan default return type is too hard to analyse
//todo: edit the reader to turn 0|1 into int
'preg_match' => ['int|false', 'pattern'=>'string', 'subject'=>'string', '&w_subpatterns='=>'string[]', 'flags='=>'int', 'offset='=>'int'], //int|false instead of 0|1|false
'preg_match_all' => ['0|positive-int|false', 'pattern'=>'string', 'subject'=>'string', '&w_subpatterns='=>'array', 'flags='=>'int', 'offset='=>'int'], // can't actually return null
'stream_filter_prepend' => ['resource', 'stream' => 'resource', 'filtername' => 'string', 'read_write' => 'int', 'params' => 'mixed'], // params mixed instead of array
'stream_filter_append' => ['resource', 'stream' => 'resource', 'filtername' => 'string', 'read_write' => 'int', 'params' => 'mixed'], // params mixed instead of array
];