Failed Conditions
Pull Request — master (#34)
by Yo
10:33 queued 29s
created

src/DependencyInjection/Configuration.php (1 issue)

Labels
Severity
1
<?php
2
namespace Yoanm\SymfonyJsonRpcHttpServerDoc\DependencyInjection;
3
4
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
5
use Symfony\Component\Config\Definition\ConfigurationInterface;
6
7
/**
8
 * Class Configuration
9
 */
10
class Configuration implements ConfigurationInterface
11
{
12
    const DEFAULT_ENDPOINT = '/doc';
13
    /**
14
     * {@inheritdoc}
15
     */
16 4
    public function getConfigTreeBuilder(): TreeBuilder
17
    {
18 4
        $treeBuilder = new TreeBuilder(JsonRpcHttpServerDocExtension::EXTENSION_IDENTIFIER);
19
20 4
        $rootNode = $treeBuilder->getRootNode();
21
22 4
        $rootNode
23 4
            ->addDefaultsIfNotSet()
24 4
            ->children()
25 4
                ->variableNode('endpoint')
26 4
                    ->info('Your custom http doc endpoint path')
27 4
                    ->treatNullLike(self::DEFAULT_ENDPOINT)
28 4
                    ->defaultValue(self::DEFAULT_ENDPOINT)
29 4
                ->end()
30 4
            ->end()
1 ignored issue
show
The method end() does not exist on Symfony\Component\Config...der\NodeParentInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Symfony\Component\Config...ion\Builder\TreeBuilder. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

30
            ->/** @scrutinizer ignore-call */ end()
Loading history...
31 4
        ;
32
33 4
        return $treeBuilder;
34
    }
35
}
36