]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GServer.php
spelling: object
[friendica.git] / src / Model / GServer.php
index 635dcfc09ed6712ed439d3efa079a25e069aa70c..b034ded754d2862b4b77dded79abe767a9e06fa4 100644 (file)
@@ -92,7 +92,7 @@ class GServer
        const DETECT_NODEINFO_210 = 103;
 
        /**
-        * Check for the existance of a server and adds it in the background if not existant
+        * Check for the existence of a server and adds it in the background if not existant
         *
         * @param string $url
         * @param boolean $only_nodeinfo
@@ -327,7 +327,7 @@ class GServer
                        return DateTimeFormat::utc('now +1 month');
                }
 
-               // The system hadn't been successul contacted for more than a month, so try again in three months
+               // The system hadn't been successful contacted for more than a month, so try again in three months
                return DateTimeFormat::utc('now +3 month');
        }
 
@@ -557,7 +557,7 @@ class GServer
                        return false;
                }
 
-               // If the URL missmatches, then we mark the old entry as failure
+               // If the URL mismatches, then we mark the old entry as failure
                if (!Strings::compareLink($url, $original_url)) {
                        self::setFailureByUrl($original_url);
                        if (!self::getID($url, true) && !Network::isUrlBlocked($url)) {
@@ -1585,17 +1585,16 @@ class GServer
         */
        private static function getNomadVersion(string $url): string
        {
-               $version = '';
                $curlResult = DI::httpClient()->get($url . '/api/z/1.0/version', HttpClientAccept::JSON);
                if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
-                       return $version;
+                       return '';
                }
 
                $data = json_decode($curlResult->getBody(), true);
                if (empty($data)) {
-                       return $version;
+                       return '';
                }
-               return $data ?? $version;
+               return $data ?? '';
        }
 
        /**
@@ -2438,7 +2437,7 @@ class GServer
                        }
                }
 
-               // Disvover Mastodon servers
+               // Discover Mastodon servers
                $accesstoken = DI::config()->get('system', 'instances_social_key');
 
                if (!empty($accesstoken)) {