We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 5 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
18 | 14 | public function __construct($name = 'globalId') |
|
19 | { |
||
20 | 14 | parent::__construct( |
|
21 | 14 | $name, |
|
22 | 1 | function ($id, $typeName = null) { |
|
23 | 1 | $typeNameEmpty = null === $typeName || '""' === $typeName || 'null' === $typeName || 'false' === $typeName; |
|
24 | |||
25 | 1 | return sprintf( |
|
26 | 1 | '%s::toGlobalId(%s, %s)', |
|
27 | 1 | \Overblog\GraphQLBundle\Relay\Node\GlobalId::class, |
|
28 | 1 | sprintf($typeNameEmpty ? '$info->parentType->name' : '%s', $typeName), |
|
29 | $id |
||
30 | 1 | ); |
|
31 | } |
||
32 | 14 | ); |
|
33 | 14 | } |
|
34 | } |
||
35 |