original_string: public function compare(DocumentationEntity $other)
      {
          $v1 = $this->getVersion();
          $v2 = $other->getVersion();
  
          // Normalise versions prior to comparison
          $dots = substr_count($v1, '.') - substr_count($v2, '.');
          while ($dots > 0) {
              $dots--;
              $v2 .= '.99999';
          }
          while ($dots < 0) {
              $dots++;
              $v1 .= '.99999';
          }
          return version_compare($v1, $v2);
      }
code: public function compare(DocumentationEntity $other)
      {
          $v1 = $this->getVersion();
          $v2 = $other->getVersion();
  
          // Normalise versions prior to comparison
          $dots = substr_count($v1, '.') - substr_count($v2, '.');
          while ($dots > 0) {
              $dots--;
              $v2 .= '.99999';
          }
          while ($dots < 0) {
              $dots++;
              $v1 .= '.99999';
          }
          return version_compare($v1, $v2);
      }
code_tokens: public function compare ( DocumentationEntity $ other ) { $ v1 = $ this -> getVersion ( ) ; $ v2 = $ other -> getVersion ( ) ; // Normalise versions prior to comparison $ dots = substr_count ( $ v1 , '.' ) - substr_count ( $ v2 , '.' ) ; while ( $ dots > 0 ) { $ dots -- ; $ v2 .= '.99999' ; } while ( $ dots < 0 ) { $ dots ++ ; $ v1 .= '.99999' ; } return version_compare ( $ v1 , $ v2 ) ; }
docstring: Returns an integer value based on if a given version is the latest
  version. Will return -1 for if the version is older, 0 if versions are
  the same and 1 if the version is greater than.
  
  @param  DocumentationEntity $other
  @return int
docstring_tokens: Returns an integer value based on if a given version is the latest version . Will return - 1 for if the version is older 0 if versions are the same and 1 if the version is greater than .