Completed
Push — master ( a378d5...7b6893 )
by Flo
28s
created

EscapeString   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 1
1
<?php
2
/**
3
 * Class EscapeString | EscapeString.php
4
 * @package Faulancer\View\Helper
5
 * @author  Florian Knapp <[email protected]>
6
 */
7
namespace Faulancer\View\Helper;
8
9
use Faulancer\View\AbstractViewHelper;
10
use Faulancer\View\ViewController;
11
12
/**
13
 * Class EscapeString
14
 */
15
class EscapeString extends AbstractViewHelper
16
{
17
18
    /**
19
     * Escape a string value
20
     *
21
     * @param ViewController $view
22
     * @param string         $string
23
     * @return string
24
     */
25
    public function __invoke(ViewController $view, string $string)
26
    {
27
        return stripslashes(strip_tags($string));
28
    }
29
30
}