* @return Dance
*/
public function addUser(User $user): Dance {
+ //Add from owning side
+ $user->addDance($this);
+
$this->users[] = $user;
return $this;
* @return bool
*/
public function removeUser(User $user): bool {
+ if (!$this->dances->contains($user)) {
+ return true;
+ }
+
+ //Remove from owning side
+ $user->removeDance($this);
+
return $this->users->removeElement($user);
}