protected function loadFile(string $file, array $options)
    {
        $yaml = file_get_contents($file);

        // Workaround for the bad practise of PHP extensions to trigger a warning and return false.
        error_clear_last();

        $unused = null;

        $data = @yaml_parse(
            $yaml,
            $options['pos'] ?? 0,
            $unused,
            $options['callbacks'] ?? []
        );

        return $data;
    }
protected function loadFile(string $file, array $options)
    {
        $yaml = file_get_contents($file);

        // Workaround for the bad practise of PHP extensions to trigger a warning and return false.
        error_clear_last();

        $unused = null;

        $data = @yaml_parse(
            $yaml,
            $options['pos'] ?? 0,
            $unused,
            $options['callbacks'] ?? []
        );

        return $data;
    }
protected function loadFile ( string $ file , array $ options ) { $ yaml = file_get_contents ( $ file ) ; // Workaround for the bad practise of PHP extensions to trigger a warning and return false. error_clear_last ( ) ; $ unused = null ; $ data = @ yaml_parse ( $ yaml , $ options [ 'pos' ] ?? 0 , $ unused , $ options [ 'callbacks' ] ?? [ ] ) ; return $ data ; }
Parse a yaml file.

{@internal yaml_parse_file don't handle PHP streams well and yaml_parse_url is very strict with ---}

@param string $file
@param array  $options
@return array|mixed
Parse a yaml file .