mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 04:34:00 +00:00
Various PSR12 code cleanup
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user