public static function parseYamlFile($file): array
    {
        if (file_exists($file)) {
            $data = file_get_contents($file);
            if (!empty($data)) {
                $data = static::replaceEnvVariables($data);
                return Yaml::parse($data);
            }
        }

        return [];
    }
public static function parseYamlFile($file): array
    {
        if (file_exists($file)) {
            $data = file_get_contents($file);
            if (!empty($data)) {
                $data = static::replaceEnvVariables($data);
                return Yaml::parse($data);
            }
        }

        return [];
    }
public static function parseYamlFile ( $ file ) : array { if ( file_exists ( $ file ) ) { $ data = file_get_contents ( $ file ) ; if ( ! empty ( $ data ) ) { $ data = static :: replaceEnvVariables ( $ data ) ; return Yaml :: parse ( $ data ) ; } } return [ ] ; }
Read yaml file and parse content.

@param $file
@return array
@throws Exception
Read yaml file and parse content .