]> git.mxchange.org Git - friendica.git/commitdiff
Added more type-hints
authorRoland Häder <roland@mxchange.org>
Thu, 16 Jun 2022 14:38:58 +0000 (16:38 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 17 Jun 2022 15:18:31 +0000 (17:18 +0200)
src/Worker/Delivery.php
src/Worker/Directory.php

index c09181d3e6b5a3aa1d84953e0e0bba04f79733e8..2f78bed6b8c50e6dad41e4356456aa0335ca87b4 100644 (file)
@@ -269,7 +269,7 @@ class Delivery
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       private static function deliverDFRN($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup, $server_protocol)
+       private static function deliverDFRN(string $cmd, array $contact, array $owner, array $items, array $target_item, bool $public_message, bool $top_level, bool $followup, int $server_protocol)
        {
                // Transmit Diaspora reshares via Diaspora if the Friendica contact support Diaspora
                if (Diaspora::isReshare($target_item['body'] ?? '') && !empty(FContact::getByURL($contact['addr'], false))) {
@@ -384,7 +384,7 @@ class Delivery
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       private static function deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup)
+       private static function deliverDiaspora(string $cmd, array $contact, array $owner, array $items, array $target_item, bool $public_message, bool $top_level, bool $followup)
        {
                // We don't treat Forum posts as "wall-to-wall" to be able to post them via Diaspora
                $walltowall = $top_level && ($owner['id'] != $items[0]['contact-id']) & ($owner['account-type'] != Model\User::ACCOUNT_TYPE_COMMUNITY);
@@ -478,7 +478,7 @@ class Delivery
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       private static function deliverMail($cmd, $contact, $owner, $target_item, $thr_parent)
+       private static function deliverMail(string $cmd, array $contact, array $owner, array $target_item, array $thr_parent)
        {
                if (DI::config()->get('system','imap_disabled')) {
                        return;
index d6294d049893a6049e0deaebd4461cdb2709793a..bb8041a2251e0e919b231ff623d6c9d2afa948cd 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Network\HTTPClient\Client\HttpClientAccept;
  */
 class Directory
 {
-       public static function execute($url = '')
+       public static function execute(string $url = '')
        {
                $dir = Search::getGlobalDirectory();