*/ public function all(): array { return [ $this->restoreExecuteAdapter, $this->environmentReviewComposeAdapter, $this->evidenceSnapshotAdapter, $this->reviewPackAdapter, $this->inventorySyncAdapter, $this->baselineCaptureAdapter, $this->backupScheduleExecutionAdapter, ]; } /** * @return array */ public function supportedTypes(): array { return array_values(array_unique(array_merge( $this->restoreExecuteAdapter->supportedTypes(), $this->environmentReviewComposeAdapter->supportedTypes(), $this->evidenceSnapshotAdapter->supportedTypes(), $this->reviewPackAdapter->supportedTypes(), $this->inventorySyncAdapter->supportedTypes(), $this->baselineCaptureAdapter->supportedTypes(), $this->backupScheduleExecutionAdapter->supportedTypes(), ))); } public function forType(string $type): ?OperationRunReconciliationAdapter { foreach ($this->all() as $adapter) { if ($adapter->supportsType($type)) { return $adapter; } } return null; } }