original_string: public function hasGroup($associated) : bool
      {
          $associated_id = $associated instanceof $this ? $associated->id : $associated;
  
          return !! $this->group()->where('associated_id', $associated_id)->exists();
      }
code: public function hasGroup($associated) : bool
      {
          $associated_id = $associated instanceof $this ? $associated->id : $associated;
  
          return !! $this->group()->where('associated_id', $associated_id)->exists();
      }
code_tokens: public function hasGroup ( $ associated ) : bool { $ associated_id = $ associated instanceof $ this ? $ associated -> id : $ associated ; return ! ! $ this -> group ( ) -> where ( 'associated_id' , $ associated_id ) -> exists ( ) ; }
docstring: Checks whether the given product has the associated product in its group.
  
  @param  self|int $associated
  
  @return boolean
docstring_tokens: Checks whether the given product has the associated product in its group .