@@ -21,29 +21,29 @@ |
||
21 | 21 | |
22 | 22 | public function create(RoleModel $roleModel) |
23 | 23 | { |
24 | - $this->cache->forget(RoleCache::class . '@count'); |
|
25 | - $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $roleModel->dataProviderId()); |
|
24 | + $this->cache->forget(RoleCache::class.'@count'); |
|
25 | + $this->cache->forget(RoleCache::class.'@getByDataProviderId:'.$roleModel->dataProviderId()); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public function delete(RoleModel $role) |
29 | 29 | { |
30 | - $this->cache->forget(RoleCache::class . '@count'); |
|
31 | - $this->cache->forget(RoleCache::class . '@getById:' . $role->id()); |
|
32 | - $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $role->dataProviderId()); |
|
33 | - $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $role->groupId()); |
|
34 | - $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $role->positionId()); |
|
30 | + $this->cache->forget(RoleCache::class.'@count'); |
|
31 | + $this->cache->forget(RoleCache::class.'@getById:'.$role->id()); |
|
32 | + $this->cache->forget(RoleCache::class.'@getByDataProviderId:'.$role->dataProviderId()); |
|
33 | + $this->cache->forget(RoleCache::class.'@allThroughGroup:'.$role->groupId()); |
|
34 | + $this->cache->forget(RoleCache::class.'@allThroughPosition:'.$role->positionId()); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | public function update(RoleModel $oldRole, RoleModel $newRole) |
38 | 38 | { |
39 | - $this->cache->forget(RoleCache::class . '@count'); |
|
40 | - $this->cache->forget(RoleCache::class . '@getById:' . $newRole->id()); |
|
41 | - $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $oldRole->dataProviderId()); |
|
42 | - $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $newRole->dataProviderId()); |
|
43 | - $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $oldRole->positionId()); |
|
44 | - $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $newRole->positionId()); |
|
45 | - $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $oldRole->groupId()); |
|
46 | - $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $newRole->groupId()); |
|
39 | + $this->cache->forget(RoleCache::class.'@count'); |
|
40 | + $this->cache->forget(RoleCache::class.'@getById:'.$newRole->id()); |
|
41 | + $this->cache->forget(RoleCache::class.'@getByDataProviderId:'.$oldRole->dataProviderId()); |
|
42 | + $this->cache->forget(RoleCache::class.'@getByDataProviderId:'.$newRole->dataProviderId()); |
|
43 | + $this->cache->forget(RoleCache::class.'@allThroughPosition:'.$oldRole->positionId()); |
|
44 | + $this->cache->forget(RoleCache::class.'@allThroughPosition:'.$newRole->positionId()); |
|
45 | + $this->cache->forget(RoleCache::class.'@allThroughGroup:'.$oldRole->groupId()); |
|
46 | + $this->cache->forget(RoleCache::class.'@allThroughGroup:'.$newRole->groupId()); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | } |
50 | 50 | \ No newline at end of file |
@@ -22,14 +22,14 @@ |
||
22 | 22 | |
23 | 23 | public function addUserToGroup(User $user, Group $group) |
24 | 24 | { |
25 | - $this->cache->forget(UserGroupCache::class . '@getGroupsThroughUser:' . $user->id()); |
|
26 | - $this->cache->forget(UserGroupCache::class . '@getUsersThroughGroup:' . $group->id()); |
|
25 | + $this->cache->forget(UserGroupCache::class.'@getGroupsThroughUser:'.$user->id()); |
|
26 | + $this->cache->forget(UserGroupCache::class.'@getUsersThroughGroup:'.$group->id()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function removeUserFromGroup(User $user, Group $group): void |
30 | 30 | { |
31 | - $this->cache->forget(UserGroupCache::class . '@getGroupsThroughUser:' . $user->id()); |
|
32 | - $this->cache->forget(UserGroupCache::class . '@getUsersThroughGroup:' . $group->id()); |
|
31 | + $this->cache->forget(UserGroupCache::class.'@getGroupsThroughUser:'.$user->id()); |
|
32 | + $this->cache->forget(UserGroupCache::class.'@getUsersThroughGroup:'.$group->id()); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | } |
36 | 36 | \ No newline at end of file |
@@ -22,14 +22,14 @@ |
||
22 | 22 | |
23 | 23 | public function addTagToUser(UserTag $userTag, User $user): void |
24 | 24 | { |
25 | - $this->cache->forget(UserUserTagCache::class . '@getTagsThroughUser:' . $user->id()); |
|
26 | - $this->cache->forget(UserUserTagCache::class . '@getUsersThroughTag:' . $userTag->id()); |
|
25 | + $this->cache->forget(UserUserTagCache::class.'@getTagsThroughUser:'.$user->id()); |
|
26 | + $this->cache->forget(UserUserTagCache::class.'@getUsersThroughTag:'.$userTag->id()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function removeTagFromUser(UserTag $userTag, User $user): void |
30 | 30 | { |
31 | - $this->cache->forget(UserUserTagCache::class . '@getTagsThroughUser:' . $user->id()); |
|
32 | - $this->cache->forget(UserUserTagCache::class . '@getUsersThroughTag:' . $userTag->id()); |
|
31 | + $this->cache->forget(UserUserTagCache::class.'@getTagsThroughUser:'.$user->id()); |
|
32 | + $this->cache->forget(UserUserTagCache::class.'@getUsersThroughTag:'.$userTag->id()); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | } |
36 | 36 | \ No newline at end of file |
@@ -22,14 +22,14 @@ |
||
22 | 22 | |
23 | 23 | public function addTagToRole(RoleTag $roleTag, Role $role): void |
24 | 24 | { |
25 | - $this->cache->forget(RoleRoleTagCache::class . '@getTagsThroughRole:' . $role->id()); |
|
26 | - $this->cache->forget(RoleRoleTagCache::class . '@getRolesThroughTag:' . $roleTag->id()); |
|
25 | + $this->cache->forget(RoleRoleTagCache::class.'@getTagsThroughRole:'.$role->id()); |
|
26 | + $this->cache->forget(RoleRoleTagCache::class.'@getRolesThroughTag:'.$roleTag->id()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function removeTagFromRole(RoleTag $roleTag, Role $role): void |
30 | 30 | { |
31 | - $this->cache->forget(RoleRoleTagCache::class . '@getTagsThroughRole:' . $role->id()); |
|
32 | - $this->cache->forget(RoleRoleTagCache::class . '@getRolesThroughTag:' . $roleTag->id()); |
|
31 | + $this->cache->forget(RoleRoleTagCache::class.'@getTagsThroughRole:'.$role->id()); |
|
32 | + $this->cache->forget(RoleRoleTagCache::class.'@getRolesThroughTag:'.$roleTag->id()); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | } |
36 | 36 | \ No newline at end of file |
@@ -22,14 +22,14 @@ |
||
22 | 22 | |
23 | 23 | public function addTagToPosition(PositionTag $positionTag, Position $position): void |
24 | 24 | { |
25 | - $this->cache->forget(PositionPositionTagCache::class . '@getTagsThroughPosition:' . $position->id()); |
|
26 | - $this->cache->forget(PositionPositionTagCache::class . '@getPositionsThroughTag:' . $positionTag->id()); |
|
25 | + $this->cache->forget(PositionPositionTagCache::class.'@getTagsThroughPosition:'.$position->id()); |
|
26 | + $this->cache->forget(PositionPositionTagCache::class.'@getPositionsThroughTag:'.$positionTag->id()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function removeTagFromPosition(PositionTag $positionTag, Position $position): void |
30 | 30 | { |
31 | - $this->cache->forget(PositionPositionTagCache::class . '@getTagsThroughPosition:' . $position->id()); |
|
32 | - $this->cache->forget(PositionPositionTagCache::class . '@getPositionsThroughTag:' . $positionTag->id()); |
|
31 | + $this->cache->forget(PositionPositionTagCache::class.'@getTagsThroughPosition:'.$position->id()); |
|
32 | + $this->cache->forget(PositionPositionTagCache::class.'@getPositionsThroughTag:'.$positionTag->id()); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | } |
36 | 36 | \ No newline at end of file |
@@ -22,14 +22,14 @@ |
||
22 | 22 | |
23 | 23 | public function addTagToGroup(GroupTag $groupTag, Group $group): void |
24 | 24 | { |
25 | - $this->cache->forget(GroupGroupTagCache::class . '@getTagsThroughGroup:' . $group->id()); |
|
26 | - $this->cache->forget(GroupGroupTagCache::class . '@getGroupsThroughTag:' . $groupTag->id()); |
|
25 | + $this->cache->forget(GroupGroupTagCache::class.'@getTagsThroughGroup:'.$group->id()); |
|
26 | + $this->cache->forget(GroupGroupTagCache::class.'@getGroupsThroughTag:'.$groupTag->id()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function removeTagFromGroup(GroupTag $groupTag, Group $group): void |
30 | 30 | { |
31 | - $this->cache->forget(GroupGroupTagCache::class . '@getTagsThroughGroup:' . $group->id()); |
|
32 | - $this->cache->forget(GroupGroupTagCache::class . '@getGroupsThroughTag:' . $groupTag->id()); |
|
31 | + $this->cache->forget(GroupGroupTagCache::class.'@getTagsThroughGroup:'.$group->id()); |
|
32 | + $this->cache->forget(GroupGroupTagCache::class.'@getGroupsThroughTag:'.$groupTag->id()); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | } |
36 | 36 | \ No newline at end of file |
@@ -22,14 +22,14 @@ |
||
22 | 22 | |
23 | 23 | public function addUserToRole(User $user, Role $role) |
24 | 24 | { |
25 | - $this->cache->forget(UserRoleCache::class . '@getRolesThroughUser:' . $user->id()); |
|
26 | - $this->cache->forget(UserRoleCache::class . '@getUsersThroughRole:' . $role->id()); |
|
25 | + $this->cache->forget(UserRoleCache::class.'@getRolesThroughUser:'.$user->id()); |
|
26 | + $this->cache->forget(UserRoleCache::class.'@getUsersThroughRole:'.$role->id()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function removeUserFromRole(User $user, Role $role): void |
30 | 30 | { |
31 | - $this->cache->forget(UserRoleCache::class . '@getRolesThroughUser:' . $user->id()); |
|
32 | - $this->cache->forget(UserRoleCache::class . '@getUsersThroughRole:' . $role->id()); |
|
31 | + $this->cache->forget(UserRoleCache::class.'@getRolesThroughUser:'.$user->id()); |
|
32 | + $this->cache->forget(UserRoleCache::class.'@getUsersThroughRole:'.$role->id()); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | } |
36 | 36 | \ No newline at end of file |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | public function attach($notifier, $observer): void |
11 | 11 | { |
12 | - if(!array_key_exists($notifier, $this->observers)) { |
|
12 | + if (!array_key_exists($notifier, $this->observers)) { |
|
13 | 13 | $this->observers[$notifier] = []; |
14 | 14 | } |
15 | 15 | $this->observers[$notifier][] = $observer; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | public function forNotifier($notifier): array |
28 | 28 | { |
29 | - if(array_key_exists($notifier, $this->observers)) { |
|
29 | + if (array_key_exists($notifier, $this->observers)) { |
|
30 | 30 | return $this->observers[$notifier]; |
31 | 31 | } |
32 | 32 | return []; |
@@ -32,9 +32,9 @@ |
||
32 | 32 | |
33 | 33 | public function notify($method, ...$params) |
34 | 34 | { |
35 | - foreach($this->observerStore->forNotifier($this->notifier) as $notifierClass) { |
|
35 | + foreach ($this->observerStore->forNotifier($this->notifier) as $notifierClass) { |
|
36 | 36 | $notifier = app($notifierClass); |
37 | - if(method_exists($notifier, $method)) { |
|
37 | + if (method_exists($notifier, $method)) { |
|
38 | 38 | $notifier->{$method}(...$params); |
39 | 39 | } |
40 | 40 | } |