mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-01-15 22:01:23 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -57,7 +57,7 @@ class PermissionsGroup
|
||||
$this->groupCenters = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function addRoleScope(RoleScope $roleScope)
|
||||
public function addRoleScope(RoleScope $roleScope): void
|
||||
{
|
||||
$this->roleScopes->add($roleScope);
|
||||
}
|
||||
@@ -65,7 +65,7 @@ class PermissionsGroup
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getFlags()
|
||||
public function getFlags(): array
|
||||
{
|
||||
return $this->flags;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ class PermissionsGroup
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ class PermissionsGroup
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ class PermissionsGroup
|
||||
* Test that a role scope is associated only once
|
||||
* with the permission group.
|
||||
*/
|
||||
public function isRoleScopePresentOnce(ExecutionContextInterface $context)
|
||||
public function isRoleScopePresentOnce(ExecutionContextInterface $context): void
|
||||
{
|
||||
$roleScopesId = array_map(
|
||||
static fn (RoleScope $roleScope) => $roleScope->getId(),
|
||||
@@ -115,7 +115,7 @@ class PermissionsGroup
|
||||
/**
|
||||
* @throws \RuntimeException if the roleScope could not be removed
|
||||
*/
|
||||
public function removeRoleScope(RoleScope $roleScope)
|
||||
public function removeRoleScope(RoleScope $roleScope): void
|
||||
{
|
||||
$result = $this->roleScopes->removeElement($roleScope);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user