Sfoglia il codice sorgente

fix phpstan errors

Olivier Massot 2 anni fa
parent
commit
da4a5c9ca2

+ 1 - 1
src/Entity/Core/AbstractInformation.php

@@ -129,7 +129,7 @@ class AbstractInformation
 
     /**
      * @param Organization|null $recipientOrganization
-     * @return Notification
+     * @return AbstractInformation
      */
     public function setRecipientOrganization(?Organization $recipientOrganization): AbstractInformation
     {

+ 6 - 5
src/Entity/Core/NotificationUser.php

@@ -10,11 +10,12 @@ use App\Entity\Access\Access;
 use App\Repository\Core\NotificationUserRepository;
 
 //use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
- *
- * Les NotificationUser permettent de garder la trace des notifications qui ont été lues par les utilisateurs
+ * Les NotificationUser permettent de garder la trace des notifications et des tips
+ * qui ont été lues par les utilisateurs
  */
 #[ApiResource(
     operations: [
@@ -36,7 +37,7 @@ class NotificationUser
 
     #[ORM\ManyToOne(inversedBy: 'notificationUsers')]
     #[ORM\JoinColumn(nullable: false)]
-    private Notification $notification;
+    private AbstractInformation $notification;
 
     #[ORM\ManyToOne(inversedBy: 'notificationUsers')]
     #[ORM\JoinColumn(nullable: false)]
@@ -50,13 +51,13 @@ class NotificationUser
         return $this->id;
     }
 
-    public function setNotification(?Notification $notification): self
+    public function setNotification(?AbstractInformation $notification): self
     {
         $this->notification = $notification;
         return $this;
     }
 
-    public function getNotification(): Notification
+    public function getNotification(): AbstractInformation
     {
         return $this->notification;
     }