Skip to content
Snippets Groups Projects
Unverified Commit 65fb50f9 authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Add psalm types for the migration schema closure

parent 20e8b266
No related branches found
No related tags found
No related merge requests found
<?php <?php
declare(strict_types=1);
/** /**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com> * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
* *
...@@ -49,6 +52,7 @@ interface IMigrationStep { ...@@ -49,6 +52,7 @@ interface IMigrationStep {
/** /**
* @param IOutput $output * @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 * @param array $options
* @since 13.0.0 * @since 13.0.0
*/ */
...@@ -57,6 +61,7 @@ interface IMigrationStep { ...@@ -57,6 +61,7 @@ interface IMigrationStep {
/** /**
* @param IOutput $output * @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 * @param array $options
* @return null|ISchemaWrapper * @return null|ISchemaWrapper
* @since 13.0.0 * @since 13.0.0
...@@ -66,6 +71,7 @@ interface IMigrationStep { ...@@ -66,6 +71,7 @@ interface IMigrationStep {
/** /**
* @param IOutput $output * @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 * @param array $options
* @since 13.0.0 * @since 13.0.0
*/ */
......
<?php <?php
declare(strict_types=1);
/** /**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com> * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
* *
...@@ -25,8 +28,6 @@ ...@@ -25,8 +28,6 @@
namespace OCP\Migration; namespace OCP\Migration;
use OCP\DB\ISchemaWrapper;
/** /**
* @since 13.0.0 * @since 13.0.0
*/ */
...@@ -52,19 +53,16 @@ abstract class SimpleMigrationStep implements IMigrationStep { ...@@ -52,19 +53,16 @@ abstract class SimpleMigrationStep implements IMigrationStep {
} }
/** /**
* @param IOutput $output * {@inheritDoc}
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` *
* @param array $options
* @since 13.0.0 * @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 * {@inheritDoc}
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` *
* @param array $options
* @return null|ISchemaWrapper
* @since 13.0.0 * @since 13.0.0
*/ */
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
...@@ -72,9 +70,8 @@ abstract class SimpleMigrationStep implements IMigrationStep { ...@@ -72,9 +70,8 @@ abstract class SimpleMigrationStep implements IMigrationStep {
} }
/** /**
* @param IOutput $output * {@inheritDoc}
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` *
* @param array $options
* @since 13.0.0 * @since 13.0.0
*/ */
public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment