From d4e4c1505b69342ee3c6b8721490e8eebaaa6cca Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 7 Dec 2024 14:45:47 +0000 Subject: [PATCH] Fix errors in Protocol namespace --- .../ValueObject/FormattedNavNotification.php | 2 ++ src/Protocol/Feed.php | 11 ++++------- src/Protocol/HTTP/MediaType.php | 2 +- src/Protocol/Relay.php | 3 +-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/Navigation/Notifications/ValueObject/FormattedNavNotification.php b/src/Navigation/Notifications/ValueObject/FormattedNavNotification.php index 913618294d..16543f9ac1 100644 --- a/src/Navigation/Notifications/ValueObject/FormattedNavNotification.php +++ b/src/Navigation/Notifications/ValueObject/FormattedNavNotification.php @@ -11,6 +11,8 @@ use Friendica\BaseEntity; /** * A view-only object for printing item notifications to the frontend + * + * @property-read bool $seen */ class FormattedNavNotification extends BaseEntity { diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 82227b3b47..da635884d9 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -1146,7 +1146,6 @@ class Feed * @param DOMDocument $doc XML document * @param array $item Data of the item that is to be posted * @param array $owner Contact data of the poster - * @param bool $toplevel Is it for en entry element (false) or a feed entry (true)? * @return DOMElement Entry element * @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \ImagickException @@ -1172,14 +1171,13 @@ class Feed * @param DOMDocument $doc XML document * @param \DOMElement $entry Entry element where the content is added * @param array $item Data of the item that is to be posted - * @param array $owner Contact data of the poster * @param string $title Title for the post * @param string $verb The activity verb * @param bool $complete Add the "status_net" element? - * @return void + * * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ - private static function entryContent(DOMDocument $doc, DOMElement $entry, array $item, $title, string $verb = '', bool $complete = true) + private static function entryContent(DOMDocument $doc, DOMElement $entry, array $item, $title, string $verb = '', bool $complete = true): void { if ($verb == '') { $verb = self::constructVerb($item); @@ -1217,11 +1215,10 @@ class Feed * @param object $entry The entry element where the elements are added * @param array $item Data of the item that is to be posted * @param array $owner Contact data of the poster - * @param bool $complete default true - * @return void + * * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ - private static function entryFooter(DOMDocument $doc, $entry, array $item, array $owner) + private static function entryFooter(DOMDocument $doc, $entry, array $item, array $owner): void { $mentioned = []; diff --git a/src/Protocol/HTTP/MediaType.php b/src/Protocol/HTTP/MediaType.php index 323c27df10..3c7e3af42a 100644 --- a/src/Protocol/HTTP/MediaType.php +++ b/src/Protocol/HTTP/MediaType.php @@ -35,7 +35,7 @@ final class MediaType private $type; /** - * @var @string + * @var string */ private $subType; diff --git a/src/Protocol/Relay.php b/src/Protocol/Relay.php index 0d6594d714..ec0b0f25f5 100644 --- a/src/Protocol/Relay.php +++ b/src/Protocol/Relay.php @@ -7,6 +7,7 @@ namespace Friendica\Protocol; +use Exception; use Friendica\Content\Smilies; use Friendica\Content\Text\BBCode; use Friendica\Core\L10n; @@ -299,8 +300,6 @@ class Relay * Return a list of servers that we serve via the direct relay * * @param integer $item_id id of the item that is sent - * @param array $contacts Previously fetched contacts - * @param array $networks Networks of the relay servers * @return array of relay servers * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ -- 2.39.5