code: private function getParser(string $extension): ParserInterface
      {
          switch (true) {
              case $extension === 'json':
                  return new JsonParser();
              case $extension[0] === 'i':
                  return new IniParser();
              default:
                  return new YamlParser();
          }
      }
docs: @param string $extension
  
  @return ParserInterface