private static function checkType(string $file): string
    {
        $parts = explode('.', $file);
        $type = array_pop($parts);

        if (!in_array($type, array_keys(self::$types))) {
            throw new LoaderException("Loader::checkType(): Could not find parser for {$file}!");
        }

        return $type;
    }
private static function checkType(string $file): string
    {
        $parts = explode('.', $file);
        $type = array_pop($parts);

        if (!in_array($type, array_keys(self::$types))) {
            throw new LoaderException("Loader::checkType(): Could not find parser for {$file}!");
        }

        return $type;
    }
private static function checkType ( string $ file ) : string { $ parts = explode ( '.' , $ file ) ; $ type = array_pop ( $ parts ) ; if ( ! in_array ( $ type , array_keys ( self :: $ types ) ) ) { throw new LoaderException ( "Loader::checkType(): Could not find parser for {$file}!" ) ; } return $ type ; }
Check file if extension matches a loader.

@param string $file
@return string
@throws LoaderException
Check file if extension matches a loader .