original_string: public function getRegisteredParsers()
      {
          if ($this->parserInstances === null) {
              $result = [];
              foreach ($this->parsers as $parser) {
                  if ($parser instanceof ParserInterface) {
                      $result[] = $parser;
                  } else {
                      $instance = $this->app->make($parser);
                      if (!($instance instanceof ParserInterface)) {
                          throw new UserMessageException(t(/*i18n: %1$s is the name of a PHP class, %2$s is the name of a PHP interface*/'%1$s does not implement %2$s', $parser, ParserInterface::class));
                      }
                      $result[] = $instance;
                  }
              }
              $this->parserInstances = $result;
          } else {
              $result = $this->parserInstances;
          }
  
          return $result;
      }
code: public function getRegisteredParsers()
      {
          if ($this->parserInstances === null) {
              $result = [];
              foreach ($this->parsers as $parser) {
                  if ($parser instanceof ParserInterface) {
                      $result[] = $parser;
                  } else {
                      $instance = $this->app->make($parser);
                      if (!($instance instanceof ParserInterface)) {
                          throw new UserMessageException(t(/*i18n: %1$s is the name of a PHP class, %2$s is the name of a PHP interface*/'%1$s does not implement %2$s', $parser, ParserInterface::class));
                      }
                      $result[] = $instance;
                  }
              }
              $this->parserInstances = $result;
          } else {
              $result = $this->parserInstances;
          }
  
          return $result;
      }
code_tokens: public function getRegisteredParsers ( ) { if ( $ this -> parserInstances === null ) { $ result = [ ] ; foreach ( $ this -> parsers as $ parser ) { if ( $ parser instanceof ParserInterface ) { $ result [ ] = $ parser ; } else { $ instance = $ this -> app -> make ( $ parser ) ; if ( ! ( $ instance instanceof ParserInterface ) ) { throw new UserMessageException ( t ( /*i18n: %1$s is the name of a PHP class, %2$s is the name of a PHP interface*/ '%1$s does not implement %2$s' , $ parser , ParserInterface :: class ) ) ; } $ result [ ] = $ instance ; } } $ this -> parserInstances = $ result ; } else { $ result = $ this -> parserInstances ; } return $ result ; }
docstring: Get the list of registered parsers.
  
  @throws UserMessageException
  
  @return ParserInterface[]
docstring_tokens: Get the list of registered parsers .