| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public function minify(string $htmlSource): string |
||
| 12 | { |
||
| 13 | $tidy = tidy_parse_string($htmlSource, $this->getConfig(), 'utf8'); |
||
| 14 | assert($tidy instanceof tidy); |
||
| 15 | |||
| 16 | //dd($tidy->errorBuffer); |
||
| 17 | |||
| 18 | if (!tidy_clean_repair($tidy)) { |
||
| 19 | return $htmlSource; |
||
| 20 | } |
||
| 21 | |||
| 22 | return $this->postProcess($tidy->html()->value); |
||
| 23 | } |
||
| 25 |