public function appendCollectionAttributes(
        array $data,
        ErrorCollection $error,
        string $format,
        array $context
    ): array {
        $innerError = new ErrorResource(
            $error->getMessage(),
            $error->getReason(),
            $error->getPath(),
            $error->getAttributes(),
            $error->getIdentifier()
        );

        foreach ($error->getRelations() as $relation) {
            $innerError->addRelation($relation);
        }

        $normalizedInnerError = $this->normalizer->normalize($innerError, $format, $context);

        return array_merge($normalizedInnerError, $data);
    }
public function appendCollectionAttributes(
        array $data,
        ErrorCollection $error,
        string $format,
        array $context
    ): array {
        $innerError = new ErrorResource(
            $error->getMessage(),
            $error->getReason(),
            $error->getPath(),
            $error->getAttributes(),
            $error->getIdentifier()
        );

        foreach ($error->getRelations() as $relation) {
            $innerError->addRelation($relation);
        }

        $normalizedInnerError = $this->normalizer->normalize($innerError, $format, $context);

        return array_merge($normalizedInnerError, $data);
    }
public function appendCollectionAttributes ( array $ data , ErrorCollection $ error , string $ format , array $ context ) : array { $ innerError = new ErrorResource ( $ error -> getMessage ( ) , $ error -> getReason ( ) , $ error -> getPath ( ) , $ error -> getAttributes ( ) , $ error -> getIdentifier ( ) ) ; foreach ( $ error -> getRelations ( ) as $ relation ) { $ innerError -> addRelation ( $ relation ) ; } $ normalizedInnerError = $ this -> normalizer -> normalize ( $ innerError , $ format , $ context ) ; return array_merge ( $ normalizedInnerError , $ data ) ; }
Append collection attributes to

@param array           $data
@param ErrorCollection $error
@param string          $format
@param array           $context

@return array
Append collection attributes to