summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-10-16 09:50:22 +0200
committerGitHub <noreply@github.com>2020-10-16 09:50:22 +0200
commit3d765dafe72766c0d303669b810a24ddc883b2fd (patch)
tree1086961394da6f9182eb6a776057a80418034dbd /lib/public
parentdd7c6d1947508669633696d78caacfef0804e021 (diff)
parent5290cc77bccafde734f8f4c3fe7da826c0b861cd (diff)
downloadnextcloud-server-3d765dafe72766c0d303669b810a24ddc883b2fd.tar.gz
nextcloud-server-3d765dafe72766c0d303669b810a24ddc883b2fd.zip
Merge pull request #23472 from nextcloud/backport/23464/stable20
[stable20] Add psalm types for the migration schema closure
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Migration/IMigrationStep.php6
-rw-r--r--lib/public/Migration/SimpleMigrationStep.php21
2 files changed, 15 insertions, 12 deletions
diff --git a/lib/public/Migration/IMigrationStep.php b/lib/public/Migration/IMigrationStep.php
index e5c4d50a299..3d0e23e5d38 100644
--- a/lib/public/Migration/IMigrationStep.php
+++ b/lib/public/Migration/IMigrationStep.php
@@ -1,4 +1,7 @@
<?php
+
+declare(strict_types=1);
+
/**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
*
@@ -49,6 +52,7 @@ interface IMigrationStep {
/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @psalm-param Closure():ISchemaWrapper $schemaClosure
* @param array $options
* @since 13.0.0
*/
@@ -57,6 +61,7 @@ interface IMigrationStep {
/**
* @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
@@ -66,6 +71,7 @@ interface IMigrationStep {
/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @psalm-param Closure():ISchemaWrapper $schemaClosure
* @param array $options
* @since 13.0.0
*/
diff --git a/lib/public/Migration/SimpleMigrationStep.php b/lib/public/Migration/SimpleMigrationStep.php
index 76d86b8f04c..4abf8ea2871 100644
--- a/lib/public/Migration/SimpleMigrationStep.php
+++ b/lib/public/Migration/SimpleMigrationStep.php
@@ -1,4 +1,7 @@
<?php
+
+declare(strict_types=1);
+
/**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
*
@@ -25,8 +28,6 @@
namespace OCP\Migration;
-use OCP\DB\ISchemaWrapper;
-
/**
* @since 13.0.0
*/
@@ -52,19 +53,16 @@ abstract class SimpleMigrationStep implements IMigrationStep {
}
/**
- * @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
- * @param array $options
+ * {@inheritDoc}
+ *
* @since 13.0.0
*/
public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
}
/**
- * @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) {
@@ -72,9 +70,8 @@ abstract class SimpleMigrationStep implements IMigrationStep {
}
/**
- * @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
- * @param array $options
+ * {@inheritDoc}
+ *
* @since 13.0.0
*/
public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {