Skip to content

Commit

Permalink
Avoid a type error
Browse files Browse the repository at this point in the history
  • Loading branch information
bakert committed Oct 20, 2024
1 parent 3bd6e1f commit addba05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
6 changes: 2 additions & 4 deletions gatherling/Models/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -1806,12 +1806,10 @@ public function startEvent(bool $precheck): void

public function structureSummary(): string
{

$ret = $this->toEnglish($this->mainstruct, $this->mainrounds, false);
$ret = $this->toEnglish($this->mainstruct, (int) $this->mainrounds, false);
if ($this->finalrounds > 0) {
$ret = $ret . ' followed by ' . $this->toEnglish($this->finalstruct, $this->finalrounds, true);
$ret = $ret . ' followed by ' . $this->toEnglish($this->finalstruct, (int) $this->finalrounds, true);
}

return $ret;
}

Expand Down
10 changes: 0 additions & 10 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -395,16 +395,6 @@ parameters:
count: 17
path: gatherling/Models/Event.php

-
message: "#^Parameter \\#2 \\$rounds of method Gatherling\\\\Models\\\\Event\\:\\:toEnglish\\(\\) expects int, int\\<1, max\\>\\|string given\\.$#"
count: 1
path: gatherling/Models/Event.php

-
message: "#^Parameter \\#2 \\$rounds of method Gatherling\\\\Models\\\\Event\\:\\:toEnglish\\(\\) expects int, int\\|string given\\.$#"
count: 1
path: gatherling/Models/Event.php

-
message: "#^Parameter \\#2 \\$subevent of static method Gatherling\\\\Models\\\\Standings\\:\\:updateStandings\\(\\) expects int, int\\|null given\\.$#"
count: 3
Expand Down

0 comments on commit addba05

Please sign in to comment.