new EndpointData($endpoint), $spec['endpoints'] ); return new Group($spec); } public function has(EndpointData $endpoint) { return boolval(Arr::first($this->endpoints, fn(EndpointData $e) => $e->endpointId() === $endpoint->endpointId())); } }