public static function read(string $fileName = '', bool $returnArray = false)
    {
        $pathInfo = \pathinfo(static::normalizePath($fileName));
        if (!isset($pathInfo['extension'])) {
            $exMsg = \sprintf(
                'Config file name "%s" is missing an extension and cannot be auto-detected',
                $pathInfo['filename']
            );

            throw new RuntimeException($exMsg);
        }

        $extension = \strtolower($pathInfo['extension']);
        if (!\in_array($extension, static::$allowedExtensions)) {
            $exMsg = \sprintf(
                'Unsupported config file type. Supported extension types are: %s',
                \implode(',', static::$allowedExtensions)
            );

            throw new RuntimeException($exMsg);
        }

        if (!\file_exists($fileName)) {
            throw new RuntimeException('Config file does not exist');
        }

        if (!isset(static::$readers[$extension]) || !(static::$readers[$extension] instanceof AbstractReader)) {
            static::$readers[$extension] = ReaderManager::get($extension);
        }

        return static::$readers[$extension]->fromFile($fileName, $returnArray);
    }