| Conditions | 5 |
| Paths | 6 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 1 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function __construct($values = [], ?string $name = null, ?string $exp = null, array $options = []) |
||
| 34 | 36 | { |
|
| 35 | $vars = get_defined_vars(); |
||
| 36 | unset($vars['options']); |
||
| 37 | $this->loadAnnotationParameters($vars); |
||
| 38 | |||
| 39 | if (0 !== count($options)) { |
||
| 40 | $this->options = $options; |
||
| 41 | } |
||
| 42 | |||
| 43 | foreach ($options as $option) { |
||
| 44 | if (is_array($option) && class_exists($option[0])) { |
||
| 45 | $this->options[] = new $option[0]([], ...$option[1]); |
||
| 46 | |||
| 47 | continue; |
||
| 48 | } |
||
| 49 | |||
| 50 | $this->options[] = $option; |
||
| 51 | } |
||
| 54 |