EscapeString::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Faulancer\View\Helper;
4
5
use Faulancer\View\AbstractViewHelper;
6
7
/**
8
 * Class EscapeString
9
 *
10
 * @package Faulancer\View\Helper
11
 * @author  Florian Knapp <[email protected]>
12
 */
13
class EscapeString extends AbstractViewHelper
14
{
15
16
    /**
17
     * Escape a string value
18
     *
19
     * @param string $string
20
     * @return string
21
     */
22
    public function __invoke(string $string)
23
    {
24
        return stripslashes(strip_tags($string));
25
    }
26
27
}