Failed Conditions
Push — ng ( 29d837...4fff42 )
by Florent
03:48
created

RequestObjectReferenceSource   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 34
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A continueLoading() 0 6 2
A name() 0 4 1
A getNodeDefinition() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * The MIT License (MIT)
7
 *
8
 * Copyright (c) 2014-2018 Spomky-Labs
9
 *
10
 * This software may be modified and distributed under the terms
11
 * of the MIT license.  See the LICENSE file for details.
12
 */
13
14
namespace OAuth2Framework\Bundle\Component\Endpoint\Authorization;
15
16
use OAuth2Framework\Bundle\Component\Component;
17
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
18
use Symfony\Component\DependencyInjection\ContainerBuilder;
19
20
class RequestObjectReferenceSource implements Component
0 ignored issues
show
Bug introduced by
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: build, load, prepend
Loading history...
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    protected function continueLoading(string $path, ContainerBuilder $container, array $config)
26
    {
27
        foreach ($config as $k => $v) {
28
            $container->setParameter($path.'.'.$k, $v);
29
        }
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function name(): string
36
    {
37
        return 'reference';
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function getNodeDefinition(ArrayNodeDefinition $node, ArrayNodeDefinition $rootNode)
44
    {
45
        $node
46
            ->children()
47
                ->booleanNode('uris_registration_required')
48
                    ->info('If true, request object reference Uris must be registered to be used (highly recommended).')
49
                    ->defaultTrue()
50
                ->end()
51
            ->end();
52
    }
53
}
54