Skip to content

Commit d2b297e

Browse files
committed
Fix new and previously ignored PHPStan errors
1 parent b425217 commit d2b297e

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/Schema/TableEditor.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,21 @@ final class TableEditor
4343
/** @internal Use {@link Table::editor()} or {@link Table::edit()} to create an instance */
4444
public function __construct()
4545
{
46-
// @phpstan-ignore assign.propertyType (PHPStan doesn't infer the element type)
47-
$this->columns = new UnqualifiedNamedObjectSet();
46+
/** @var UnqualifiedNamedObjectSet<Column> $columns */
47+
$columns = new UnqualifiedNamedObjectSet();
48+
$this->columns = $columns;
4849

49-
// @phpstan-ignore assign.propertyType
50-
$this->indexes = new UnqualifiedNamedObjectSet();
50+
/** @var UnqualifiedNamedObjectSet<Index> $indexes */
51+
$indexes = new UnqualifiedNamedObjectSet();
52+
$this->indexes = $indexes;
5153

52-
// @phpstan-ignore assign.propertyType
53-
$this->uniqueConstraints = new OptionallyUnqualifiedNamedObjectSet();
54+
/** @var OptionallyUnqualifiedNamedObjectSet<UniqueConstraint> $uniqueConstraints */
55+
$uniqueConstraints = new OptionallyUnqualifiedNamedObjectSet();
56+
$this->uniqueConstraints = $uniqueConstraints;
5457

55-
// @phpstan-ignore assign.propertyType
56-
$this->foreignKeyConstraints = new OptionallyUnqualifiedNamedObjectSet();
58+
/** @var OptionallyUnqualifiedNamedObjectSet<ForeignKeyConstraint> $foreignKeyConstraints */
59+
$foreignKeyConstraints = new OptionallyUnqualifiedNamedObjectSet();
60+
$this->foreignKeyConstraints = $foreignKeyConstraints;
5761
}
5862

5963
public function setName(OptionallyQualifiedName $name): self

0 commit comments

Comments
 (0)