1 | <?php |
||
10 | class SynchronousJobDistributor implements JobDistributorInterface |
||
11 | { |
||
12 | private $worker; |
||
13 | private $result; |
||
14 | |||
15 | 4 | public function __construct(Worker $worker) |
|
20 | |||
21 | 4 | public function perform(Interval $interval): void |
|
22 | { |
||
23 | 4 | $result = $this->worker->validateConsistency($interval); |
|
24 | 4 | if ($result->areInconsistenciesFound()) { |
|
25 | 3 | $this->result->includeFrom($result); |
|
26 | } |
||
27 | 4 | } |
|
28 | |||
29 | 4 | public function collectResults(): InconsistenciesResult |
|
33 | } |
||
34 |