Completed
Push — master ( 1358d6...984c1e )
by Karsten
01:40
created

ToLower   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 2
1
<?php
2
/**
3
 * Created by gerk on 20.11.17 08:43
4
 */
5
6
namespace PeekAndPoke\Component\Psi\Psi\Str;
7
8
use PeekAndPoke\Component\Psi\Interfaces\UnaryFunction;
9
10
/**
11
 *
12
 *
13
 * @author Karsten J. Gerber <[email protected]>
14
 */
15
class ToLower implements UnaryFunction
16
{
17
    /**
18
     * @param mixed $input
19
     *
20
     * @return mixed
21
     */
22 8
    public function __invoke($input)
23
    {
24 8
        if (! is_scalar($input)) {
25 3
            return null;
26
        }
27
28 5
        return strtolower($input);
29
    }
30
}
31