Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function assign(SectionableInterface $sectionsAware, array $sectionsCodes): void |
||
29 | { |
||
30 | foreach ($sectionsCodes as $sectionCode) { |
||
31 | /** @var SectionInterface|null $section */ |
||
32 | $section = $this->sectionRepository->findOneBy(['code' => $sectionCode]); |
||
33 | |||
34 | Assert::notNull($section, sprintf('Section with %s code not found.', $sectionCode)); |
||
35 | $sectionsAware->addSection($section); |
||
|
|||
36 | } |
||
39 |