original_string: public function manipulateVersionString($matches, $position, $increment = 0, $pad = '0')
      {
          for ($i = 4; $i > 0; $i--) {
              if ($i > $position) {
                  $matches[$i] = $pad;
              } elseif ($i == $position && $increment) {
                  $matches[$i] += $increment;
                  // If $matches[$i] was 0, carry the decrement
                  if ($matches[$i] < 0) {
                      $matches[$i] = $pad;
                      $position--;
                      // Return null on a carry overflow
                      if ($i == 1) {
                          return;
                      }
                  }
              }
          }
  
          return $matches[1] . '.' . $matches[2] . '.' . $matches[3] . '.' . $matches[4];
      }
code: public function manipulateVersionString($matches, $position, $increment = 0, $pad = '0')
      {
          for ($i = 4; $i > 0; $i--) {
              if ($i > $position) {
                  $matches[$i] = $pad;
              } elseif ($i == $position && $increment) {
                  $matches[$i] += $increment;
                  // If $matches[$i] was 0, carry the decrement
                  if ($matches[$i] < 0) {
                      $matches[$i] = $pad;
                      $position--;
                      // Return null on a carry overflow
                      if ($i == 1) {
                          return;
                      }
                  }
              }
          }
  
          return $matches[1] . '.' . $matches[2] . '.' . $matches[3] . '.' . $matches[4];
      }
code_tokens: public function manipulateVersionString ( $ matches , $ position , $ increment = 0 , $ pad = '0' ) { for ( $ i = 4 ; $ i > 0 ; $ i -- ) { if ( $ i > $ position ) { $ matches [ $ i ] = $ pad ; } elseif ( $ i == $ position && $ increment ) { $ matches [ $ i ] += $ increment ; // If $matches[$i] was 0, carry the decrement if ( $ matches [ $ i ] < 0 ) { $ matches [ $ i ] = $ pad ; $ position -- ; // Return null on a carry overflow if ( $ i == 1 ) { return ; } } } } return $ matches [ 1 ] . '.' . $ matches [ 2 ] . '.' . $ matches [ 3 ] . '.' . $ matches [ 4 ] ; }
docstring: Increment, decrement, or simply pad a version number.
  
  Support function for {@link parseConstraint()}
  
  @param  array  $matches   Array with version parts in array indexes 1,2,3,4
  @param  int    $position  1,2,3,4 - which segment of the version to decrement
  @param  int    $increment Increment
  @param  string $pad       The string to pad version parts after $position
  @return string The new version
docstring_tokens: Increment decrement or simply pad a version number .