src/Mordilion/Configurable/Configuration/Reader/Yaml.php
private function decode(string $yaml): array
    {
        $decoder = $this->getDecoder();

        if ($decoder === null) {
            throw new \RuntimeException('You didn\'t specify a decoder.');
        }

        $data = call_user_func_array($decoder, array_merge([$yaml], $this->getDecoderParameters()));

        if (!is_array($data) && !is_object($data)) {
            throw new \RuntimeException('The provided YAML is not valid.');
        }

        return $data;
    }
private function decode(string $yaml): array
    {
        $decoder = $this->getDecoder();

        if ($decoder === null) {
            throw new \RuntimeException('You didn\'t specify a decoder.');
        }

        $data = call_user_func_array($decoder, array_merge([$yaml], $this->getDecoderParameters()));

        if (!is_array($data) && !is_object($data)) {
            throw new \RuntimeException('The provided YAML is not valid.');
        }

        return $data;
    }
Decodes the provided $yaml into an object or an array.

@param string $yaml

@throws \RuntimeException if a decoder is not specified
@throws \RuntimeException if the provided yaml is not valid

@return array