Completed
Push — master ( 4a7fd0...bb86ee )
by Loïc
13s queued 10s
created

ApiClientFixture   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A configureResourceNode() 0 9 1
1
<?php
2
3
/*
4
 * This file is part of AppName.
5
 *
6
 * (c) Monofony
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\Fixture;
13
14
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
15
16
class ApiClientFixture extends AbstractResourceFixture
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function getName(): string
22
    {
23
        return 'api_client';
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    protected function configureResourceNode(ArrayNodeDefinition $resourceNode)
30
    {
31
        $resourceNode
32
            ->children()
33
                ->scalarNode('random_id')->cannotBeEmpty()->end()
34
                ->scalarNode('secret')->cannotBeEmpty()->end()
35
                ->arrayNode('allowed_grant_types')->scalarPrototype()->cannotBeEmpty()->defaultValue([])->end()
36
        ;
37
    }
38
}
39