]> git.mxchange.org Git - friendica.git/commitdiff
Fix errors in Model namespace
authorArt4 <art4@wlabs.de>
Wed, 4 Dec 2024 21:41:41 +0000 (21:41 +0000)
committerArt4 <art4@wlabs.de>
Wed, 4 Dec 2024 21:41:41 +0000 (21:41 +0000)
14 files changed:
src/Model/Log/ParsedLogIterator.php
src/Model/Photo.php
src/Model/Post.php
src/Model/Post/Activity.php
src/Model/Post/Category.php
src/Model/Post/Collection.php
src/Model/Post/Content.php
src/Model/Post/Delivery.php
src/Model/Post/Origin.php
src/Model/Post/Thread.php
src/Model/Post/ThreadUser.php
src/Model/Post/User.php
src/Model/Profile.php
src/Model/Subscription.php

index 0843c0921cf8d892ab8456b41c1ef755782885f9..44c98462c129f2d8d3c8967245f4c7cd7b05daed 100644 (file)
@@ -18,7 +18,7 @@ use Friendica\Object\Log\ParsedLogLine;
  */
 class ParsedLogIterator implements \Iterator
 {
-       /** @var \Iterator */
+       /** @var ReversedFileReader */
        private $reader;
 
        /** @var ParsedLogLine current iterator value*/
@@ -33,10 +33,6 @@ class ParsedLogIterator implements \Iterator
        /** @var string search term */
        private $search = '';
 
-
-       /**
-        * @param ReversedFileReader $reader
-        */
        public function __construct(ReversedFileReader $reader)
        {
                $this->reader = $reader;
index 126edd379cef2bde39f71e5047fd3d383d026023..1858a1b59050c71a16079179c4b274896dbf88d2 100644 (file)
@@ -489,9 +489,6 @@ class Photo
         * Delete info from table and data from storage
         *
         * @param array $conditions Field condition(s)
-        * @param array $options    Options array, Optional
-        *
-        * @return boolean
         *
         * @throws \Exception
         * @see   \Friendica\Database\DBA::delete
index 111cd77cc45260c7b108e09023e6591afc8b9ec1..3118e2e84c057093b7e1c81daf3a25d2a3e2091c 100644 (file)
@@ -19,8 +19,6 @@ class Post
        /**
         * Insert a new post entry
         *
-        * @param integer $uri_id
-        * @param array   $fields
         * @return bool   Success of the insert process
         * @throws \Exception
         */
@@ -184,10 +182,6 @@ class Post
        /**
         * Retrieve a single record from the post-user-view view and returns it in an associative array
         *
-        * @param array $fields
-        * @param array $condition
-        * @param array $params
-        * @param bool  $user_mode true = post-user-view, false = post-view
         * @return bool|array
         * @throws \Exception
         * @see   DBA::select
@@ -212,10 +206,6 @@ class Post
         * When the requested record is a reshare activity, the system fetches the reshared original post.
         * Otherwise the function reacts similar to selectFirst
         *
-        * @param array $fields
-        * @param array $condition
-        * @param array $params
-        * @param bool  $user_mode true = post-user-view, false = post-view
         * @return bool|array
         * @throws \Exception
         * @see   DBA::select
@@ -300,7 +290,7 @@ class Post
        /**
         * Select rows from the post-user-view view and returns them as an array
         *
-        * @param array $selected  Array of selected fields, empty for all
+        * @param array $fields    Array of selected fields, empty for all
         * @param array $condition Array of fields for condition
         * @param array $params    Array of several parameters
         *
@@ -767,9 +757,6 @@ class Post
         * Delete a row from the post table
         *
         * @param array        $conditions Field condition(s)
-        * @param array        $options
-        *                           - cascade: If true we delete records in other tables that depend on the one we're deleting through
-        *                           relations (default: true)
         *
         * @return boolean was the delete successful?
         * @throws \Exception
index 7d3bb894605f2ae476f3c695c6557613a8ae8afd..3996ce9f49fe7adc1e915296fd76a4a941c5c007 100644 (file)
@@ -16,9 +16,6 @@ class Activity
        /**
         * Insert a new post-activity entry
         *
-        * @param integer $uri_id
-        * @param array   $fields
-        *
         * @return bool   success
         */
        public static function insert(int $uri_id, string $source): bool
index 6afb657751cf01d0f5ea87c9ce966035b334faa9..558fb7059a1435e5dec83e6d8872f79adeb91a24 100644 (file)
@@ -140,8 +140,6 @@ class Category
         * Inserts new terms for the provided item ID based on the legacy item.file field BBCode content.
         * Deletes all previous file terms for the same item ID.
         *
-        * @param integer $item_id item id
-        * @param         $files
         * @return void
         * @throws \Exception
         */
index a04cdc832fe4c8d12dc6c4462f69c063c8ad1b0c..d57ab6d7a1268ea806453f72c82bc90b0889a493 100644 (file)
@@ -62,9 +62,6 @@ class Collection
        /**
         * Fetch collections for a given contact
         *
-        * @param integer $cid
-        * @param [type] $type
-        * @param array $fields
         * @return array
         */
        public static function selectToArrayForContact(int $cid, int $type = self::FEATURED, array $fields = [])
index e0a037ad9df735fbef068d3a5a3c3f73e45f4809..1b3dd3a0d82c1c27d85cde50bc931d00f38980be 100644 (file)
@@ -11,7 +11,6 @@ use \BadMethodCallException;
 use Friendica\Database\Database;
 use Friendica\Database\DBA;
 use Friendica\DI;
-use Friendica\Model\Item;
 use Friendica\Model\Post;
 
 class Content
@@ -19,8 +18,6 @@ class Content
        /**
         * Insert a new post-content entry
         *
-        * @param integer $uri_id
-        * @param array   $fields
         * @return bool   success
         * @throws \Exception
         */
index 972e0084ca54edeeb9a8ca630f56ebd1b18e0e96..90d7be6eff1aa5c87eba34b891e47e79c9eb8d75 100644 (file)
@@ -17,11 +17,6 @@ class Delivery
 {
        /**
         * Add a post to an inbox
-        *
-        * @param integer $uri_id
-        * @param string  $inbox
-        * @param string  $created
-        * @param array   %receivers
         */
        public static function add(int $uri_id, int $uid, string $inbox, string $created, string $command, array $receivers)
        {
index b3451fee8ef85a5fc873bc6766aead34f62e3604..c925c65a72ba81789b172d23ef072f9a259d8908 100644 (file)
@@ -17,7 +17,6 @@ class Origin
        /**
         * Insert a new post origin entry
         *
-        * @param array    $fields
         * @return boolean was the insert successful?
         * @throws \Exception
         */
index b7f51f920a1f97934de6fc80abd733031b39160a..d3952fe6249bc32cbddf8514d11853956ffa5944 100644 (file)
@@ -10,7 +10,6 @@ namespace Friendica\Model\Post;
 use \BadMethodCallException;
 use Friendica\Database\Database;
 use Friendica\Database\DBA;
-use Friendica\Database\DBStructure;
 use Friendica\DI;
 
 class Thread
@@ -18,8 +17,6 @@ class Thread
        /**
         * Insert a new post-thread entry
         *
-        * @param integer $uri_id
-        * @param array   $fields
         * @return bool   success
         * @throws \Exception
         */
index 8a5baf51fffe5aba9b5f1de38afdde39d27d4cc7..b2f4bc08064f9d2aecc862d5c33f41e720416ace 100644 (file)
@@ -7,10 +7,10 @@
 
 namespace Friendica\Model\Post;
 
-use \BadMethodCallException;
+use BadMethodCallException;
+use Exception;
 use Friendica\Database\Database;
 use Friendica\Database\DBA;
-use Friendica\Database\DBStructure;
 use Friendica\DI;
 
 class ThreadUser
@@ -18,9 +18,6 @@ class ThreadUser
        /**
         * Insert a new URI user entry
         *
-        * @param integer $uri_id
-        * @param integer $uid
-        * @param array   $fields
         * @return bool   success
         * @throws \Exception
         */
@@ -72,9 +69,6 @@ class ThreadUser
         * Delete a row from the post-thread-user table
         *
         * @param array        $conditions Field condition(s)
-        * @param array        $options
-        *                           - cascade: If true we delete records in other tables that depend on the one we're deleting through
-        *                           relations (default: true)
         *
         * @return boolean was the delete successful?
         * @throws \Exception
index ec7f6b2c0f9853e8c727503a6eb54ac6a5689bda..0466b2c0a860644a2155c3fc0d4a6d789dd48b6a 100644 (file)
@@ -7,9 +7,9 @@
 
 namespace Friendica\Model\Post;
 
-use Friendica\Database\DBA;
-use \BadMethodCallException;
+use BadMethodCallException;
 use Friendica\Database\Database;
+use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Item;
 use Friendica\Protocol\Activity;
@@ -19,9 +19,6 @@ class User
        /**
         * Insert a new post user entry
         *
-        * @param integer $uri_id
-        * @param integer $uid
-        * @param array   $fields
         * @return int    ID of inserted post-user
         * @throws \Exception
         */
index e8ebe89d577f76e01ffb9e0ecc14338fa2f19de3..a8c9d32c07c4fd495ee8a9f81707aa25dfb7db56 100644 (file)
@@ -33,7 +33,7 @@ class Profile
        /**
         * Returns default profile for a given user id
         *
-        * @param integer User ID
+        * @param int $uid User ID
         *
         * @return array|bool Profile data or false on error
         * @throws \Exception
@@ -61,8 +61,8 @@ class Profile
        /**
         * Returns profile data for the contact owner
         *
-        * @param int $uid The User ID
-        * @param array|bool $fields The fields to retrieve or false on error
+        * @param int   $uid    The User ID
+        * @param array $fields The fields to retrieve or false on error
         *
         * @return array Array of profile data
         * @throws \Exception
index c1be9f10e80278bb007162767e356d76e16ffb0d..18b6a48e624460d969da01ba6786f48cbbbf20cd 100644 (file)
@@ -12,7 +12,7 @@ use Friendica\Core\Worker;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Factory\Api\Mastodon\Notification as NotificationFactory;
-use Friendica\Navigation\Notifications\Entity;
+use Friendica\Navigation\Notifications\Entity\Notification as EntityNotification;
 use Friendica\Object\Api\Mastodon\Notification;
 use Minishlink\WebPush\VAPID;
 
@@ -21,9 +21,6 @@ class Subscription
        /**
         * Select a subscription record exists
         *
-        * @param int   $applicationid
-        * @param int   $uid
-        * @param array $fields
         * @return array|bool Array on success, false on failure
         */
        public static function select(int $applicationid, int $uid, array $fields = [])
@@ -120,10 +117,9 @@ class Subscription
        /**
         * Prepare push notification
         *
-        * @param Notification $Notification
         * @return void
         */
-       public static function pushByNotification(Entity\Notification $notification)
+       public static function pushByNotification(EntityNotification $notification)
        {
                $type = NotificationFactory::getType($notification);