Completed
Push — master ( f34924...c8c8f9 )
by Paweł
13:31
created

ProductFixture   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A configureResourceNode() 0 18 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
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 Sylius\Bundle\CoreBundle\Fixture;
13
14
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
15
16
/**
17
 * @author Kamil Kokot <[email protected]>
18
 */
19
final class ProductFixture extends AbstractResourceFixture
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function getName()
25
    {
26
        return 'product';
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    protected function configureResourceNode(ArrayNodeDefinition $resourceNode)
33
    {
34
        $resourceNode
0 ignored issues
show
Bug introduced by
The method arrayNode() does not seem to exist on object<Symfony\Component...odeDefinitionInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
35
            ->children()
36
                ->scalarNode('name')->cannotBeEmpty()->end()
37
                ->scalarNode('code')->cannotBeEmpty()->end()
38
                ->booleanNode('enabled')->end()
39
                ->scalarNode('short_description')->cannotBeEmpty()->end()
40
                ->scalarNode('description')->cannotBeEmpty()->end()
41
                ->scalarNode('main_taxon')->cannotBeEmpty()->end()
42
                ->scalarNode('product_archetype')->cannotBeEmpty()->end()
43
                ->scalarNode('shipping_category')->cannotBeEmpty()->end()
44
                ->arrayNode('taxons')->prototype('scalar')->end()->end()
45
                ->arrayNode('channels')->prototype('scalar')->end()->end()
46
                ->arrayNode('product_attributes')->prototype('scalar')->end()->end()
47
                ->arrayNode('product_options')->prototype('scalar')->end()->end()
48
        ;
49
    }
50
}
51