mirror of https://github.com/nextcloud/server
fix imigration type hints
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
6bb0985e59
commit
65897d2bd5
|
@ -73,22 +73,21 @@ use OCP\DB\ISchemaWrapper;
|
|||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\SimpleMigrationStep;
|
||||
|
||||
/**
|
||||
* Auto-generated migration step: Please modify to your needs!
|
||||
*/
|
||||
class {{classname}} extends SimpleMigrationStep {
|
||||
|
||||
/**
|
||||
* @param IOutput $output
|
||||
* @param Closure(): ISchemaWrapper $schemaClosure
|
||||
* @param Closure $schemaClosure
|
||||
* @psalm-param Closure(): ISchemaWrapper $schemaClosure
|
||||
* @param array $options
|
||||
*/
|
||||
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
|
||||
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param IOutput $output
|
||||
* @param Closure(): ISchemaWrapper $schemaClosure
|
||||
* @param Closure $schemaClosure
|
||||
* @psalm-param Closure(): ISchemaWrapper $schemaClosure
|
||||
* @param array $options
|
||||
* @return null|ISchemaWrapper
|
||||
*/
|
||||
|
@ -98,8 +97,9 @@ class {{classname}} extends SimpleMigrationStep {
|
|||
|
||||
/**
|
||||
* @param IOutput $output
|
||||
* @param Closure(): ISchemaWrapper $schemaClosure
|
||||
g * @param array $options
|
||||
* @param Closure $schemaClosure
|
||||
* @psalm-param Closure(): ISchemaWrapper $schemaClosure
|
||||
* @param array $options
|
||||
*/
|
||||
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
|
||||
}
|
||||
|
|
|
@ -35,12 +35,12 @@ use OCP\Migration\SimpleMigrationStep;
|
|||
class Version25000Date20220602190540 extends SimpleMigrationStep {
|
||||
/**
|
||||
* @param IOutput $output
|
||||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
||||
* @param Closure(): ISchemaWrapper $schemaClosure
|
||||
* @psalm-param Closure $schemaClosure
|
||||
* @param array $options
|
||||
* @return null|ISchemaWrapper
|
||||
*/
|
||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
||||
/** @var ISchemaWrapper $schema */
|
||||
$schema = $schemaClosure();
|
||||
|
||||
$comments = $schema->getTable('comments');
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
namespace OCP\Migration;
|
||||
|
||||
use Closure;
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use OCP\DB\ISchemaWrapper;
|
||||
|
@ -39,13 +40,11 @@ abstract class BigIntMigration extends SimpleMigrationStep {
|
|||
abstract protected function getColumnsByTable();
|
||||
|
||||
/**
|
||||
* @param IOutput $output
|
||||
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
||||
* @param array $options
|
||||
* @return null|ISchemaWrapper
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 13.0.0
|
||||
*/
|
||||
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
|
||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
||||
/** @var ISchemaWrapper $schema */
|
||||
$schema = $schemaClosure();
|
||||
|
||||
|
|
|
@ -43,7 +43,11 @@ interface IMigrationStep {
|
|||
public function name(): string;
|
||||
|
||||
/**
|
||||
<<<<<<< HEAD
|
||||
* Human-readable description of the migration step
|
||||
=======
|
||||
* Human-readable description of the migration steps
|
||||
>>>>>>> acf9c4a0c68... fixup! fix imigration type hints
|
||||
*
|
||||
* @return string
|
||||
* @since 14.0.0
|
||||
|
@ -55,6 +59,7 @@ interface IMigrationStep {
|
|||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
||||
* @psalm-param Closure():ISchemaWrapper $schemaClosure
|
||||
* @param array $options
|
||||
*
|
||||
* @since 13.0.0
|
||||
*/
|
||||
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options);
|
||||
|
@ -65,6 +70,7 @@ interface IMigrationStep {
|
|||
* @psalm-param Closure():ISchemaWrapper $schemaClosure
|
||||
* @param array $options
|
||||
* @return null|ISchemaWrapper
|
||||
*
|
||||
* @since 13.0.0
|
||||
*/
|
||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options);
|
||||
|
@ -74,6 +80,7 @@ interface IMigrationStep {
|
|||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
||||
* @psalm-param Closure():ISchemaWrapper $schemaClosure
|
||||
* @param array $options
|
||||
*
|
||||
* @since 13.0.0
|
||||
*/
|
||||
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options);
|
||||
|
|
|
@ -60,9 +60,10 @@ abstract class SimpleMigrationStep implements IMigrationStep {
|
|||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
||||
* @psalm-param Closure():ISchemaWrapper $schemaClosure
|
||||
* @param array $options
|
||||
*
|
||||
* @since 13.0.0
|
||||
*/
|
||||
public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
|
||||
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -71,9 +72,10 @@ abstract class SimpleMigrationStep implements IMigrationStep {
|
|||
* @psalm-param Closure():ISchemaWrapper $schemaClosure
|
||||
* @param array $options
|
||||
* @return null|ISchemaWrapper
|
||||
*
|
||||
* @since 13.0.0
|
||||
*/
|
||||
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
|
||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -82,8 +84,9 @@ abstract class SimpleMigrationStep implements IMigrationStep {
|
|||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
||||
* @psalm-param Closure():ISchemaWrapper $schemaClosure
|
||||
* @param array $options
|
||||
*
|
||||
* @since 13.0.0
|
||||
*/
|
||||
public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
|
||||
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue