| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 10 | public function __construct(ContainerInterface $container, $key) |
|
| 30 | { |
||
| 31 | 10 | $this->container = $container; |
|
| 32 | 10 | $this->key = $key; |
|
| 33 | |||
| 34 | 10 | if (!$container->has($key)) { |
|
| 35 | 5 | throw new FactoryException( |
|
| 36 | 5 | sprintf( |
|
| 37 | 5 | 'You must define the "%s" service as your StateMachine definition', |
|
| 38 | 2 | $key |
|
| 39 | 3 | ) |
|
| 40 | 3 | ); |
|
| 41 | } |
||
| 42 | 10 | } |
|
| 43 | |||
| 52 |