Rapsys Git
/
airbundle
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8236821
)
Fix dance user add/remove from inverse side
author
Raphaël Gertz
<git@rapsys.eu>
Tue, 27 Feb 2024 15:29:45 +0000
(16:29 +0100)
committer
Raphaël Gertz
<git@rapsys.eu>
Tue, 27 Feb 2024 15:29:45 +0000
(16:29 +0100)
Entity/Dance.php
patch
|
blob
|
history
diff --git
a/Entity/Dance.php
b/Entity/Dance.php
index 8d83062901439c9a72b02a88da5c5f7da43f1b7b..796b81f20798f80239fca9dee7fee51ced9ce337 100644
(file)
--- a/
Entity/Dance.php
+++ b/
Entity/Dance.php
@@
-210,7
+210,7
@@
class Dance {
*/
public function addUser(User $user): Dance {
//Add from owning side
*/
public function addUser(User $user): Dance {
//Add from owning side
- $user->add
Subscriber
($this);
+ $user->add
Dance
($this);
$this->users[] = $user;
$this->users[] = $user;
@@
-225,12
+225,12
@@
class Dance {
* @return bool
*/
public function removeUser(User $user): bool {
* @return bool
*/
public function removeUser(User $user): bool {
- if (!$this->
user
s->contains($user)) {
+ if (!$this->
dance
s->contains($user)) {
return true;
}
//Remove from owning side
return true;
}
//Remove from owning side
- $user->remove
Subscriber
($this);
+ $user->remove
Dance
($this);
return $this->users->removeElement($user);
}
return $this->users->removeElement($user);
}