We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1.0019 |
Changes | 0 |
1 | <?php |
||
13 | 123 | public function __construct(GlobalVariables $globalVariables, $name = 'idFetcherCallback') |
|
14 | { |
||
15 | 123 | parent::__construct( |
|
16 | 123 | $name, |
|
17 | function ($idFetcher) { |
||
18 | 2 | $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $context, $info) { '; |
|
19 | 2 | $code .= 'return '.$idFetcher.'; }'; |
|
20 | |||
21 | 2 | return $code; |
|
22 | 123 | }, |
|
23 | // TODO: finish this callback |
||
24 | function ($arguments, $idFetcher) use ($globalVariables): callable { |
||
25 | // [ |
||
26 | // 'context' => $context, |
||
27 | // 'args' => $args, |
||
28 | // 'info' => $info |
||
29 | // ] = $arguments; |
||
30 | // |
||
31 | // return function ($value) use ($idFetcher, $globalVariables, $args, $context, $info) { |
||
32 | // return $idFetcher; |
||
33 | // }; |
||
34 | throw new \RuntimeException("The expression function 'idFetcherCallback' is not yet finished and therefore is not allowed to be used."); |
||
35 | 123 | } |
|
39 |
This check looks for imports that have been defined, but are not used in the scope.