Fix phpstan errors

This commit is contained in:
Oliver Davies 2025-06-15 17:22:37 +01:00
parent af83b3c431
commit 229cc62b03
8 changed files with 16 additions and 17 deletions

View file

@ -19,7 +19,7 @@ final class Guests implements \Countable, \IteratorAggregate, \Stringable {
return sprintf('%s %s %s', $this->first()->getName(), t('and'), $this->get(1)->getName());
}
return strval($this->first()->getName());
return strval($this->first()?->getName());
}
public function count(): int {
@ -48,7 +48,7 @@ final class Guests implements \Countable, \IteratorAggregate, \Stringable {
Assert::allIsInstanceOf($guests, Guest::class);
}
private function get(int $offset): ?Guest {
private function get(int $offset): Guest {
return $this->guests[$offset];
}