Various PSR12 code cleanup

This commit is contained in:
James Cole
2022-12-29 19:42:26 +01:00
parent dbf3e76ecc
commit 6cfdc58cb1
415 changed files with 7462 additions and 6874 deletions

View File

@@ -1,4 +1,5 @@
<?php
/**
* Preference.php
* Copyright (c) 2019 james@firefly-iii.org
@@ -33,13 +34,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\Preference
*
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property int $user_id
* @property string $name
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property int $user_id
* @property string $name
* @property int|string|array|null $data
* @property-read User $user
* @property-read User $user
* @method static Builder|Preference newModelQuery()
* @method static Builder|Preference newQuery()
* @method static Builder|Preference query()
@@ -71,7 +72,7 @@ class Preference extends Model
/**
* Route binder. Converts the key in the URL to the specified object (or throw 404).
*
* @param string $value
* @param string $value
*
* @return Preference
* @throws NotFoundHttpException
@@ -84,7 +85,7 @@ class Preference extends Model
/** @var Preference|null $preference */
$preference = $user->preferences()->where('name', $value)->first();
if (null === $preference) {
$preference = $user->preferences()->where('id', (int) $value)->first();
$preference = $user->preferences()->where('id', (int)$value)->first();
}
if (null !== $preference) {
return $preference;