Lines 0.00% 0 / 5
Functions and Methods 0.00% 0 / 4
Classes and Traits 0.00% 0 / 1
Name Lines Functions and Methods CRAP Classes and Traits
AppTopology 0.00% 0 / 5 0.00% 0 / 4 20 0.00% 0 / 1
 __construct 0.00% 0 / 1 0.00% 0 / 1 2
 getCatalog 0.00% 0 / 1 0.00% 0 / 1 2
 getWorkerSlots 0.00% 0 / 1 0.00% 0 / 1 2
 replaceTopology 0.00% 0 / 2 0.00% 0 / 1 2
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Runtime\Broker;
6
7use Stewart\Runtime\App\AppCatalog;
8use Stewart\Runtime\Broker\Collection\WorkerSlotCollection;
9
10final class AppTopology
11{
12    public function __construct(
13        private AppCatalog $catalog,
14        private WorkerSlotCollection $workerSlots,
15    ) {}
16
17    public function getCatalog(): AppCatalog
18    {
19        return $this->catalog;
20    }
21
22    public function getWorkerSlots(): WorkerSlotCollection
23    {
24        return $this->workerSlots;
25    }
26
27    public function replaceTopology(AppCatalog $catalog, WorkerSlotCollection $workerSlots): void
28    {
29        $this->catalog = $catalog;
30        $this->workerSlots = $workerSlots;
31    }
32}