code: public static function shouldBeTogether(Tag $first, Tag $second)
      {
          $firstName = $first->getName();
          $secondName = $second->getName();
  
          if ($firstName === $secondName) {
              return true;
          }
  
          foreach (self::$groups as $group) {
              if (\in_array($firstName, $group, true) && \in_array($secondName, $group, true)) {
                  return true;
              }
          }
  
          return false;
      }
docs: Should the given tags be kept together, or kept apart?
  
  @param Tag $first
  @param Tag $second
  
  @return bool