]> git.mxchange.org Git - friendica.git/commitdiff
Changes:
authorRoland Häder <roland@mxchange.org>
Fri, 24 Jun 2022 01:01:13 +0000 (03:01 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 25 Jun 2022 14:48:35 +0000 (16:48 +0200)
- added some type-hints
- changed some double-quotes to single

src/App.php
src/Model/Contact.php

index 2d635951bec303bcbfcc5455fef2705f29c9986c..400ea15b195c899ae68ee1fcc8c0ffe2d2a16451 100644 (file)
@@ -614,9 +614,9 @@ class App
                        if (!empty($_GET['zrl']) && $this->mode->isNormal() && !$this->mode->isBackend() && !local_user()) {
                                // Only continue when the given profile link seems valid
                                // Valid profile links contain a path with "/profile/" and no query parameters
-                               if ((parse_url($_GET['zrl'], PHP_URL_QUERY) == "") &&
-                                       strstr(parse_url($_GET['zrl'], PHP_URL_PATH), "/profile/")) {
-                                       if (Core\Session::get('visitor_home') != $_GET["zrl"]) {
+                               if ((parse_url($_GET['zrl'], PHP_URL_QUERY) == '') &&
+                                       strstr(parse_url($_GET['zrl'], PHP_URL_PATH), '/profile/')) {
+                                       if (Core\Session::get('visitor_home') != $_GET['zrl']) {
                                                Core\Session::set('my_url', $_GET['zrl']);
                                                Core\Session::set('authenticated', 0);
 
index d6b2780ef3a9ec3ade68147ce9f0ffa4983c1333..f8ff91ec554112f4a4a19559f16b4e94ca8369b1 100644 (file)
@@ -2557,7 +2557,7 @@ class Contact
         * @throws HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public static function updateFromProbeByURL($url)
+       public static function updateFromProbeByURL(string $url): int
        {
                $id = self::getIdForURL($url);
 
@@ -2578,7 +2578,7 @@ class Contact
         * @param string $network Network of that contact
         * @return string with protocol
         */
-       public static function getProtocol($url, $network)
+       public static function getProtocol(string $url, string $network): string
        {
                if ($network != Protocol::DFRN) {
                        return $network;
@@ -2945,6 +2945,7 @@ class Contact
         * Update the local relationship when a local user loses a follower
         *
         * @param array $contact User-specific contact (uid != 0) array
+        * @return void
         * @throws HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */