]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add psalm types for the migration schema closure 23472/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Thu, 15 Oct 2020 08:58:51 +0000 (10:58 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Thu, 15 Oct 2020 11:24:10 +0000 (11:24 +0000)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
lib/public/Migration/IMigrationStep.php
lib/public/Migration/SimpleMigrationStep.php

index e5c4d50a29994448f1a249576b0e6f61f0466a0b..3d0e23e5d38046ff08879e0a11712529e960ad71 100644 (file)
@@ -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
         */
index 76d86b8f04cfa57fb0080ee08382b1350e56686e..4abf8ea28712e1aefaee10cef94876130f1888bb 100644 (file)
@@ -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) {