protected function readConfig(string $path): array
    {
        if (! is_readable($path)) {
            throw new DefinitionProviderException(sprintf('File "%s" with definition is not readable.', $path));
        }

        $content = file_get_contents($path);
        $config  = $this->parser->parse($content);
        $schema  = $this->getSchema();

        return $this->processor->process($schema, [$config]);
    }