original_string: public function parse($string, Banking\Mt940\Engine $engine = null)
      {
          if (!empty($string)) {
              // load engine
              if ($engine === null) {
                  $engine = Banking\Mt940\Engine::__getInstance($string);
              }
  
              $this->engine = $engine;
  
              if ($this->engine instanceof Banking\Mt940\Engine) {
                  // parse using the engine
                  $this->engine->loadString($string);
  
                  return $this->engine->parse();
              }
          }
  
          return [];
      }
code: public function parse($string, Banking\Mt940\Engine $engine = null)
      {
          if (!empty($string)) {
              // load engine
              if ($engine === null) {
                  $engine = Banking\Mt940\Engine::__getInstance($string);
              }
  
              $this->engine = $engine;
  
              if ($this->engine instanceof Banking\Mt940\Engine) {
                  // parse using the engine
                  $this->engine->loadString($string);
  
                  return $this->engine->parse();
              }
          }
  
          return [];
      }
code_tokens: public function parse ( $ string , Banking \ Mt940 \ Engine $ engine = null ) { if ( ! empty ( $ string ) ) { // load engine if ( $ engine === null ) { $ engine = Banking \ Mt940 \ Engine :: __getInstance ( $ string ) ; } $ this -> engine = $ engine ; if ( $ this -> engine instanceof Banking \ Mt940 \ Engine ) { // parse using the engine $ this -> engine -> loadString ( $ string ) ; return $ this -> engine -> parse ( ) ; } } return [ ] ; }
docstring: Parse the given string into an array of Banking\Statement objects.
  
  @param string $string
  @param Banking\Mt940\Engine $engine
  
  @return \Kingsquare\Banking\Statement[]
docstring_tokens: Parse the given string into an array of Banking \ Statement objects .