Added some missing type-hints
This commit is contained in:
parent
f889aeffb3
commit
69a68be800
|
@ -788,7 +788,7 @@ class Probe
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function pollZot($url, $data)
|
public static function pollZot(string $url, array $data): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($url, HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url, HttpClientAccept::JSON);
|
||||||
if ($curlResult->isTimeout()) {
|
if ($curlResult->isTimeout()) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Proxy
|
||||||
* @return string The proxyfied URL or relative path
|
* @return string The proxyfied URL or relative path
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function proxifyUrl($url, $size = '')
|
public static function proxifyUrl(string $url, $size = '')
|
||||||
{
|
{
|
||||||
if (!DI::config()->get('system', 'proxify_content')) {
|
if (!DI::config()->get('system', 'proxify_content')) {
|
||||||
return $url;
|
return $url;
|
||||||
|
@ -151,7 +151,7 @@ class Proxy
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function isLocalImage($url)
|
public static function isLocalImage(string $url): bool
|
||||||
{
|
{
|
||||||
if (substr($url, 0, 1) == '/') {
|
if (substr($url, 0, 1) == '/') {
|
||||||
return true;
|
return true;
|
||||||
|
@ -170,7 +170,7 @@ class Proxy
|
||||||
* @param string $url URL to parse
|
* @param string $url URL to parse
|
||||||
* @return array Associative array of query string parameters
|
* @return array Associative array of query string parameters
|
||||||
*/
|
*/
|
||||||
private static function parseQuery($url)
|
private static function parseQuery(string $url): array
|
||||||
{
|
{
|
||||||
$query = parse_url($url, PHP_URL_QUERY);
|
$query = parse_url($url, PHP_URL_QUERY);
|
||||||
$query = html_entity_decode($query);
|
$query = html_entity_decode($query);
|
||||||
|
|
Loading…
Reference in a new issue