Final set of php8.4 changes.

This commit is contained in:
James Cole
2025-05-04 13:50:20 +02:00
parent 51e86448c7
commit 194d22ad90
58 changed files with 151 additions and 157 deletions

View File

@@ -44,7 +44,7 @@ class AttachmentFactory
public function create(array $data): ?Attachment
{
// append if necessary.
$model = !str_contains($data['attachable_type'], 'FireflyIII') ? sprintf('FireflyIII\Models\%s', $data['attachable_type'])
$model = !str_contains((string) $data['attachable_type'], 'FireflyIII') ? sprintf('FireflyIII\Models\%s', $data['attachable_type'])
: $data['attachable_type'];
// get journal instead of transaction.

View File

@@ -59,7 +59,7 @@ class RecurrenceFactory
public function create(array $data): Recurrence
{
try {
$type = $this->findTransactionType(ucfirst($data['recurrence']['type']));
$type = $this->findTransactionType(ucfirst((string) $data['recurrence']['type']));
} catch (FireflyException $e) {
$message = sprintf('Cannot make a recurring transaction of type "%s"', $data['recurrence']['type']);
app('log')->error($message);

View File

@@ -77,7 +77,7 @@ class TagFactory
$array = [
'user_id' => $this->user->id,
'user_group_id' => $this->userGroup->id,
'tag' => trim($data['tag']),
'tag' => trim((string) $data['tag']),
'tagMode' => 'nothing',
'date' => $data['date'],
'description' => $data['description'],

View File

@@ -71,7 +71,7 @@ class TransactionGroupFactory
$title = '' === $title ? null : $title;
if (null !== $title) {
$title = substr($title, 0, 1000);
$title = substr((string) $title, 0, 1000);
}
if (0 === $collection->count()) {
throw new FireflyException('Created zero transaction journals.');