| 1 | <?php |
||
| 15 | abstract class AbstractMigration implements MigrationInterface |
||
| 16 | { |
||
| 17 | const PLUGIN_NAME = ''; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Command |
||
| 21 | */ |
||
| 22 | protected $command; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * AbstractMigration constructor. |
||
| 26 | * |
||
| 27 | * @param Command $command |
||
| 28 | * |
||
| 29 | * @throws NoPluginException |
||
| 30 | */ |
||
| 31 | public function __construct(Command $command) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | public function migrate() |
||
| 49 | |||
| 50 | abstract protected function migratePlugin(); |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @throws NoPluginException |
||
| 54 | */ |
||
| 55 | protected function validate() |
||
| 63 | } |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.