We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
12 | 2 | public static function toConfig(Node $node): array |
|
13 | { |
||
14 | 2 | $config = []; |
|
15 | |||
16 | 2 | foreach ($node->directives as $directiveDef) { |
|
17 | 1 | if ('deprecated' === $directiveDef->name->value) { |
|
18 | 1 | $reason = $directiveDef->arguments->count() ? |
|
19 | 1 | $directiveDef->arguments[0]->value->value : Directive::DEFAULT_DEPRECATION_REASON; |
|
20 | |||
21 | 1 | $config['deprecationReason'] = $reason; |
|
22 | 1 | break; |
|
23 | } |
||
24 | } |
||
25 | |||
26 | 2 | return $config; |
|
27 | } |
||
28 | } |
||
29 |