$clientNames * @param list $groupNames */ public function __construct( public array $clientNames = [], public array $groupNames = [], ) {} public function isEmpty(): bool { return $this->clientNames === [] && $this->groupNames === []; } /** * @return array{clients: list, groups: list, empty: bool} */ public function toArray(): array { return [ 'clients' => $this->clientNames, 'groups' => $this->groupNames, 'empty' => $this->isEmpty(), ]; } }