Passed
Push — master ( 157485...b7615a )
by Nikolaos
09:23
created

Remove   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of the Phalcon Framework.
5
 *
6
 * (c) Phalcon Team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.txt
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Phalcon\Filter\Sanitize;
15
16
/**
17
 * Phalcon\Filter\Sanitize\Remove
18
 *
19
 * Sanitizes a value removing parts of a string
20
 */
21
class Remove
22
{
23
    /**
24
     * @var mixed input The text to sanitize
25
     */
26
    /**
27
     * @param mixed           $input
28
     * @param string|string[] $replace
29
     *
30
     * @return string|string[]
31
     */
32
    public function __invoke($input, $replace)
33
    {
34
        return str_replace($replace, "", $input);
35
    }
36
}
37