mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-06 01:45:22 +00:00
Clean up code, remove unused methods.
This commit is contained in:
@@ -73,7 +73,10 @@ class ImportJob extends Model
|
||||
{
|
||||
if (auth()->check()) {
|
||||
$key = trim($value);
|
||||
$importJob = auth()->user()->importJobs()->where('key', $key)->first();
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
/** @var ImportJob $importJob */
|
||||
$importJob = $user->importJobs()->where('key', $key)->first();
|
||||
if (null !== $importJob) {
|
||||
return $importJob;
|
||||
}
|
||||
@@ -85,7 +88,7 @@ class ImportJob extends Model
|
||||
* @codeCoverageIgnore
|
||||
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
|
||||
*/
|
||||
public function attachments()
|
||||
public function attachments(): \Illuminate\Database\Eloquent\Relations\MorphMany
|
||||
{
|
||||
return $this->morphMany(Attachment::class, 'attachable');
|
||||
}
|
||||
@@ -94,7 +97,7 @@ class ImportJob extends Model
|
||||
* @codeCoverageIgnore
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function tag()
|
||||
public function tag(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Tag::class);
|
||||
}
|
||||
@@ -103,7 +106,7 @@ class ImportJob extends Model
|
||||
* @codeCoverageIgnore
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user()
|
||||
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user