]> git.mxchange.org Git - friendica.git/commitdiff
added spaces + curly braces and TODOs for upcoming type-hint rewrite. Please
authorRoland Haeder <roland@mxchange.org>
Sat, 8 Apr 2017 17:05:50 +0000 (19:05 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 14 May 2018 20:49:58 +0000 (22:49 +0200)
note that PHP5 allows 'array' as type-hint already (+ interface/class name).

Signed-off-by: Roland Haeder <roland@mxchange.org>
include/conversation.php

index b52a8873df82399f47b2c082482c1f5109d7ec5f..8ae82964426de1b2c1d81c6e0b2d5182b8ee0250 100644 (file)
@@ -116,7 +116,7 @@ function localize_item(&$item) {
                $item['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $item['contact-id']);
        }
 
-       /// @Separted ???
+       /// @TODO Separted ???
        $xmlhead = "<" . "?xml version='1.0' encoding='UTF-8' ?" . ">";
        if (activity_match($item['verb'], ACTIVITY_LIKE)
                || activity_match($item['verb'], ACTIVITY_DISLIKE)
@@ -162,22 +162,19 @@ function localize_item(&$item) {
 
                if (activity_match($item['verb'], ACTIVITY_LIKE)) {
                        $bodyverb = L10n::t('%1$s likes %2$s\'s %3$s');
-               }
-               elseif (activity_match($item['verb'], ACTIVITY_DISLIKE)) {
+               } elseif (activity_match($item['verb'], ACTIVITY_DISLIKE)) {
                        $bodyverb = L10n::t('%1$s doesn\'t like %2$s\'s %3$s');
-               }
-               elseif (activity_match($item['verb'], ACTIVITY_ATTEND)) {
+               } elseif (activity_match($item['verb'], ACTIVITY_ATTEND)) {
                        $bodyverb = L10n::t('%1$s attends %2$s\'s %3$s');
-               }
-               elseif (activity_match($item['verb'], ACTIVITY_ATTENDNO)) {
+               } elseif (activity_match($item['verb'], ACTIVITY_ATTENDNO)) {
                        $bodyverb = L10n::t('%1$s doesn\'t attend %2$s\'s %3$s');
-               }
-               elseif (activity_match($item['verb'], ACTIVITY_ATTENDMAYBE)) {
+               } elseif (activity_match($item['verb'], ACTIVITY_ATTENDMAYBE)) {
                        $bodyverb = L10n::t('%1$s attends maybe %2$s\'s %3$s');
                }
-               $item['body'] = sprintf($bodyverb, $author, $objauthor, $plink);
 
+               $item['body'] = sprintf($bodyverb, $author, $objauthor, $plink);
        }
+
        if (activity_match($item['verb'], ACTIVITY_FRIEND)) {
 
                if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) return;
@@ -304,8 +301,8 @@ function localize_item(&$item) {
                $item['body'] = L10n::t('%1$s tagged %2$s\'s %3$s with %4$s', $author, $objauthor, $plink, $tag );
 
        }
-       if (activity_match($item['verb'], ACTIVITY_FAVORITE)) {
 
+       if (activity_match($item['verb'], ACTIVITY_FAVORITE)) {
                if ($item['object-type'] == "") {
                        return;
                }
@@ -1611,8 +1608,7 @@ function sort_thr_commented(array $a, array $b)
        return strcmp($b['commented'], $a['commented']);
 }
 
-/// @TODO Add type-hint
-function render_location_dummy($item) {
+function render_location_dummy(array $item) {
        if ($item['location'] != "") {
                return $item['location'];
        }
@@ -1622,8 +1618,7 @@ function render_location_dummy($item) {
        }
 }
 
-/// @TODO Add type-hint
-function get_responses($conv_responses, $response_verbs, $ob, $item) {
+function get_responses(array $conv_responses, array $response_verbs, $ob, $item) {
        $ret = [];
        foreach ($response_verbs as $v) {
                $ret[$v] = [];