| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 66 | 8 | public function __construct(string $title, string $parentName, mixed $defaults = '') |
|
| 67 | { |
||
| 68 | 8 | parent::__construct(\uniqid('optgroup'), $title); |
|
| 69 | 8 | $this->setAttributes( |
|
| 70 | 8 | AttributeFactory::createFromArray([ |
|
| 71 | 8 | 'label' => $title |
|
| 72 | 8 | ]) |
|
| 73 | 8 | ); |
|
| 74 | 8 | $this->setName($parentName); |
|
| 75 | 8 | $this->getAttributeCollection() |
|
| 76 | 8 | ->remove('name') |
|
| 77 | 8 | ->remove('id'); |
|
| 78 | 8 | $this->setDefault($defaults); |
|
| 79 | } |
||
| 93 |