]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(database): Explicitly inherit stricly typed database schema closure 35618/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 6 Dec 2022 10:40:10 +0000 (11:40 +0100)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 6 Dec 2022 10:43:30 +0000 (11:43 +0100)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
lib/public/Migration/IMigrationStep.php
lib/public/Migration/SimpleMigrationStep.php

index 1b5aa82899476a8ff285893c3219a0ecdbcaed26..da9f62e861e4b8fd390d1eb6bd4e78f762c9930c 100644 (file)
@@ -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);
 }
index e8d19f533ac146fe01956f34f528626dd08d2345..ee657cda4702161bde395fe3773cbc52ef51f6da 100644 (file)
@@ -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) {