original_string: public function add(View $view)
      {
          // Append to the stack.
          $this->stack->append($view);
  
          if ($view->getType() === View::PART_BODY_PLACEHOLDER) {
              $this->bodyKey = (count($this->stack) - 1);
          }
  
          return count($this->stack);
      }
code: public function add(View $view)
      {
          // Append to the stack.
          $this->stack->append($view);
  
          if ($view->getType() === View::PART_BODY_PLACEHOLDER) {
              $this->bodyKey = (count($this->stack) - 1);
          }
  
          return count($this->stack);
      }
code_tokens: public function add ( View $ view ) { // Append to the stack. $ this -> stack -> append ( $ view ) ; if ( $ view -> getType ( ) === View :: PART_BODY_PLACEHOLDER ) { $ this -> bodyKey = ( count ( $ this -> stack ) - 1 ) ; } return count ( $ this -> stack ) ; }
docstring: Add a view instance to the stack.
  
  @param View $view The view to add to the stack.
  @return int number of views in the stack.
docstring_tokens: Add a view instance to the stack .