| Conditions | 5 |
| Paths | 6 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 39 | public function __construct(array $options) |
||
| 40 | { |
||
| 41 | if (isset($options['value'])) { |
||
| 42 | $options['name'] = $options['value']; |
||
| 43 | unset($options['value']); |
||
| 44 | } |
||
| 45 | if (!isset($options['name']) || empty(trim($options['name']))) { |
||
| 46 | throw new \InvalidArgumentException( |
||
| 47 | 'You must provide the store argument name in ScenarioStateArgument annotation' |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | $this->name = $options['name']; |
||
| 51 | $this->argument = isset($options['argument']) ? $options['argument'] : $this->name; |
||
| 52 | } |
||
| 53 | |||
| 70 |