| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | class Spaceless extends Widget |
||
| 43 | { |
||
| 44 | /** |
||
| 45 | * Starts capturing an output to be cleaned from whitespace characters between HTML tags. |
||
| 46 | */ |
||
| 47 | 2 | public function init(): void |
|
| 48 | { |
||
| 49 | 2 | parent::init(); |
|
| 50 | |||
| 51 | 2 | ob_start(); |
|
| 52 | 2 | ob_implicit_flush(0); |
|
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Marks the end of content to be cleaned from whitespace characters between HTML tags. |
||
| 57 | * Stops capturing an output and returns cleaned result. |
||
| 58 | * |
||
| 59 | * @return string the result of widget execution to be outputted. |
||
| 60 | */ |
||
| 61 | 2 | public function run(): string |
|
| 64 | } |
||
| 65 | } |
||
| 66 |