| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 75 | 
| Code Lines | 72 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 3 | ||
| Bugs | 1 | Features | 0 | 
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php  | 
            ||
| 53 | private function addResourcesSection(ArrayNodeDefinition $node)  | 
            ||
| 54 |     { | 
            ||
| 55 | $node  | 
            ||
| 56 | ->children()  | 
            ||
| 57 |                 ->arrayNode('resources') | 
            ||
| 58 |                     ->useAttributeAsKey('name') | 
            ||
| 59 |                     ->prototype('array') | 
            ||
| 60 | ->children()  | 
            ||
| 61 |                             ->scalarNode('subject')->isRequired()->end() | 
            ||
| 62 |                             ->arrayNode('association') | 
            ||
| 63 | ->isRequired()  | 
            ||
| 64 | ->addDefaultsIfNotSet()  | 
            ||
| 65 | ->children()  | 
            ||
| 66 |                                     ->arrayNode('classes') | 
            ||
| 67 | ->addDefaultsIfNotSet()  | 
            ||
| 68 | ->children()  | 
            ||
| 69 |                                             ->scalarNode('model')->isRequired()->cannotBeEmpty()->end() | 
            ||
| 70 |                                             ->scalarNode('controller')->defaultValue(ResourceController::class)->cannotBeEmpty()->end() | 
            ||
| 71 |                                             ->scalarNode('factory')->defaultValue(Factory::class)->cannotBeEmpty()->end() | 
            ||
| 72 |                                             ->scalarNode('repository')->cannotBeEmpty()->end() | 
            ||
| 73 |                                             ->arrayNode('form') | 
            ||
| 74 | ->addDefaultsIfNotSet()  | 
            ||
| 75 | ->children()  | 
            ||
| 76 |                                                     ->scalarNode('default')->defaultValue(AssociationType::class)->cannotBeEmpty()->end() | 
            ||
| 77 | ->end()  | 
            ||
| 78 | ->end()  | 
            ||
| 79 | ->end()  | 
            ||
| 80 | ->end()  | 
            ||
| 81 |                                     ->arrayNode('validation_groups') | 
            ||
| 82 | ->addDefaultsIfNotSet()  | 
            ||
| 83 | ->children()  | 
            ||
| 84 |                                             ->arrayNode('default') | 
            ||
| 85 |                                                 ->prototype('scalar')->end() | 
            ||
| 86 |                                                 ->defaultValue(array('sylius')) | 
            ||
| 87 | ->end()  | 
            ||
| 88 | ->end()  | 
            ||
| 89 | ->end()  | 
            ||
| 90 | ->end()  | 
            ||
| 91 | ->end()  | 
            ||
| 92 |                             ->arrayNode('association_type') | 
            ||
| 93 | ->addDefaultsIfNotSet()  | 
            ||
| 94 | ->children()  | 
            ||
| 95 |                                     ->arrayNode('classes') | 
            ||
| 96 | ->addDefaultsIfNotSet()  | 
            ||
| 97 | ->children()  | 
            ||
| 98 |                                             ->scalarNode('model')->defaultValue(AssociationTypeModel::class)->cannotBeEmpty()->end() | 
            ||
| 99 |                                             ->scalarNode('controller')->defaultValue(ResourceController::class)->cannotBeEmpty()->end() | 
            ||
| 100 |                                             ->scalarNode('factory')->defaultValue(Factory::class)->cannotBeEmpty()->end() | 
            ||
| 101 |                                             ->scalarNode('repository')->cannotBeEmpty()->end() | 
            ||
| 102 |                                             ->arrayNode('form') | 
            ||
| 103 | ->addDefaultsIfNotSet()  | 
            ||
| 104 | ->children()  | 
            ||
| 105 |                                                     ->scalarNode('default')->defaultValue(AssociationTypeType::class)->cannotBeEmpty()->end() | 
            ||
| 106 |                                                     ->scalarNode('choice')->defaultValue(ResourceChoiceType::class)->cannotBeEmpty()->end() | 
            ||
| 107 | ->end()  | 
            ||
| 108 | ->end()  | 
            ||
| 109 | ->end()  | 
            ||
| 110 | ->end()  | 
            ||
| 111 |                                     ->arrayNode('validation_groups') | 
            ||
| 112 | ->addDefaultsIfNotSet()  | 
            ||
| 113 | ->children()  | 
            ||
| 114 |                                             ->arrayNode('default') | 
            ||
| 115 |                                                 ->prototype('scalar')->end() | 
            ||
| 116 |                                                 ->defaultValue(array('sylius')) | 
            ||
| 117 | ->end()  | 
            ||
| 118 | ->end()  | 
            ||
| 119 | ->end()  | 
            ||
| 120 | ->end()  | 
            ||
| 121 | ->end()  | 
            ||
| 122 | ->end()  | 
            ||
| 123 | ->end()  | 
            ||
| 124 | ->end()  | 
            ||
| 125 | ->end()  | 
            ||
| 126 | ;  | 
            ||
| 127 | }  | 
            ||
| 128 | }  | 
            ||
| 129 |