]> git.mxchange.org Git - friendica.git/commitdiff
Fix errors in Contact namespace
authorArt4 <art4@wlabs.de>
Sun, 1 Dec 2024 22:11:04 +0000 (22:11 +0000)
committerArt4 <art4@wlabs.de>
Sun, 1 Dec 2024 22:11:04 +0000 (22:11 +0000)
src/Contact/Avatar.php
src/Contact/FriendSuggest/Entity/FriendSuggest.php
src/Contact/FriendSuggest/Repository/FriendSuggest.php

index 66930119e891223a58be0551427e1a8f3e910769..7827465b4e0c20315a8ce92117392d85a39c5bfa 100644 (file)
@@ -235,9 +235,6 @@ class Avatar
 
        /**
         * Delete locally cached avatar pictures of a contact
-        *
-        * @param string $avatar
-        * @return bool
         */
        public static function deleteCache(array $contact): bool
        {
index f5bb9dd993409b1ed92387d9fc7cae78529b86d5..67159a9ea0540ec190abba22a0ff909c0c65c9c3 100644 (file)
@@ -19,7 +19,7 @@ use Friendica\BaseEntity;
  * @property-read string $request
  * @property-read string $photo
  * @property-read string $note
- * @property-read \DateTime created
+ * @property-read \DateTime $created
  * @property-read int|null $id
  */
 class FriendSuggest extends BaseEntity
index a93c4a2ddb6600b3396bdf3e4a93acb754f9f799..dee3f29b2ebac414017d6851a0cdce30dd3806c9 100644 (file)
@@ -9,7 +9,7 @@ namespace Friendica\Contact\FriendSuggest\Repository;
 
 use Friendica\BaseRepository;
 use Friendica\Contact\FriendSuggest\Collection;
-use Friendica\Contact\FriendSuggest\Entity;
+use Friendica\Contact\FriendSuggest\Entity\FriendSuggest as EntityFriendSuggest;
 use Friendica\Contact\FriendSuggest\Exception\FriendSuggestNotFoundException;
 use Friendica\Contact\FriendSuggest\Exception\FriendSuggestPersistenceException;
 use Friendica\Contact\FriendSuggest\Factory;
@@ -30,7 +30,7 @@ class FriendSuggest extends BaseRepository
                parent::__construct($database, $logger, $factory);
        }
 
-       private function convertToTableRow(Entity\FriendSuggest $fsuggest): array
+       private function convertToTableRow(EntityFriendSuggest $fsuggest): array
        {
                return [
                        'uid'     => $fsuggest->uid,
@@ -45,14 +45,9 @@ class FriendSuggest extends BaseRepository
        }
 
        /**
-        * @param array $condition
-        * @param array $params
-        *
-        * @return Entity\FriendSuggest
-        *
         * @throws NotFoundException The underlying exception if there's no FriendSuggest with the given conditions
         */
-       private function selectOne(array $condition, array $params = []): Entity\FriendSuggest
+       private function selectOne(array $condition, array $params = []): EntityFriendSuggest
        {
                return parent::_selectOne($condition, $params);
        }
@@ -71,13 +66,9 @@ class FriendSuggest extends BaseRepository
        }
 
        /**
-        * @param int $id
-        *
-        * @return Entity\FriendSuggest
-        *
         * @throws FriendSuggestNotFoundException in case there's no suggestion for this id
         */
-       public function selectOneById(int $id): Entity\FriendSuggest
+       public function selectOneById(int $id): EntityFriendSuggest
        {
                try {
                        return $this->selectOne(['id' => $id]);
@@ -103,13 +94,9 @@ class FriendSuggest extends BaseRepository
        }
 
        /**
-        * @param Entity\FriendSuggest $fsuggest
-        *
-        * @return Entity\FriendSuggest
-        *
         * @throws FriendSuggestNotFoundException in case the underlying storage cannot save the suggestion
         */
-       public function save(Entity\FriendSuggest $fsuggest): Entity\FriendSuggest
+       public function save(EntityFriendSuggest $fsuggest): EntityFriendSuggest
        {
                try {
                        $fields = $this->convertToTableRow($fsuggest);