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

ApiClientFixture::configureResourceNode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 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