fix: Strict types interfaces: VoterHelperInterface, ProvideRoleHierarchyInterface and ProvideRoleInterface.

This commit is contained in:
Pol Dellaiera
2021-11-23 10:40:34 +01:00
parent 05dda33a7a
commit 328b4c4596
21 changed files with 187 additions and 255 deletions

View File

@@ -47,7 +47,7 @@ class AccompanyingCourseDocumentVoter extends AbstractChillVoter implements Prov
->build();
}
public function getRoles()
public function getRoles(): array
{
return [
self::CREATE,
@@ -91,13 +91,13 @@ class AccompanyingCourseDocumentVoter extends AbstractChillVoter implements Prov
return $this->voterHelper->voteOnAttribute($attribute, $subject, $token);
}
public function getRolesWithoutScope()
public function getRolesWithoutScope(): array
{
return array();
return [];
}
public function getRolesWithHierarchy()
public function getRolesWithHierarchy(): array
{
return ['accompanyingCourseDocument' => $this->getRoles() ];
return ['accompanyingCourseDocument' => $this->getRoles()];
}
}

View File

@@ -40,7 +40,7 @@ class PersonDocumentVoter extends AbstractChillVoter implements ProvideRoleHiera
->build();
}
public function getRoles()
public function getRoles(): array
{
return [
self::CREATE,
@@ -79,14 +79,13 @@ class PersonDocumentVoter extends AbstractChillVoter implements ProvideRoleHiera
return $this->voterHelper->voteOnAttribute($attribute, $subject, $token);
}
public function getRolesWithoutScope()
public function getRolesWithoutScope(): array
{
return array();
return [];
}
public function getRolesWithHierarchy()
public function getRolesWithHierarchy(): array
{
return ['PersonDocument' => $this->getRoles() ];
return ['PersonDocument' => $this->getRoles()];
}
}