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
/**
* RuleGroup.php
* Copyright (c) 2019 james@firefly-iii.org
@@ -36,19 +37,19 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\RuleGroup
*
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
* @property int $user_id
* @property string $title
* @property string|null $description
* @property int $order
* @property bool $active
* @property bool $stop_processing
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
* @property int $user_id
* @property string $title
* @property string|null $description
* @property int $order
* @property bool $active
* @property bool $stop_processing
* @property Collection|Rule[] $rules
* @property-read int|null $rules_count
* @property-read User $user
* @property-read int|null $rules_count
* @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newQuery()
* @method static Builder|RuleGroup onlyTrashed()
@@ -66,7 +67,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|RuleGroup withTrashed()
* @method static Builder|RuleGroup withoutTrashed()
* @mixin Eloquent
* @property int|null $user_group_id
* @property int|null $user_group_id
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereUserGroupId($value)
*/
class RuleGroup extends Model
@@ -94,7 +95,7 @@ class RuleGroup extends Model
/**
* Route binder. Converts the key in the URL to the specified object (or throw 404).
*
* @param string $value
* @param string $value
*
* @return RuleGroup
* @throws NotFoundHttpException
@@ -102,7 +103,7 @@ class RuleGroup extends Model
public static function routeBinder(string $value): RuleGroup
{
if (auth()->check()) {
$ruleGroupId = (int) $value;
$ruleGroupId = (int)$value;
/** @var User $user */
$user = auth()->user();
/** @var RuleGroup $ruleGroup */
@@ -114,15 +115,6 @@ class RuleGroup extends Model
throw new NotFoundHttpException();
}
/**
* @codeCoverageIgnore
* @return HasMany
*/
public function rules(): HasMany
{
return $this->hasMany(Rule::class);
}
/**
* @codeCoverageIgnore
* @return BelongsTo
@@ -131,4 +123,13 @@ class RuleGroup extends Model
{
return $this->belongsTo(User::class);
}
/**
* @codeCoverageIgnore
* @return HasMany
*/
public function rules(): HasMany
{
return $this->hasMany(Rule::class);
}
}