original_string: public function validateTree()
      {
          if (!$this->showTree) {
              return;
          }
  
          $this->showSorting = $this->showPagination = false;
  
          if (!$this->model->methodExists('getChildren')) {
              throw new ApplicationException(
                  'To display list as a tree, the specified model must have a method "getChildren"'
              );
          }
  
          if (!$this->model->methodExists('getChildCount')) {
              throw new ApplicationException(
                  'To display list as a tree, the specified model must have a method "getChildCount"'
              );
          }
      }
code: public function validateTree()
      {
          if (!$this->showTree) {
              return;
          }
  
          $this->showSorting = $this->showPagination = false;
  
          if (!$this->model->methodExists('getChildren')) {
              throw new ApplicationException(
                  'To display list as a tree, the specified model must have a method "getChildren"'
              );
          }
  
          if (!$this->model->methodExists('getChildCount')) {
              throw new ApplicationException(
                  'To display list as a tree, the specified model must have a method "getChildCount"'
              );
          }
      }
code_tokens: public function validateTree ( ) { if ( ! $ this -> showTree ) { return ; } $ this -> showSorting = $ this -> showPagination = false ; if ( ! $ this -> model -> methodExists ( 'getChildren' ) ) { throw new ApplicationException ( 'To display list as a tree, the specified model must have a method "getChildren"' ) ; } if ( ! $ this -> model -> methodExists ( 'getChildCount' ) ) { throw new ApplicationException ( 'To display list as a tree, the specified model must have a method "getChildCount"' ) ; } }
docstring: Validates the model and settings if showTree is used
  @return void
docstring_tokens: Validates the model and settings if showTree is used