The expression return $role could return the type Jenssegers\Mongodb\Eloquent\Model which includes types incompatible with the type-hinted return Modules\Authorization\Entities\Role. Consider adding an additional type-check to rule them out.
Loading history...
26
}
27
28
public function createPermissions(array $permissions): void