| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | 74 | protected function build(array $attributes, string $suffix): array |
|
| 37 | { |
||
| 38 | 74 | $id = Html::generateId('w') . $suffix; |
|
| 39 | |||
| 40 | 74 | if (!array_key_exists('id', $attributes)) { |
|
| 41 | 64 | $attributes['id'] = $id; |
|
| 42 | } |
||
| 43 | |||
| 44 | 74 | if (!array_key_exists('name', $attributes)) { |
|
| 45 | 64 | $attributes['name'] = $id; |
|
| 46 | } |
||
| 47 | |||
| 48 | 74 | return $attributes; |
|
| 49 | } |
||
| 51 |