mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Fix various phpstan issues.
This commit is contained in:
@@ -266,13 +266,9 @@ class RecurringRepository implements RecurringRepositoryInterface
|
||||
*/
|
||||
public function getNoteText(Recurrence $recurrence): string
|
||||
{
|
||||
/** @var Note $note */
|
||||
/** @var Note|null $note */
|
||||
$note = $recurrence->notes()->first();
|
||||
if (null !== $note) {
|
||||
return (string)$note->text;
|
||||
}
|
||||
|
||||
return '';
|
||||
return (string)$note?->text;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -573,12 +569,7 @@ class RecurringRepository implements RecurringRepositoryInterface
|
||||
/** @var RecurrenceFactory $factory */
|
||||
$factory = app(RecurrenceFactory::class);
|
||||
$factory->setUser($this->user);
|
||||
$result = $factory->create($data);
|
||||
if (null === $result) {
|
||||
throw new FireflyException($factory->getErrors()->first());
|
||||
}
|
||||
|
||||
return $result;
|
||||
return $factory->create($data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user