Skip to content

Commit

Permalink
Merge 5d8b92d into dfd316d
Browse files Browse the repository at this point in the history
  • Loading branch information
nauxliu committed Aug 29, 2019
2 parents dfd316d + 5d8b92d commit 49232af
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions generated/functionsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@
'getmypid',
'getmyuid',
'getopt',
'ini_get',
'ini_set',
'phpcredits',
'phpinfo',
Expand Down
21 changes: 21 additions & 0 deletions generated/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,27 @@ function getopt(string $options, array $longopts = null, ?int &$optind = null):
}


/**
* Returns the value of the configuration option on success.
*
* @param string $varname The configuration option name.
* @return string Returns the value of the configuration option as a string on success, or an
* empty string for null values. Returns FALSE if the
* configuration option doesn't exist.
* @throws InfoException
*
*/
function ini_get(string $varname): string
{
error_clear_last();
$result = \ini_get($varname);
if ($result === false) {
throw InfoException::createFromPhpError();
}
return $result;
}


/**
* Sets the value of the given configuration option. The configuration option
* will keep this new value during the script's execution, and will be restored
Expand Down
2 changes: 1 addition & 1 deletion generated/yaml.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @throws YamlException
*
*/
function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, array $callbacks = null)
function yaml_parse_file(string $filename, int $pos = 0, int &$ndocs = null, array $callbacks = null)
{
error_clear_last();
$result = \yaml_parse_file($filename, $pos, $ndocs, $callbacks);
Expand Down
3 changes: 3 additions & 0 deletions generator/src/DocPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public function detectFalsyFunction(): bool
if (preg_match('/on\s+success,\s+otherwise\s+&false;\s+is\s+returned/m', $file)) {
return true;
}
if (preg_match('/Returns.*on success[.\s\S]+Returns &false;\s+if/m', $file)) {
return true;
}

return false;
}
Expand Down
1 change: 1 addition & 0 deletions rector-migrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ services:
getmypid: 'Safe\getmypid'
getmyuid: 'Safe\getmyuid'
getopt: 'Safe\getopt'
ini_get: 'Safe\ini_get'
ini_set: 'Safe\ini_set'
phpcredits: 'Safe\phpcredits'
phpinfo: 'Safe\phpinfo'
Expand Down

0 comments on commit 49232af

Please sign in to comment.