Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
TidyDriverBase
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 tidy
n/a
0 / 0
n/a
0 / 0
0
1<?php
2
3namespace MediaWiki\Tidy;
4
5/**
6 * Base class for HTML cleanup utilities
7 */
8abstract class TidyDriverBase {
9    protected $config;
10
11    public function __construct( $config ) {
12        $this->config = $config;
13    }
14
15    /**
16     * Clean up HTML
17     *
18     * @param string $text HTML document fragment to clean up
19     * @param ?callable $textProcessor A callback to run on the contents of
20     *   text nodes (not elements or attribute values).  This can be used to
21     *   apply text modifications like french spacing or smart quotes, without
22     *   affecting element or attribute markup.
23     * @return string The corrected HTML output
24     */
25    abstract public function tidy( $text, ?callable $textProcessor = null );
26}