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 |
||
142 | public function dataProviderForTestValidCommands() |
||
143 | { |
||
144 | return [ |
||
145 | [ |
||
146 | 'dbal:import', |
||
147 | \Doctrine\DBAL\Tools\Console\Command\ImportCommand::class, |
||
148 | ], |
||
149 | [ |
||
150 | 'dbal:run-sql', |
||
151 | \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand::class, |
||
152 | ], |
||
153 | [ |
||
154 | 'orm:clear-cache:query', |
||
155 | \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand::class, |
||
156 | ], |
||
157 | [ |
||
158 | 'orm:clear-cache:result', |
||
159 | \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand::class, |
||
160 | ], |
||
161 | [ |
||
162 | 'orm:generate-proxies', |
||
163 | \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand::class, |
||
164 | ], |
||
165 | [ |
||
166 | 'orm:ensure-production-settings', |
||
167 | \Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand::class, |
||
168 | ], |
||
169 | [ |
||
170 | 'orm:info', |
||
171 | \Doctrine\ORM\Tools\Console\Command\InfoCommand::class, |
||
172 | ], |
||
173 | [ |
||
174 | 'orm:schema-tool:create', |
||
175 | \Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand::class, |
||
176 | ], |
||
177 | [ |
||
178 | 'orm:schema-tool:update', |
||
179 | \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand::class, |
||
180 | ], |
||
181 | [ |
||
182 | 'orm:schema-tool:drop', |
||
183 | \Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand::class, |
||
184 | ], |
||
185 | [ |
||
186 | 'orm:validate-schema', |
||
187 | \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand::class, |
||
188 | ], |
||
189 | [ |
||
190 | 'orm:run-dql', |
||
191 | \Doctrine\ORM\Tools\Console\Command\RunDqlCommand::class, |
||
192 | ], |
||
193 | [ |
||
194 | 'migrations:generate', |
||
195 | \Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand::class, |
||
196 | ], |
||
197 | [ |
||
198 | 'migrations:diff', |
||
199 | \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand::class, |
||
200 | ], |
||
201 | [ |
||
202 | 'migrations:execute', |
||
203 | \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand::class, |
||
204 | ], |
||
205 | ]; |
||
206 | } |
||
207 | } |
||
208 |