Conditions | 3 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php defined('SYSPATH') OR die('No direct script access.'); |
||
16 | protected function _execute(array $options) |
||
17 | { |
||
18 | if ($options['force'] === NULL OR 'yes' === Minion_CLI::read('This will destroy all data in the current database. Are you sure? [yes/NO]')) |
||
19 | { |
||
20 | Minion_CLI::write('Dropping Tables', 'green'); |
||
|
|||
21 | |||
22 | $migrations = new Migrations(array('log' => 'Minion_CLI::write')); |
||
23 | $migrations->clear_all(); |
||
24 | $options['task'] = 'db:migrate'; |
||
25 | |||
26 | Minion_Task::factory($options)->execute(); |
||
27 | } |
||
28 | else |
||
29 | { |
||
30 | Minion_CLI::write(Minion_CLI::color('Nothing done', 'brown')); |
||
31 | } |
||
32 | } |
||
33 | } |
||
34 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.