| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public static function createFromConfig(array $config): self |
||
| 14 | { |
||
| 15 | $collection = new static(); |
||
| 16 | |||
| 17 | foreach ($config['lists'] as $name => $listProperties) { |
||
| 18 | $collection->push(new NewsletterList($name, $listProperties)); |
||
| 19 | } |
||
| 20 | |||
| 21 | $collection->defaultListName = $config['defaultListName']; |
||
| 22 | |||
| 23 | return $collection; |
||
| 24 | } |
||
| 25 | |||
| 52 |