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

RequestObjectReferenceSource::getNodeDefinition()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 2
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