Skip to content

Commit 1ee599b

Browse files
committed
FEATURE: updpated phpstan to 0.12
1 parent ee08332 commit 1ee599b

34 files changed

+2158
-506
lines changed

generated/apache.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ function apache_lookup_uri(string $filename): object
9393

9494
/**
9595
* Fetches all HTTP request headers from the current request. Works in the
96-
* Apache, FastCGI, CLI, FPM and NSAPI server module
97-
* in Netscape/iPlanet/SunONE webservers.
96+
* Apache, FastCGI, CLI, and FPM webservers.
9897
*
9998
* @return array An associative array of all the HTTP headers in the current request.
10099
* @throws ApacheException
@@ -135,8 +134,7 @@ function apache_reset_timeout(): void
135134

136135
/**
137136
* Fetch all HTTP response headers. Works in the
138-
* Apache, FastCGI, CLI, FPM and NSAPI server module
139-
* in Netscape/iPlanet/SunONE webservers.
137+
* Apache, FastCGI, CLI, and FPM webservers.
140138
*
141139
* @return array An array of all Apache response headers on success.
142140
* @throws ApacheException

generated/curl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3089,7 +3089,7 @@ function curl_share_errno($share_handle): int
30893089
*
30903090
*
30913091
*
3092-
* @param string $value
3092+
* @param mixed $value
30933093
*
30943094
*
30953095
*
@@ -3126,7 +3126,7 @@ function curl_share_errno($share_handle): int
31263126
* @throws CurlException
31273127
*
31283128
*/
3129-
function curl_share_setopt($share_handle, int $option, string $value): void
3129+
function curl_share_setopt($share_handle, int $option, $value): void
31303130
{
31313131
error_clear_last();
31323132
$result = \curl_share_setopt($share_handle, $option, $value);

generated/datetime.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ function date_sun_info(int $timestamp, float $latitude, float $longitude): array
233233
* @throws DatetimeException
234234
*
235235
*/
236-
function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = 0)
236+
function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = null)
237237
{
238238
error_clear_last();
239-
if ($utcOffset !== 0) {
239+
if ($utcOffset !== null) {
240240
$result = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset);
241241
} elseif ($zenith !== null) {
242242
$result = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith);
@@ -336,10 +336,10 @@ function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, f
336336
* @throws DatetimeException
337337
*
338338
*/
339-
function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = 0)
339+
function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = null)
340340
{
341341
error_clear_last();
342-
if ($utcOffset !== 0) {
342+
if ($utcOffset !== null) {
343343
$result = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset);
344344
} elseif ($zenith !== null) {
345345
$result = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith);

generated/dir.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ function opendir(string $path, $context = null)
106106
* with opendir. If the directory handle is
107107
* not specified, the last link opened by opendir
108108
* is assumed.
109+
* @return null Returns NULL on success.
109110
* @throws DirException
110111
*
111112
*/
112-
function rewinddir($dir_handle = null): void
113+
function rewinddir($dir_handle = null)
113114
{
114115
error_clear_last();
115116
if ($dir_handle !== null) {
@@ -120,6 +121,7 @@ function rewinddir($dir_handle = null): void
120121
if ($result === false) {
121122
throw DirException::createFromPhpError();
122123
}
124+
return $result;
123125
}
124126

125127

generated/exec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function exec(string $command, ?array &$output = null, ?int &$result_code = null
4949
*
5050
* @param resource $process The proc_open resource that will
5151
* be evaluated.
52-
* @return array An array of collected information on success. The returned array contains the following elements:
52+
* @return array{command: string, pid: int, running: bool, signaled: bool, stopped: bool, exitcode: int, termsig: int, stopsig: int} An array of collected information on success. The returned array contains the following elements:
5353
*
5454
*
5555
*

generated/fileinfo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ function finfo_open(int $flags = FILEINFO_NONE, string $magic_database = "")
5858
* Returns the MIME content type for a file as determined by using
5959
* information from the magic.mime file.
6060
*
61-
* @param string $filename Path to the tested file.
61+
* @param string|resource $filename Path to the tested file.
6262
* @return string Returns the content type in MIME format, like
6363
* text/plain or application/octet-stream.
6464
* @throws FileinfoException
6565
*
6666
*/
67-
function mime_content_type(string $filename): string
67+
function mime_content_type($filename): string
6868
{
6969
error_clear_last();
7070
$result = \mime_content_type($filename);

generated/filter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* This parameter can be also an integer holding a filter constant. Then all values in the
2424
* input array are filtered by this filter.
2525
* @param bool $add_empty Add missing keys as NULL to the return value.
26-
* @return mixed An array containing the values of the requested variables on success.
26+
* @return array|null An array containing the values of the requested variables on success.
2727
* If the input array designated by type is not populated,
2828
* the function returns NULL if the FILTER_NULL_ON_FAILURE
2929
* flag is not given, or FALSE otherwise. For other failures, FALSE is returned.
@@ -36,7 +36,7 @@
3636
* @throws FilterException
3737
*
3838
*/
39-
function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empty = true)
39+
function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empty = true): ?array
4040
{
4141
error_clear_last();
4242
$result = \filter_input_array($type, $options, $add_empty);
@@ -65,12 +65,12 @@ function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empt
6565
* This parameter can be also an integer holding a filter constant. Then all values in the
6666
* input array are filtered by this filter.
6767
* @param bool $add_empty Add missing keys as NULL to the return value.
68-
* @return mixed An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if
68+
* @return array|null An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if
6969
* the variable is not set.
7070
* @throws FilterException
7171
*
7272
*/
73-
function filter_var_array(array $array, $options = FILTER_DEFAULT, bool $add_empty = true)
73+
function filter_var_array(array $array, $options = FILTER_DEFAULT, bool $add_empty = true): ?array
7474
{
7575
error_clear_last();
7676
$result = \filter_var_array($array, $options, $add_empty);

0 commit comments

Comments
 (0)