]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Item.php
Merge pull request #9 from nupplaphil/dependabot/composer/guzzlehttp/guzzle-6.5.8
[friendica.git] / src / Model / Item.php
index 7acac695f1dc9d839eea6b9400c481515d99ee34..c87dacd9b238bedbe0db0c3bb1d0c1c93e3fb014 100644 (file)
@@ -1841,13 +1841,13 @@ class Item
                $parsed = parse_url($uri);
 
                // Remove the scheme to make sure that "https" and "http" doesn't make a difference
-               unset($parsed["scheme"]);
+               unset($parsed['scheme']);
 
                // Glue it together to be able to make a hash from it
-               $host_id = implode("/", $parsed);
+               $host_id = implode('/', $parsed);
 
                // Use a mixture of several hashes to provide some GUID like experience
-               return hash("crc32", $host) . '-'. hash('joaat', $host_id) . '-'. hash('fnv164', $host_id);
+               return hash('crc32', $host) . '-'. hash('joaat', $host_id) . '-'. hash('fnv164', $host_id);
        }
 
        /**
@@ -1859,9 +1859,9 @@ class Item
         * @return string
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function newURI($uid, $guid = "")
+       public static function newURI(int $uid, string $guid = ''): string
        {
-               if ($guid == "") {
+               if ($guid == '') {
                        $guid = System::createUUID();
                }