Completed
Push — master ( 47d682...3dc44b )
by Tobias
01:38 queued 11s
created

LowercaseTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A lowercase() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Nyholm\Psr7;
6
7
/**
8
 * Trait implementing a locale-independent lowercasing logic.
9
 *
10
 * @author Nicolas Grekas <[email protected]>
11
 *
12
 * @internal should not be used outside of Nyholm/Psr7 as it does not fall under our BC promise
13
 */
14
trait LowercaseTrait
15
{
16 138
    private static function lowercase(string $value): string
17
    {
18 138
        return \strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
19
    }
20
}
21