StyleMinifier::minify()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Staticka\Filters;
4
5
/**
6
 * Style Minifier
7
 *
8
 * @package Staticka
9
 * @author  Rougin Gutib <[email protected]>
10
 */
11
class StyleMinifier extends InlineMinifier
12
{
13
    /**
14
     * @var string
15
     */
16
    protected $tagname = 'style';
17
18
    /**
19
     * Minifies the specified code.
20
     *
21
     * @param  string $code
22
     * @return string
23
     */
24 3
    protected function minify($code)
25
    {
26 3
        $minified = (string) parent::minify($code);
27
28 3
        return str_replace(' > ', '>', $minified);
29
    }
30
}
31