Fix various phpstan issues.

This commit is contained in:
James Cole
2023-11-04 07:18:03 +01:00
parent dc45131f73
commit ef428a0226
42 changed files with 104 additions and 174 deletions

View File

@@ -300,13 +300,9 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
*/
public function getNoteText(PiggyBank $piggyBank): string
{
/** @var Note $note */
/** @var Note|null $note */
$note = $piggyBank->notes()->first();
if (null === $note) {
return '';
}
return $note->text;
return (string)$note?->text;
}
/**