protected function retrieveFiles(string $directory): array
    {
        $files = [];

        foreach (scandir($directory) as $file) {
            $elem = $this->pathHelper->join($directory, $file);

            if (
                $elem != '.' &&
                $elem != '..' &&
                \is_file($elem) &&
                \is_readable($elem) &&
                $this->stringHelper->endsWith($elem, '.yaml')
            ) {
                $files[] = $elem;
            }
        }

        if (count($files) == 0) {
            throw new FileSystemException('Path does not contain any readable yaml files!', 1527452904);
        }

        return $files;
    }