| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 25 | interface JsonMigration |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * Returns the version of the JSON object that this migration expects. |
||
| 29 | * |
||
| 30 | * @return string The version string |
||
| 31 | */ |
||
| 32 | public function getSourceVersion(); |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Returns the version of the JSON object that this migration upgrades to. |
||
| 36 | * |
||
| 37 | * @return string The version string |
||
| 38 | */ |
||
| 39 | public function getTargetVersion(); |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Upgrades a JSON object from the source to the target version. |
||
| 43 | * |
||
| 44 | * @param stdClass $data The JSON object of the package file |
||
| 45 | */ |
||
| 46 | public function up(stdClass $data); |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Reverts a JSON object from the target to the source version. |
||
| 50 | * |
||
| 51 | * @param stdClass $data The JSON object of the package file |
||
| 52 | */ |
||
| 53 | public function down(stdClass $data); |
||
| 54 | } |
||
| 55 |
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.