original_string: protected function getVersion()
      {
          // Get version from tag
          $cmd = new Command('git');
          $cmd = $cmd->arg('tag')
              ->execute();
          $output = explode(PHP_EOL, trim($cmd->getOutput()));
          $currentVersion = '0.0.0';
          foreach ($output as $tag) {
              if (preg_match(SemanticVersion::REGEX, $tag)) {
                  if (version_compare($currentVersion, $tag, '<')) {
                      $currentVersion = $tag;
                  }
              }
          }
          return new SemanticVersion($currentVersion);
      }
code: protected function getVersion()
      {
          // Get version from tag
          $cmd = new Command('git');
          $cmd = $cmd->arg('tag')
              ->execute();
          $output = explode(PHP_EOL, trim($cmd->getOutput()));
          $currentVersion = '0.0.0';
          foreach ($output as $tag) {
              if (preg_match(SemanticVersion::REGEX, $tag)) {
                  if (version_compare($currentVersion, $tag, '<')) {
                      $currentVersion = $tag;
                  }
              }
          }
          return new SemanticVersion($currentVersion);
      }
code_tokens: protected function getVersion ( ) { // Get version from tag $ cmd = new Command ( 'git' ) ; $ cmd = $ cmd -> arg ( 'tag' ) -> execute ( ) ; $ output = explode ( PHP_EOL , trim ( $ cmd -> getOutput ( ) ) ) ; $ currentVersion = '0.0.0' ; foreach ( $ output as $ tag ) { if ( preg_match ( SemanticVersion :: REGEX , $ tag ) ) { if ( version_compare ( $ currentVersion , $ tag , '<' ) ) { $ currentVersion = $ tag ; } } } return new SemanticVersion ( $ currentVersion ) ; }
docstring: Return current version
  
  @return SemanticVersion
docstring_tokens: Return current version