| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 73 | public static function attributes(array $attributes): string |
|
| 20 | { |
||
| 21 | 73 | $out = ''; |
|
| 22 | |||
| 23 | 73 | foreach ($attributes as $k => $v) { |
|
| 24 | 73 | if ($v === false) { |
|
| 25 | 50 | continue; |
|
| 26 | } |
||
| 27 | |||
| 28 | 73 | $out .= ' '.htmlentities($k); |
|
| 29 | |||
| 30 | 73 | if ($v !== true) { |
|
| 31 | 73 | $out .= '="'.htmlentities($v).'"'; |
|
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | 73 | return $out; |
|
| 36 | } |
||
| 58 |