original_string: public function increment($part)
      {
          foreach (array_reverse(self::$ordinality) as $currentPart) {
              if ($currentPart === $part) {
                  switch ($part) {
                      case self::STABILITY:
                          $this->set(
                              $currentPart, 
                              self::$stabilities[
                                  array_search(
                                      $this->get($currentPart), 
                                      self::$stabilities
                                  ) +1
                              ]
                          );
                          break;
                      default:
                          $this->set($currentPart, $this->get($currentPart) +1);
                          break;
                  }
                  break;
              } else {
                  switch ($currentPart) {
                      case self::STABILITY_NO:
                          $this->set($currentPart, null);
                          break;
                      case self::STABILITY:
                          $this->set($currentPart, 'dev');
                          break;
                      default:
                          $this->set($currentPart, '0');
                  }
              }
          }
  
          return $this;
      }
code: public function increment($part)
      {
          foreach (array_reverse(self::$ordinality) as $currentPart) {
              if ($currentPart === $part) {
                  switch ($part) {
                      case self::STABILITY:
                          $this->set(
                              $currentPart, 
                              self::$stabilities[
                                  array_search(
                                      $this->get($currentPart), 
                                      self::$stabilities
                                  ) +1
                              ]
                          );
                          break;
                      default:
                          $this->set($currentPart, $this->get($currentPart) +1);
                          break;
                  }
                  break;
              } else {
                  switch ($currentPart) {
                      case self::STABILITY_NO:
                          $this->set($currentPart, null);
                          break;
                      case self::STABILITY:
                          $this->set($currentPart, 'dev');
                          break;
                      default:
                          $this->set($currentPart, '0');
                  }
              }
          }
  
          return $this;
      }
code_tokens: public function increment ( $ part ) { foreach ( array_reverse ( self :: $ ordinality ) as $ currentPart ) { if ( $ currentPart === $ part ) { switch ( $ part ) { case self :: STABILITY : $ this -> set ( $ currentPart , self :: $ stabilities [ array_search ( $ this -> get ( $ currentPart ) , self :: $ stabilities ) + 1 ] ) ; break ; default : $ this -> set ( $ currentPart , $ this -> get ( $ currentPart ) + 1 ) ; break ; } break ; } else { switch ( $ currentPart ) { case self :: STABILITY_NO : $ this -> set ( $ currentPart , null ) ; break ; case self :: STABILITY : $ this -> set ( $ currentPart , 'dev' ) ; break ; default : $ this -> set ( $ currentPart , '0' ) ; } } } return $ this ; }
docstring: Increment a specific part of the version.
  
  E.g.:
  incrementing "stability" of "2.0.0-alpha.4" would b
  
  @param string $part
  @return $this
docstring_tokens: Increment a specific part of the version .