summaryrefslogtreecommitdiffstats
path: root/lib/public/Migration
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-12-06 11:40:10 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-12-06 11:43:30 +0100
commit8237e02cf7b98f076f8fd89cf69fad36170119f6 (patch)
tree220d2a1b95e72faa36c31aa944cc245aeacbc3a2 /lib/public/Migration
parent48358bb78f5955e982bcd07e7db252ad0ae43819 (diff)
downloadnextcloud-server-8237e02cf7b98f076f8fd89cf69fad36170119f6.tar.gz
nextcloud-server-8237e02cf7b98f076f8fd89cf69fad36170119f6.zip
fix(database): Explicitly inherit stricly typed database schema closure
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public/Migration')
-rw-r--r--lib/public/Migration/IMigrationStep.php17
-rw-r--r--lib/public/Migration/SimpleMigrationStep.php26
2 files changed, 27 insertions, 16 deletions
diff --git a/lib/public/Migration/IMigrationStep.php b/lib/public/Migration/IMigrationStep.php
index 1b5aa828994..da9f62e861e 100644
--- a/lib/public/Migration/IMigrationStep.php
+++ b/lib/public/Migration/IMigrationStep.php
@@ -27,6 +27,7 @@ declare(strict_types=1);
*/
namespace OCP\Migration;
+use Closure;
use OCP\DB\ISchemaWrapper;
/**
@@ -34,7 +35,7 @@ use OCP\DB\ISchemaWrapper;
*/
interface IMigrationStep {
/**
- * Human readable name of the migration step
+ * Human-readable name of the migration step
*
* @return string
* @since 14.0.0
@@ -42,7 +43,7 @@ interface IMigrationStep {
public function name(): string;
/**
- * Human readable description of the migration steps
+ * Human-readable description of the migration step
*
* @return string
* @since 14.0.0
@@ -51,29 +52,29 @@ interface IMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @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);
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @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);
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @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);
}
diff --git a/lib/public/Migration/SimpleMigrationStep.php b/lib/public/Migration/SimpleMigrationStep.php
index e8d19f533ac..ee657cda470 100644
--- a/lib/public/Migration/SimpleMigrationStep.php
+++ b/lib/public/Migration/SimpleMigrationStep.php
@@ -28,12 +28,15 @@ declare(strict_types=1);
*/
namespace OCP\Migration;
+use Closure;
+use OCP\DB\ISchemaWrapper;
+
/**
* @since 13.0.0
*/
abstract class SimpleMigrationStep implements IMigrationStep {
/**
- * Human readable name of the migration step
+ * Human-readable name of the migration step
*
* @return string
* @since 14.0.0
@@ -43,7 +46,7 @@ abstract class SimpleMigrationStep implements IMigrationStep {
}
/**
- * Human readable description of the migration step
+ * Human-readable description of the migration step
*
* @return string
* @since 14.0.0
@@ -53,16 +56,21 @@ abstract class SimpleMigrationStep implements IMigrationStep {
}
/**
- * {@inheritDoc}
- *
+ * @param IOutput $output
+ * @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) {
}
/**
- * {@inheritDoc}
- *
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @psalm-param Closure():ISchemaWrapper $schemaClosure
+ * @param array $options
+ * @return null|ISchemaWrapper
* @since 13.0.0
*/
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
@@ -70,8 +78,10 @@ abstract class SimpleMigrationStep implements IMigrationStep {
}
/**
- * {@inheritDoc}
- *
+ * @param IOutput $output
+ * @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) {