Url   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 18
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A filter() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of slick/filter package
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Slick\Filter;
11
12
/**
13
 * Url filter
14
 *
15
 * @package Slick\Filter
16
 * @author  Filipe Silva <[email protected]>
17
 */
18
class Url implements FilterInterface
19
{
20
21
    /**
22
     * Returns the result of filtering $value
23
     *
24
     * @param mixed $value
25
     *
26
     * @throws Exception\CannotFilterValueException
27
     *      If filtering $value is impossible.
28
     *
29
     * @return mixed
30
     */
31 2
    public function filter($value)
32
    {
33 2
        return filter_var($value, FILTER_SANITIZE_URL);
34
    }
35
}
36