DownloadedJWKSet   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A addConfiguration() 0 12 1
1
<?php
2
3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2014-2016 Spomky-Labs
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license.  See the LICENSE file for details.
10
 */
11
12
namespace SpomkyLabs\JoseBundle\DependencyInjection\Source\JWKSetSource;
13
14
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
15
16
abstract class DownloadedJWKSet extends AbstractJWKSetSource
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function addConfiguration(NodeDefinition $node)
22
    {
23
        parent::addConfiguration($node);
24
        $node
25
            ->children()
26
                ->scalarNode('url')->isRequired()->end()
27
                ->booleanNode('is_secured')->defaultTrue()->end()
28
                ->booleanNode('is_https')->defaultTrue()->end()
29
                ->scalarNode('cache')->defaultNull()->end()
30
                ->integerNode('cache_ttl')->defaultValue(86400)->end()
31
            ->end();
32
    }
33
}
34