availableAlgorithms = $availableAlgorithms; $this->sourceSelectionAlgorithmFactory = $sourceSelectionAlgorithmFactory; } /** * @inheritdoc */ public function execute(): array { $algorithmsList = []; foreach ($this->availableAlgorithms as $data) { $algorithmsList[] = $this->sourceSelectionAlgorithmFactory->create([ 'code' => $data['code'], 'title' => $data['title'], 'description' => $data['description'] ]); } return $algorithmsList; } }