Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function process(ContainerBuilder $container) |
||
26 | { |
||
27 | if (!$container->hasDefinition(MetadataBuilder::class) || !$container->hasParameter('oauth2_server.endpoint.jwks_uri.route_name')) { |
||
28 | return; |
||
29 | } |
||
30 | |||
31 | $routeName = $container->getParameter('oauth2_server.endpoint.jwks_uri.route_name'); |
||
|
|||
32 | $definition = $container->getDefinition(MetadataBuilder::class); |
||
33 | $definition->addMethodCall('', ['token_endpoint_auth_signing_alg_values_supported', $this->getJWTLoader()->getSupportedSignatureAlgorithms()]); |
||
34 | $definition->addMethodCall('', ['token_endpoint_auth_encryption_alg_values_supported', $this->getJWTLoader()->getSupportedKeyEncryptionAlgorithms()]); |
||
35 | $definition->addMethodCall('', ['token_endpoint_auth_encryption_enc_values_supported', $this->getJWTLoader()->getSupportedContentEncryptionAlgorithms()]); |
||
36 | } |
||
37 | } |
||
38 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.