| @@ 92-105 (lines=14) @@ | ||
| 89 | return $string; |
|
| 90 | } |
|
| 91 | ||
| 92 | protected function generateAttributes(): string |
|
| 93 | { |
|
| 94 | $string = ''; |
|
| 95 | ||
| 96 | foreach ($this->element->attributes as $key => $value) { |
|
| 97 | if (is_null($value) || (is_bool($value) && $value === false)) { |
|
| 98 | continue; |
|
| 99 | } |
|
| 100 | ||
| 101 | $string .= ' ' . $key . '="' . (is_bool($value) ? $key : $value) . '"'; |
|
| 102 | } |
|
| 103 | ||
| 104 | return $string; |
|
| 105 | } |
|
| 106 | ||
| 107 | protected function generateParts(): string |
|
| 108 | { |
|
| @@ 107-120 (lines=14) @@ | ||
| 104 | return $string; |
|
| 105 | } |
|
| 106 | ||
| 107 | protected function generateParts(): string |
|
| 108 | { |
|
| 109 | $attributes = ''; |
|
| 110 | ||
| 111 | foreach ($this->element->parts as $key => $value) { |
|
| 112 | if (is_null($value) || (is_bool($value) && $value === false)) { |
|
| 113 | continue; |
|
| 114 | } |
|
| 115 | ||
| 116 | $attributes .= ' ' . $key . '="' . (is_bool($value) ? $key : $value) . '"'; |
|
| 117 | } |
|
| 118 | ||
| 119 | return $attributes; |
|
| 120 | } |
|
| 121 | ||
| 122 | protected function stylesToParts(): void |
|
| 123 | { |
|