]> git.mxchange.org Git - friendica.git/commitdiff
Added some missing type-hints
authorRoland Häder <roland@mxchange.org>
Thu, 23 Jun 2022 08:18:38 +0000 (10:18 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 23 Jun 2022 15:30:13 +0000 (17:30 +0200)
src/Network/Probe.php
src/Util/Proxy.php

index 6c3e235a34015c178f22c90c50191321a188ba26..1c64a6fe4119df8e5019fc6a5adabe4664e14d46 100644 (file)
@@ -788,7 +788,7 @@ class Probe
                return $data;
        }
 
-       public static function pollZot($url, $data)
+       public static function pollZot(string $url, array $data): array
        {
                $curlResult = DI::httpClient()->get($url, HttpClientAccept::JSON);
                if ($curlResult->isTimeout()) {
index 16f635e3a04b402e1ac8255f8ced3a2a72589db5..02c9d2a1843a2b651021054367f6ce13ce792491 100644 (file)
@@ -80,7 +80,7 @@ class Proxy
         * @return string The proxyfied URL or relative path
         * @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')) {
                        return $url;
@@ -151,7 +151,7 @@ class Proxy
         * @return boolean
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function isLocalImage($url)
+       public static function isLocalImage(string $url): bool
        {
                if (substr($url, 0, 1) == '/') {
                        return true;
@@ -170,7 +170,7 @@ class Proxy
         * @param string $url URL to parse
         * @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 = html_entity_decode($query);