| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 9 | 
| Code Lines | 4 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 5 | 
| CRAP Score | 2 | 
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); | ||
| 18 | 4 | public function build(string $namespace, array $event): Event | |
| 19 |     { | ||
| 20 | 4 | $eventType = $namespace . '\\' . $event['type']; | |
| 21 | |||
| 22 | 4 |         if (!$this->isValidType($eventType)) { | |
| 23 | 2 | throw new UnknownEventException($event['type']); | |
| 24 | } | ||
| 25 | |||
| 26 | 2 | return new $eventType($event, $this->specialRepositories); | |
| 27 | } | ||
| 34 |