code: public function hasClass(string $name) : bool
      {
          return $this->getAttribute('class') ? in_array($name, explode(' ', $this->getAttribute('class'))) : false;
      }
docs: @param string $name
  
  @return bool