Skip to content

Commit a3fcc2b

Browse files
Copilotabnegate
andauthored
fix(schema): restore static return type on Table::index() for fluent chaining
Agent-Logs-Url: https://github.com/utopia-php/query/sessions/5b098851-2af2-49e9-8778-d7edb0172860 Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
1 parent 34b2353 commit a3fcc2b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Query/Schema/Table.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public function index(
373373
?IndexAlgorithm $algorithm = null,
374374
array $algorithmArgs = [],
375375
int $granularity = 1,
376-
): void {
376+
): static {
377377
if ($name === '') {
378378
$name = $this->autoIndexName('idx_', $columns);
379379
}
@@ -390,6 +390,8 @@ public function index(
390390
algorithmArgs: $algorithmArgs,
391391
granularity: $granularity,
392392
);
393+
394+
return $this;
393395
}
394396

395397
/**

0 commit comments

Comments
 (0)