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

LowercaseTrait::lowercase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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