Uppercase::apply()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 2
nc 2
nop 2
1
<?php
2
/**
3
 * File copied from Waavi/Sanitizer https://github.com/waavi/sanitizer
4
 * Sanitization functionality to be customized within this project before a 1.0 release.
5
 */
6
7
namespace PerfectOblivion\Valid\Sanitizer\Filters;
8
9
use PerfectOblivion\Valid\Sanitizer\Contracts\Filter;
10
11
class Uppercase implements Filter
12
{
13
    /**
14
     * Uppercase the given string.
15
     *
16
     * @param  string  $value
17
     *
18
     * @return string
19
     */
20
    public function apply($value, $options = [])
21
    {
22
        return is_string($value) ? strtoupper($value) : $value;
23
    }
24
}
25