Completed
Pull Request — master (#18)
by Kamil
02:30
created

CustomBlockFixture   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A configureResourceNode() 0 9 1
1
<?php
2
3
namespace Lakion\SyliusCmsBundle\Fixture;
4
5
use Sylius\Bundle\CoreBundle\Fixture\AbstractResourceFixture;
6
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
7
8
final class CustomBlockFixture extends AbstractResourceFixture
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function getName()
14
    {
15
        return 'lakion_sylius_cms_custom_block';
16
    }
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    protected function configureResourceNode(ArrayNodeDefinition $resourceNode)
22
    {
23
        $resourceNode
24
            ->children()
25
                ->scalarNode('name')->end()
26
                ->scalarNode('title')->end()
27
                ->scalarNode('body')->end()
28
        ;
29
    }
30
}
31