| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | 16 | public function getInstance( |
|
| 29 | array $attributes = [] |
||
| 30 | ) { |
||
| 31 | $attribute_factory_classname = static::$registry['attribute_factory']; |
||
| 32 | |||
| 33 | /** @var \drupol\htmltag\Attribute\AttributeFactoryInterface $attribute_factory_classname */ |
||
| 34 | 16 | $attribute_factory_classname = (new ReflectionClass($attribute_factory_classname))->newInstance(); |
|
| 35 | |||
| 36 | $attributes_classname = static::$registry['*']; |
||
| 37 | 16 | ||
| 38 | /** @var \drupol\htmltag\Attributes\AttributesInterface $attributes */ |
||
| 39 | $attributes = (new ReflectionClass($attributes_classname)) |
||
| 40 | 16 | ->newInstanceArgs([ |
|
| 41 | $attribute_factory_classname, |
||
| 42 | 16 | $attributes, |
|
| 43 | ]); |
||
| 44 | |||
| 45 | 16 | return $attributes; |
|
| 46 | 16 | } |
|
| 48 |