Vincent 1 ano atrás
pai
commit
e502563bf5

+ 10 - 0
src/ApiResources/Profile/AccessProfile.php

@@ -301,11 +301,21 @@ class AccessProfile implements ApiResourcesInterface
         return $this;
     }
 
+    /**
+     * return required for PHP Stan
+     * @return bool[]
+     */
     public function getHistorical(): array
     {
         return $this->historical;
     }
 
+    /**
+     * param require for PHP Stan
+     * @param bool[] $historical
+     *
+     * @return $this
+     */
     public function setHistorical(array $historical): self
     {
         $this->historical = $historical;

+ 2 - 2
src/Entity/Access/Access.php

@@ -2142,7 +2142,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         return $this;
     }
 
-    public function setPreferences(?Preferences $preferences = null)
+    public function setPreferences(?Preferences $preferences = null): self
     {
         if (!is_null($preferences)) {
             $preferences->setAccess($this);
@@ -2152,7 +2152,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         return $this;
     }
 
-    public function getPreferences()
+    public function getPreferences(): ?Preferences
     {
         return $this->preferences;
     }

+ 1 - 1
src/Service/Access/AccessProfileCreator.php

@@ -122,6 +122,6 @@ class AccessProfileCreator
     public function createPreferences(Access $access)
     {
         $access->setPreferences(new Preferences());
-        $this->entityManager->flush($access);
+        $this->entityManager->flush();
     }
 }