aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2024-07-29 11:16:38 -0100
committerMaxence Lange <maxence@artificial-owl.com>2024-07-29 12:44:52 -0100
commita9e1dc668875f4247f6331096248b099afff5ae6 (patch)
treee0138fc58e31e9acb96293d8473ab27c8b64d415 /lib/public
parentad490c963bd88359a714fb2f1786aaf8c00ae17c (diff)
downloadnextcloud-server-a9e1dc668875f4247f6331096248b099afff5ae6.tar.gz
nextcloud-server-a9e1dc668875f4247f6331096248b099afff5ae6.zip
fix(migration-attributes): psalm
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Migration/Attributes/ColumnMigrationAttribute.php8
-rw-r--r--lib/public/Migration/Attributes/GenericMigrationAttribute.php4
-rw-r--r--lib/public/Migration/Attributes/IndexMigrationAttribute.php7
-rw-r--r--lib/public/Migration/Attributes/MigrationAttribute.php6
-rw-r--r--lib/public/Migration/Attributes/TableMigrationAttribute.php7
5 files changed, 32 insertions, 0 deletions
diff --git a/lib/public/Migration/Attributes/ColumnMigrationAttribute.php b/lib/public/Migration/Attributes/ColumnMigrationAttribute.php
index b750932a257..30b6fe008e6 100644
--- a/lib/public/Migration/Attributes/ColumnMigrationAttribute.php
+++ b/lib/public/Migration/Attributes/ColumnMigrationAttribute.php
@@ -16,6 +16,14 @@ use JsonSerializable;
* @since 30.0.0
*/
class ColumnMigrationAttribute extends MigrationAttribute implements JsonSerializable {
+ /**
+ * @param string $table name of the database table
+ * @param string $name name of the column
+ * @param ColumnType|null $type type of the column
+ * @param string $description description of the migration
+ * @param array $notes notes about the migration/column
+ * @since 30.0.0
+ */
public function __construct(
string $table,
private string $name = '',
diff --git a/lib/public/Migration/Attributes/GenericMigrationAttribute.php b/lib/public/Migration/Attributes/GenericMigrationAttribute.php
index d0c39a4a1a9..6f187635ff7 100644
--- a/lib/public/Migration/Attributes/GenericMigrationAttribute.php
+++ b/lib/public/Migration/Attributes/GenericMigrationAttribute.php
@@ -17,6 +17,10 @@ use JsonSerializable;
* @since 30.0.0
*/
class GenericMigrationAttribute extends MigrationAttribute implements JsonSerializable {
+ /**
+ * @param array $details
+ * @since 30.0.0
+ */
public function __construct(
private readonly array $details = []
) {
diff --git a/lib/public/Migration/Attributes/IndexMigrationAttribute.php b/lib/public/Migration/Attributes/IndexMigrationAttribute.php
index 0d6e946890e..88b60a564b3 100644
--- a/lib/public/Migration/Attributes/IndexMigrationAttribute.php
+++ b/lib/public/Migration/Attributes/IndexMigrationAttribute.php
@@ -16,6 +16,13 @@ use JsonSerializable;
* @since 30.0.0
*/
class IndexMigrationAttribute extends MigrationAttribute implements JsonSerializable {
+ /**
+ * @param string $table name of the database table
+ * @param IndexType|null $type type of the index
+ * @param string $description description of the migration
+ * @param array $notes notes abour the migration/index
+ * @since 30.0.0
+ */
public function __construct(
string $table,
private ?IndexType $type = null,
diff --git a/lib/public/Migration/Attributes/MigrationAttribute.php b/lib/public/Migration/Attributes/MigrationAttribute.php
index 19b2ffb56ed..5b4550c4db5 100644
--- a/lib/public/Migration/Attributes/MigrationAttribute.php
+++ b/lib/public/Migration/Attributes/MigrationAttribute.php
@@ -14,6 +14,12 @@ use JsonSerializable;
* @since 30.0.0
*/
class MigrationAttribute implements JsonSerializable {
+ /**
+ * @param string $table name of the database table
+ * @param string $description description of the migration
+ * @param array $notes notes about the migration
+ * @since 30.0.0
+ */
public function __construct(
private string $table,
private string $description = '',
diff --git a/lib/public/Migration/Attributes/TableMigrationAttribute.php b/lib/public/Migration/Attributes/TableMigrationAttribute.php
index f3ba406a4ab..0776e50387e 100644
--- a/lib/public/Migration/Attributes/TableMigrationAttribute.php
+++ b/lib/public/Migration/Attributes/TableMigrationAttribute.php
@@ -16,6 +16,13 @@ use JsonSerializable;
* @since 30.0.0
*/
class TableMigrationAttribute extends MigrationAttribute implements JsonSerializable {
+ /**
+ * @param string $table name of the database table
+ * @param array $columns list of columns
+ * @param string $description description of the migration
+ * @param array $notes notes about the migration/table
+ * @since 30.0.0
+ */
public function __construct(
string $table,
private array $columns = [],