RemoveGenerator::process()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Remove generator
4
 *
5
 * @author  Tim Lochmüller
6
 */
7
8
namespace FRUIT\Ink\Postprocessing;
9
10
/**
11
 * Remove generator
12
 */
13
class RemoveGenerator implements PostprocessingInterface
14
{
15
16
    /**
17
     * Remove the generator tag
18
     *
19
     * @param string $content
20
     *
21
     * @return string
22
     */
23
    public function process($content)
24
    {
25
        return preg_replace('/<meta name="?generator"?.+?>/is', '', $content);
26
    }
27
}
28