1 | <?php namespace Codengine\CustomMigrations; |
||
10 | class CustomMigrationsServiceProvider extends MigrationServiceProvider { |
||
11 | /** |
||
12 | * Register the migrator service. |
||
13 | * |
||
14 | * @return void |
||
15 | */ |
||
16 | protected function registerMigrator() |
||
27 | |||
28 | /** |
||
29 | * Register the "migrate" migration command. |
||
30 | * |
||
31 | * @return void |
||
32 | */ |
||
33 | protected function registerMigrateCommand() |
||
42 | |||
43 | /** |
||
44 | * Register the "rollback" migration command. |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | protected function registerRollbackCommand() |
||
55 | |||
56 | /** |
||
57 | * Register the "reset" migration command. |
||
58 | * |
||
59 | * @return void |
||
60 | */ |
||
61 | protected function registerResetCommand() |
||
68 | |||
69 | /** |
||
70 | * Register the "refresh" migration command. |
||
71 | * |
||
72 | * @return void |
||
73 | */ |
||
74 | protected function registerRefreshCommand() |
||
81 | } |
||
82 |
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.