| Conditions | 14 | 
| Paths | 9 | 
| Total Lines | 24 | 
| Code Lines | 12 | 
| 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  | 
            ||
| 118 | protected function validateMemcacheConfiguration(array $config)  | 
            ||
| 119 |     { | 
            ||
| 120 |         if (!array_key_exists('servers', $config)) { | 
            ||
| 121 |             throw new InvalidConfigurationException('Missing configuration parameter: servers'); | 
            ||
| 122 | }  | 
            ||
| 123 | |||
| 124 |         if (!is_array($config['servers'])) { | 
            ||
| 125 |             throw new InvalidConfigurationException('Invalid configuration parameter: servers'); | 
            ||
| 126 | }  | 
            ||
| 127 | |||
| 128 |         foreach ($config['servers'] as $server) { | 
            ||
| 129 |             if (!is_array($server) || count($server) < 2 || count($server) > 3 || !is_numeric($server[1]) || (isset($server[2]) && !is_numeric($server[2]))) { | 
            ||
| 130 |                 throw new InvalidConfigurationException('Invalid configuration parameter: servers'); | 
            ||
| 131 | }  | 
            ||
| 132 | }  | 
            ||
| 133 | |||
| 134 |         if (array_key_exists('options', $config) && !is_array($config['options'])) { | 
            ||
| 135 |             throw new InvalidConfigurationException('Invalid configuration parameter: options'); | 
            ||
| 136 | }  | 
            ||
| 137 | |||
| 138 |         if (isset($config['ttl']) && !is_numeric($config['ttl'])) { | 
            ||
| 139 |             throw new InvalidConfigurationException('Invalid configuration parameter: ttl'); | 
            ||
| 140 | }  | 
            ||
| 141 | }  | 
            ||
| 142 | }  | 
            ||
| 143 | 
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.