| Conditions | 1 |
| Paths | 1 |
| Total Lines | 112 |
| Code Lines | 67 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 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 |
||
| 27 | { |
||
| 28 | $this->container->setParameter( |
||
| 29 | 'kernel.bundles', |
||
| 30 | array() |
||
| 31 | ); |
||
| 32 | $this->load(array('document_tree' => array())); |
||
| 33 | |||
| 34 | $this->assertContainerBuilderHasParameter( |
||
| 35 | 'sonata_admin_doctrine_phpcr.tree_block.configuration', |
||
| 36 | array( |
||
| 37 | 'routing_defaults' => array(), |
||
| 38 | 'repository_name' => null, |
||
| 39 | 'sortable_by' => 'position', |
||
| 40 | 'move' => true, |
||
| 41 | 'reorder' => true, |
||
| 42 | ) |
||
| 43 | ); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |