| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | protected function getComponentAttributes(string $componentHtml): string |
||
| 41 | { |
||
| 42 | $componentXml = new SimpleXMLElement($componentHtml); |
||
| 43 | |||
| 44 | return collect($componentXml->attributes()) |
||
| 45 | ->map(function ($value, $attribute) { |
||
| 46 | $value = str_replace("'", "\\'", $value); |
||
| 47 | |||
| 48 | return "'{$attribute}' => '{$value}',"; |
||
| 49 | })->implode(''); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |