Lines 0.00% 0 / 1
Functions and Methods 0.00% 0 / 1
Classes and Traits 0.00% 0 / 1
Name Lines Functions and Methods CRAP Classes and Traits
ServiceDefinitionCollection 0.00% 0 / 1 0.00% 0 / 1 2 0.00% 0 / 1
 forEntityHandle 0.00% 0 / 1 0.00% 0 / 1 2
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Codegen\Service\Collection;
6
7use Stewart\Codegen\Service\ServiceDefinition;
8use Stewart\Contracts\Collection\ListCollection;
9
10/** @extends ListCollection<ServiceDefinition> */
11final readonly class ServiceDefinitionCollection extends ListCollection
12{
13    public function forEntityHandle(string $domain): self
14    {
15        return $this->filter(static fn(ServiceDefinition $service): bool => $service->belongsOnHandle($domain));
16    }
17}