original_string: public function getNextLevel($context = null, $level = null) {
          if (is_null($context)) {
              $context = $this->getContext();
          }
          if (is_null($level)) {
              $level = $this->getLevel($context);
          }
  
          //Get all the levels
          $currentContext = $this->_upgradeStack[$context];
          ksort($currentContext);
          $levels = array_keys($currentContext);
          //Find the index of the current one
          $current = array_search($level, $levels);
  
          //And if it is present, return the next level
          if ($current !== false) {
              $current++;
              if (isset($levels[$current])) return $levels[$current];
          }
  
          //Else return current level +1 (doesn't exist anyway)
          return ++$level;
      }
code: public function getNextLevel($context = null, $level = null) {
          if (is_null($context)) {
              $context = $this->getContext();
          }
          if (is_null($level)) {
              $level = $this->getLevel($context);
          }
  
          //Get all the levels
          $currentContext = $this->_upgradeStack[$context];
          ksort($currentContext);
          $levels = array_keys($currentContext);
          //Find the index of the current one
          $current = array_search($level, $levels);
  
          //And if it is present, return the next level
          if ($current !== false) {
              $current++;
              if (isset($levels[$current])) return $levels[$current];
          }
  
          //Else return current level +1 (doesn't exist anyway)
          return ++$level;
      }
code_tokens: public function getNextLevel ( $ context = null , $ level = null ) { if ( is_null ( $ context ) ) { $ context = $ this -> getContext ( ) ; } if ( is_null ( $ level ) ) { $ level = $ this -> getLevel ( $ context ) ; } //Get all the levels $ currentContext = $ this -> _upgradeStack [ $ context ] ; ksort ( $ currentContext ) ; $ levels = array_keys ( $ currentContext ) ; //Find the index of the current one $ current = array_search ( $ level , $ levels ) ; //And if it is present, return the next level if ( $ current !== false ) { $ current ++ ; if ( isset ( $ levels [ $ current ] ) ) return $ levels [ $ current ] ; } //Else return current level +1 (doesn't exist anyway) return ++ $ level ; }
docstring: Get the next level for a given level and context
  
  When context is null, it will get the current context
  When level is null, it will get the current level
  
  @param type $level
  @param type $context
  @return type
docstring_tokens: Get the next level for a given level and context