mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
fix return types for Utils/Internet getURL()/postURL()
This commit is contained in:
parent
5cf2fcbbb7
commit
e007fad5b8
@ -140,7 +140,7 @@ class Internet{
|
||||
* @param string[] $headers reference parameter
|
||||
* @param int $httpCode reference parameter
|
||||
*
|
||||
* @return bool|mixed false if an error occurred, mixed data if successful.
|
||||
* @return string|false
|
||||
*/
|
||||
public static function getURL(string $page, int $timeout = 10, array $extraHeaders = [], &$err = null, &$headers = null, &$httpCode = null){
|
||||
try{
|
||||
@ -162,7 +162,7 @@ class Internet{
|
||||
* @param string[] $headers reference parameter
|
||||
* @param int $httpCode reference parameter
|
||||
*
|
||||
* @return bool|mixed false if an error occurred, mixed data if successful.
|
||||
* @return string|false
|
||||
*/
|
||||
public static function postURL(string $page, $args, int $timeout = 10, array $extraHeaders = [], &$err = null, &$headers = null, &$httpCode = null){
|
||||
try{
|
||||
|
@ -426,7 +426,7 @@ class Utils{
|
||||
* @param string[] $headers reference parameter
|
||||
* @param int $httpCode reference parameter
|
||||
*
|
||||
* @return bool|mixed false if an error occurred, mixed data if successful.
|
||||
* @return string|false
|
||||
*/
|
||||
public static function getURL(string $page, int $timeout = 10, array $extraHeaders = [], &$err = null, &$headers = null, &$httpCode = null){
|
||||
return Internet::getURL($page, $timeout, $extraHeaders, $err, $headers, $httpCode);
|
||||
@ -442,7 +442,7 @@ class Utils{
|
||||
* @param string[] $headers reference parameter
|
||||
* @param int $httpCode reference parameter
|
||||
*
|
||||
* @return bool|mixed false if an error occurred, mixed data if successful.
|
||||
* @return string|false
|
||||
*/
|
||||
public static function postURL(string $page, $args, int $timeout = 10, array $extraHeaders = [], &$err = null, &$headers = null, &$httpCode = null){
|
||||
return Internet::postURL($page, $args, $timeout, $extraHeaders, $err, $headers, $httpCode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user