Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | 9 | private function getInputObjectFieldName(\ReflectionMethod $method, ?InputObjectField $attribute): string |
|
12 | { |
||
13 | 9 | if ($attribute?->name) { |
|
14 | 3 | \assert($attribute->name !== null); |
|
15 | 3 | return $attribute->name; |
|
16 | } |
||
17 | |||
18 | 6 | $name = $method->getName(); |
|
19 | |||
20 | 6 | if (\str_starts_with($name, 'set')) { |
|
21 | 5 | $name = \substr($name, 3); |
|
22 | } |
||
23 | |||
24 | 6 | return \lcfirst($name); |
|
25 | } |
||
27 |