Closed svycka closed 5 years ago
here https://github.com/ZF-Commons/zfc-rbac/blob/develop/src/Role/HierarchicalRoleInterface.php#L36 maybe we could change the return type to iterable?
iterable
public function getChildren(): array; // to public function getChildren(): iterable;
Then when working with doctrine I could just return ArrayCollection, but now I have to do this:
public function getChildren(): array { return $this->children->toArray(); }
Sounds reasonable
here https://github.com/ZF-Commons/zfc-rbac/blob/develop/src/Role/HierarchicalRoleInterface.php#L36 maybe we could change the return type to
iterable
?Then when working with doctrine I could just return ArrayCollection, but now I have to do this: