original_string: protected function isValid($item)
      {
          if ((!$item instanceof stdClass)
              || !isset($item->type)
              || !isset($item->modifiers)
          ) {
              return false;
          }
  
          if ($this->doctypeValidationEnabled) {
              if (!isset($item->content)
                  && (! $this->view->plugin('doctype')->isHtml5()
                  || (! $this->view->plugin('doctype')->isHtml5() && $item->type !== 'charset'))
              ) {
                  return false;
              }
  
              // <meta itemprop= ... /> is only supported with doctype html
              if (! $this->view->plugin('doctype')->isHtml5()
                  && $item->type === 'itemprop'
              ) {
                  return false;
              }
  
              // <meta property= ... /> is only supported with doctype RDFa
              if (!$this->view->plugin('doctype')->isRdfa()
                  && $item->type === 'property'
              ) {
                  return false;
              }
          }
  
          return true;
      }
code: protected function isValid($item)
      {
          if ((!$item instanceof stdClass)
              || !isset($item->type)
              || !isset($item->modifiers)
          ) {
              return false;
          }
  
          if ($this->doctypeValidationEnabled) {
              if (!isset($item->content)
                  && (! $this->view->plugin('doctype')->isHtml5()
                  || (! $this->view->plugin('doctype')->isHtml5() && $item->type !== 'charset'))
              ) {
                  return false;
              }
  
              // <meta itemprop= ... /> is only supported with doctype html
              if (! $this->view->plugin('doctype')->isHtml5()
                  && $item->type === 'itemprop'
              ) {
                  return false;
              }
  
              // <meta property= ... /> is only supported with doctype RDFa
              if (!$this->view->plugin('doctype')->isRdfa()
                  && $item->type === 'property'
              ) {
                  return false;
              }
          }
  
          return true;
      }
code_tokens: protected function isValid ( $ item ) { if ( ( ! $ item instanceof stdClass ) || ! isset ( $ item -> type ) || ! isset ( $ item -> modifiers ) ) { return false ; } if ( $ this -> doctypeValidationEnabled ) { if ( ! isset ( $ item -> content ) && ( ! $ this -> view -> plugin ( 'doctype' ) -> isHtml5 ( ) || ( ! $ this -> view -> plugin ( 'doctype' ) -> isHtml5 ( ) && $ item -> type !== 'charset' ) ) ) { return false ; } // <meta itemprop= ... /> is only supported with doctype html if ( ! $ this -> view -> plugin ( 'doctype' ) -> isHtml5 ( ) && $ item -> type === 'itemprop' ) { return false ; } // <meta property= ... /> is only supported with doctype RDFa if ( ! $ this -> view -> plugin ( 'doctype' ) -> isRdfa ( ) && $ item -> type === 'property' ) { return false ; } } return true ; }
docstring: Determine if item is valid
  
  @param  mixed $item
  @return bool
docstring_tokens: Determine if item is valid