Skip to content

Commit 359e7c5

Browse files
authored
Merge pull request #63219 from nextcloud/carl/non-empty-string
refactor: allow non-lowercase string in ITable methods
2 parents 6875203 + 91a9bcf commit 359e7c5

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

lib/private/DB/Schema/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getWrappedTable(): DBALTable {
4040

4141
#[\Override]
4242
public function getName(): string {
43-
/** @var non-empty-lowercase-string $name */
43+
/** @var non-empty-string $name */
4444
$name = $this->table->getName();
4545
return $name;
4646
}

lib/public/DB/Schema/ITable.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface ITable {
2323
* Returns the name of this table.
2424
*
2525
* @since 35.0.0
26-
* @return non-empty-lowercase-string
26+
* @return non-empty-string
2727
*/
2828
public function getName(): string;
2929

@@ -39,10 +39,10 @@ public function getName(): string;
3939
public function setPrimaryKey(array $columnNames, string|false $indexName = false): self;
4040

4141
/**
42-
* @param list<non-empty-lowercase-string> $columnNames
42+
* @param list<non-empty-string> $columnNames
4343
* @param ?non-empty-string $indexName
44-
* @param list<non-empty-lowercase-string> $flags
45-
* @param array<non-empty-lowercase-string, mixed> $options
44+
* @param list<non-empty-string> $flags
45+
* @param array<non-empty-string, mixed> $options
4646
*
4747
* @throws SchemaException
4848
* @since 35.0.0
@@ -146,7 +146,7 @@ public function addUniqueIndex(array $columnNames, ?string $indexName = null, ar
146146
public function renameIndex(string $oldName, ?string $newName = null): self;
147147

148148
/**
149-
* @param non-empty-lowercase-string $name
149+
* @param non-empty-string $name
150150
* @param Types::*|ColumnType $typeName
151151
* @param array{
152152
* notnull?: bool,
@@ -167,7 +167,7 @@ public function renameIndex(string $oldName, ?string $newName = null): self;
167167
public function addColumn(string $name, string|ColumnType $typeName, array $options = []): IColumn;
168168

169169
/**
170-
* @param non-empty-lowercase-string $name
170+
* @param non-empty-string $name
171171
* @param array{
172172
* notnull?: bool,
173173
* length?: ?int,
@@ -189,23 +189,23 @@ public function modifyColumn(string $name, array $options): self;
189189
/**
190190
* Drops a Column from the Table.
191191
*
192-
* @param non-empty-lowercase-string $name
192+
* @param non-empty-string $name
193193
* @since 35.0.0
194194
*/
195195
public function dropColumn(string $name): self;
196196

197197
/**
198198
* Returns whether this table has a Column with the given name.
199199
*
200-
* @param non-empty-lowercase-string $name The column name.
200+
* @param non-empty-string $name The column name.
201201
* @since 35.0.0
202202
*/
203203
public function hasColumn(string $name): bool;
204204

205205
/**
206206
* Returns the Column with the given name.
207207
*
208-
* @param non-empty-lowercase-string $name The column name.
208+
* @param non-empty-string $name The column name.
209209
*
210210
* @throws SchemaException If the column does not exist.
211211
* @since 35.0.0
@@ -242,9 +242,9 @@ public function getIndex(string $name): IIndex;
242242
*
243243
* Name is inferred from the local columns.
244244
*
245-
* @param ITable|non-empty-lowercase-string $foreignTable Table schema instance or table name
246-
* @param list<non-empty-lowercase-string> $localColumnNames
247-
* @param list<non-empty-lowercase-string> $foreignColumnNames
245+
* @param ITable|non-empty-string $foreignTable Table schema instance or table name
246+
* @param list<non-empty-string> $localColumnNames
247+
* @param list<non-empty-string> $foreignColumnNames
248248
* @param array<string, mixed> $options
249249
*
250250
* @throws SchemaException

0 commit comments

Comments
 (0)