UppercaseFilter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A filter() 0 4 2
1
<?php namespace Arcanedev\Sanitizer\Filters;
2
3
use Arcanedev\Sanitizer\Contracts\Filterable;
4
use Illuminate\Support\Str;
5
6
/**
7
 * Class     UppercaseFilter
8
 *
9
 * @package  Arcanedev\Sanitizer\Filters
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class UppercaseFilter implements Filterable
13
{
14
    /* ------------------------------------------------------------------------------------------------
15
     |  Main Functions
16
     | ------------------------------------------------------------------------------------------------
17
     */
18
    /**
19
     * Lowercase the given string.
20
     *
21
     * @param  mixed  $value
22
     * @param  array  $options
23
     *
24
     * @return string|mixed
25
     */
26 45
    public function filter($value, array $options = [])
27
    {
28 45
        return is_string($value) ? Str::upper($value) : $value;
29
    }
30
}
31