public function prepareRightsArray(array $rights, array $roles)
    {
        $preparedRightsArray = [];

        foreach ($rights as $key => $right) {
            $preparedRights = $right;
            $preparedRights['role'] = $roles[$key];
            $preparedRightsArray[] = $preparedRights;
        }

        return $preparedRightsArray;
    }
public function prepareRightsArray(array $rights, array $roles)
    {
        $preparedRightsArray = [];

        foreach ($rights as $key => $right) {
            $preparedRights = $right;
            $preparedRights['role'] = $roles[$key];
            $preparedRightsArray[] = $preparedRights;
        }

        return $preparedRightsArray;
    }
public function prepareRightsArray ( array $ rights , array $ roles ) { $ preparedRightsArray = [ ] ; foreach ( $ rights as $ key => $ right ) { $ preparedRights = $ right ; $ preparedRights [ 'role' ] = $ roles [ $ key ] ; $ preparedRightsArray [ ] = $ preparedRights ; } return $ preparedRightsArray ; }
Appends a role list to a right array.

@param array $rights
@param array $roles

@return array
Appends a role list to a right array .