| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 17 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 19 | public function getByClassName(string $className): PrintRequest\Parameter  | 
            ||
| 20 |     { | 
            ||
| 21 |         if (!$this->container->has($className)) { | 
            ||
| 22 |             throw new DomainException('Parameter Entity does not exists: ' . $className); | 
            ||
| 23 | }  | 
            ||
| 24 | |||
| 25 |         try { | 
            ||
| 26 | $instance = $this->container->get($className);  | 
            ||
| 27 |         } catch (ContainerExceptionInterface $ex) { | 
            ||
| 28 |             throw new DomainException('Parameter Entity cannot be initialized: ' . $className, 0, $ex); | 
            ||
| 29 | }  | 
            ||
| 30 | |||
| 31 |         if ($instance instanceof PrintRequest\Parameter) { | 
            ||
| 32 | return $instance;  | 
            ||
| 33 | }  | 
            ||
| 34 | |||
| 35 |         throw new DomainException('Entity is not an instance of PrintRequest\Parameter: ' . $className); | 
            ||
| 36 | }  | 
            ||
| 38 |