We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 3 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
12 | public function __construct($name = 'globalId') |
||
13 | 122 | { |
|
14 | 122 | parent::__construct( |
|
15 | $name, |
||
16 | 1 | function (string $id, string $typeName = null): string { |
|
17 | $typeName = $this->isTypeNameEmpty($typeName) ? '$info->parentType->name' : $typeName; |
||
18 | 1 | ||
19 | 1 | return \sprintf('\%s::toGlobalId(%s, %s)', GlobalIdHelper::class, $typeName, $id); |
|
20 | 1 | }, |
|
21 | 1 | function ($arguments, $id, $typeName = null) { |
|
22 | 1 | $typeName = $this->isTypeNameEmpty($typeName) ? $arguments['info']->parentType->name : $typeName; |
|
23 | |||
24 | 122 | return GlobalIdHelper::toGlobalId($typeName, $id); |
|
25 | } |
||
34 |