Completed
Pull Request — master (#3)
by Clayton
06:29
created

Lowercase::apply()   A

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
namespace PerfectOblivion\Valid\Sanitizer\Filters;
4
5
use PerfectOblivion\Valid\Sanitizer\Contracts\Filter;
6
7
/**
8
 * File copied from Waavi/Sanitizer https://github.com/waavi/sanitizer
9
 * Sanitization functionality to be customized within this project before a 1.0 release.
10
 */
11
class Lowercase implements Filter
12
{
13
    /**
14
     * Lowercase 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) ? \strtolower($value) : $value;
23
    }
24
}
25