HtmlCompressor   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 25
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A compress() 0 4 1
1
<?php
2
/**
3
 * HtmlCompressor.php
4
 * @author Revin Roman
5
 * @link https://rmrevin.ru
6
 */
7
8
namespace rmrevin\yii\minify;
9
10
/**
11
 * Class HtmlCompressor
12
 * @package rmrevin\yii\minify
13
 * @deprecated
14
 */
15
class HtmlCompressor
16
{
17
18
    /**
19
     * "Minify" an HTML page
20
     *
21
     * @param string $html
22
     * @param array $options
23
     *
24
     * 'cssMinifier' : (optional) callback function to process content of STYLE
25
     * elements.
26
     *
27
     * 'jsMinifier' : (optional) callback function to process content of SCRIPT
28
     * elements. Note: the type attribute is ignored.
29
     *
30
     * 'xhtml' : (optional boolean) should content be treated as XHTML1.0? If
31
     * unset, minify will sniff for an XHTML doctype.
32
     *
33
     * @return string
34
     */
35 1
    public static function compress($html, array $options = [])
36
    {
37 1
        return \Minify_HTML::minify($html, $options);
38
    }
39
}
40