ToLowerCase::call()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
/**
4
 * @license     http://opensource.org/licenses/mit-license.php MIT
5
 * @link        https://github.com/nicoSWD
6
 * @author      Nicolas Oelgart <[email protected]>
7
 */
8
namespace nicoSWD\Rule\Grammar\JavaScript\Methods;
9
10
use nicoSWD\Rule\Grammar\CallableFunction;
11
use nicoSWD\Rule\TokenStream\Token\BaseToken;
12
use nicoSWD\Rule\TokenStream\Token\TokenString;
13
14
final class ToLowerCase extends CallableFunction
15
{
16 2
    public function call(?BaseToken ...$parameters): BaseToken
17
    {
18 2
        return new TokenString(strtolower((string) $this->token->getValue()));
0 ignored issues
show
Bug Best Practice introduced by
The property token does not exist on nicoSWD\Rule\Grammar\Jav...ipt\Methods\ToLowerCase. Did you maybe forget to declare it?
Loading history...
19
    }
20
}
21