| Conditions | 1 |
| Paths | 1 |
| Total Lines | 65 |
| Code Lines | 32 |
| 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 |
||
| 121 | public function dataProviderForTestValidCommands() |
||
| 122 | { |
||
| 123 | return [ |
||
| 124 | [ |
||
| 125 | 'dbal:import', |
||
| 126 | \Doctrine\DBAL\Tools\Console\Command\ImportCommand::class, |
||
| 127 | ], |
||
| 128 | [ |
||
| 129 | 'dbal:run-sql', |
||
| 130 | \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand::class, |
||
| 131 | ], |
||
| 132 | [ |
||
| 133 | 'orm:clear-cache:query', |
||
| 134 | \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand::class, |
||
| 135 | ], |
||
| 136 | [ |
||
| 137 | 'orm:clear-cache:result', |
||
| 138 | \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand::class, |
||
| 139 | ], |
||
| 140 | [ |
||
| 141 | 'orm:generate-proxies', |
||
| 142 | \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand::class, |
||
| 143 | ], |
||
| 144 | [ |
||
| 145 | 'orm:ensure-production-settings', |
||
| 146 | \Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand::class, |
||
| 147 | ], |
||
| 148 | [ |
||
| 149 | 'orm:info', |
||
| 150 | \Doctrine\ORM\Tools\Console\Command\InfoCommand::class, |
||
| 151 | ], |
||
| 152 | [ |
||
| 153 | 'orm:schema-tool:create', |
||
| 154 | \Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand::class, |
||
| 155 | ], |
||
| 156 | [ |
||
| 157 | 'orm:schema-tool:update', |
||
| 158 | \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand::class, |
||
| 159 | ], |
||
| 160 | [ |
||
| 161 | 'orm:schema-tool:drop', |
||
| 162 | \Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand::class, |
||
| 163 | ], |
||
| 164 | [ |
||
| 165 | 'orm:validate-schema', |
||
| 166 | \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand::class, |
||
| 167 | ], |
||
| 168 | [ |
||
| 169 | 'orm:run-dql', |
||
| 170 | \Doctrine\ORM\Tools\Console\Command\RunDqlCommand::class, |
||
| 171 | ], |
||
| 172 | [ |
||
| 173 | 'migrations:generate', |
||
| 174 | \Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand::class, |
||
| 175 | ], |
||
| 176 | [ |
||
| 177 | 'migrations:diff', |
||
| 178 | \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand::class, |
||
| 179 | ], |
||
| 180 | [ |
||
| 181 | 'migrations:execute', |
||
| 182 | \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand::class, |
||
| 183 | ], |
||
| 184 | ]; |
||
| 185 | } |
||
| 186 | } |
||
| 187 |