Passed
Push — master ( b53903...26f148 )
by Alec
46:31 queued 41:54
created

boolToString()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
eloc 3
c 1
b 0
f 0
nc 3
nop 1
dl 0
loc 6
ccs 0
cts 3
cp 0
crap 12
rs 10
1
<?php declare(strict_types=1);
2
3
if (!\function_exists('boolToString')) {
4
    function boolToString(?bool $value): string
5
    {
6
        if (null === $value) {
7
            return 'null';
8
        }
9
        return $value ? 'true' : 'false';
10
    }
11
}