From 6ac76d2fd7356cd1b1203f98af48393416b98deb Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Thu, 8 Feb 2024 10:31:42 +0000 Subject: [PATCH] style: add missing generic type usage --- README.md | 2 +- composer.json | 6 +++--- src/Casts/ToFieldCaster.php | 2 ++ src/Models/MultiFactor.php | 2 +- tests/Pest.php | 4 +++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2981b80..2c393e1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/worksome/laravel-mfa/Static%20Analysis?style=flat-square&label=code%20style)](https://github.com/worksome/laravel-mfa/actions?query=workflow%3A"Static+Analysis"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/worksome/laravel-mfa.svg?style=flat-square)](https://packagist.org/packages/worksome/laravel-mfa) -A driver-based multifactor authentication package for Laravel +A driver-based multi-factor authentication package for Laravel ## Installation diff --git a/composer.json b/composer.json index 311ee04..ba10ce8 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "worksome/laravel-mfa", - "description": "A driver-based multifactor authentication package for Laravel", + "description": "A driver-based multi-factor authentication package for Laravel", "keywords": [ "worksome", "laravel", @@ -23,12 +23,12 @@ "spatie/laravel-package-tools": "^1.16" }, "require-dev": { - "nunomaduro/collision": "^7.0 || ^8.1", "larastan/larastan": "^2.6", + "nunomaduro/collision": "^7.0 || ^8.1", "orchestra/testbench": "^8.0 || ^9.0", "pestphp/pest": "^2.33", "pestphp/pest-plugin-laravel": "^2.2", - "worksome/coding-style": "^2.8" + "worksome/coding-style": "^2.10" }, "autoload": { "psr-4": { diff --git a/src/Casts/ToFieldCaster.php b/src/Casts/ToFieldCaster.php index 0f66474..6d1a32d 100644 --- a/src/Casts/ToFieldCaster.php +++ b/src/Casts/ToFieldCaster.php @@ -7,12 +7,14 @@ use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use InvalidArgumentException; use Worksome\MultiFactorAuth\DataValues\Email\EmailAddress; +use Worksome\MultiFactorAuth\DataValues\Identifier; use Worksome\MultiFactorAuth\DataValues\Sms\E164PhoneNumber; use Worksome\MultiFactorAuth\DataValues\Totp\TotpSecret; use Worksome\MultiFactorAuth\Enums\Channel; use Worksome\MultiFactorAuth\Exceptions\InvalidValueException; use Worksome\MultiFactorAuth\Models\MultiFactor; +/** @implements CastsAttributes */ class ToFieldCaster implements CastsAttributes { /** @param MultiFactor $model */ diff --git a/src/Models/MultiFactor.php b/src/Models/MultiFactor.php index 5c8d7c1..643e21d 100644 --- a/src/Models/MultiFactor.php +++ b/src/Models/MultiFactor.php @@ -27,7 +27,7 @@ * @property Carbon|null $verified_at * @property Carbon $created_at * @property Carbon $updated_at - * @property MultiFactorAuthenticatable $&Model $user + * @property Model&MultiFactorAuthenticatable $user */ class MultiFactor extends Model { diff --git a/tests/Pest.php b/tests/Pest.php index 1c8800e..2e878f1 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,8 +1,10 @@ in(__DIR__ . '/Feature'); +uses(TestCase::class)->in('Feature'); // Test functions