mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Fix various phpstan issues.
This commit is contained in:
@@ -25,12 +25,13 @@ namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\RecurrenceRepetition
|
||||
*
|
||||
@@ -38,11 +39,11 @@ use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Carbon|null $deleted_at
|
||||
* @property int $recurrence_id
|
||||
* @property int $recurrence_id
|
||||
* @property string $repetition_type
|
||||
* @property string $repetition_moment
|
||||
* @property int|string $repetition_skip
|
||||
* @property int|string $weekend
|
||||
* @property int $repetition_skip
|
||||
* @property int $weekend
|
||||
* @property-read Recurrence $recurrence
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newQuery()
|
||||
@@ -104,4 +105,24 @@ class RecurrenceRepetition extends Model
|
||||
get: static fn($value) => (int)$value,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Attribute
|
||||
*/
|
||||
protected function repetitionSkip(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: static fn($value) => (int)$value,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Attribute
|
||||
*/
|
||||
protected function weekend(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: static fn($value) => (int)$value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user