Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docblocks for model factories #296

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ parameters:
level: 6

ignoreErrors:
- '#PHPDoc tag \@use contains generic type Illuminate\\Database\\Eloquent\\Factories\\HasFactory\<AshAllenDesign\\ShortURL\\Models\\ShortURL\> but trait Illuminate\\Database\\Eloquent\\Factories\\HasFactory is not generic\.#'
- '#PHPDoc tag \@use contains generic type Illuminate\\Database\\Eloquent\\Factories\\HasFactory\<AshAllenDesign\\ShortURL\\Models\\ShortURLVisit\> but trait Illuminate\\Database\\Eloquent\\Factories\\HasFactory is not generic\.#'

checkMissingIterableValueType: false
4 changes: 4 additions & 0 deletions src/Models/ShortURL.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AshAllenDesign\ShortURL\Models;

use AshAllenDesign\ShortURL\Models\Factories\ShortURLFactory;
use Carbon\CarbonInterface;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\Factory;
Expand Down Expand Up @@ -34,7 +35,10 @@
*/
class ShortURL extends Model
{
/**
* @use HasFactory<ShortURLFactory>
*/
use HasFactory;

Check failure on line 41 in src/Models/ShortURL.php

View workflow job for this annotation

GitHub Actions / PHP8.1 - Laravel 10.*

PHPDoc tag @use contains generic type Illuminate\Database\Eloquent\Factories\HasFactory<AshAllenDesign\ShortURL\Models\Factories\ShortURLFactory> but trait Illuminate\Database\Eloquent\Factories\HasFactory is not generic.

Check failure on line 41 in src/Models/ShortURL.php

View workflow job for this annotation

GitHub Actions / PHP8.2 - Laravel 10.*

PHPDoc tag @use contains generic type Illuminate\Database\Eloquent\Factories\HasFactory<AshAllenDesign\ShortURL\Models\Factories\ShortURLFactory> but trait Illuminate\Database\Eloquent\Factories\HasFactory is not generic.

Check failure on line 41 in src/Models/ShortURL.php

View workflow job for this annotation

GitHub Actions / PHP8.3 - Laravel 10.*

PHPDoc tag @use contains generic type Illuminate\Database\Eloquent\Factories\HasFactory<AshAllenDesign\ShortURL\Models\Factories\ShortURLFactory> but trait Illuminate\Database\Eloquent\Factories\HasFactory is not generic.

/**
* The table associated with the model.
Expand Down
4 changes: 4 additions & 0 deletions src/Models/ShortURLVisit.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AshAllenDesign\ShortURL\Models;

use AshAllenDesign\ShortURL\Models\Factories\ShortURLVisitFactory;
use Carbon\CarbonInterface;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
Expand All @@ -26,7 +27,10 @@
*/
class ShortURLVisit extends Model
{
/**
* @use HasFactory<ShortURLVisitFactory>
*/
use HasFactory;

Check failure on line 33 in src/Models/ShortURLVisit.php

View workflow job for this annotation

GitHub Actions / PHP8.1 - Laravel 10.*

PHPDoc tag @use contains generic type Illuminate\Database\Eloquent\Factories\HasFactory<AshAllenDesign\ShortURL\Models\Factories\ShortURLVisitFactory> but trait Illuminate\Database\Eloquent\Factories\HasFactory is not generic.

Check failure on line 33 in src/Models/ShortURLVisit.php

View workflow job for this annotation

GitHub Actions / PHP8.2 - Laravel 10.*

PHPDoc tag @use contains generic type Illuminate\Database\Eloquent\Factories\HasFactory<AshAllenDesign\ShortURL\Models\Factories\ShortURLVisitFactory> but trait Illuminate\Database\Eloquent\Factories\HasFactory is not generic.

Check failure on line 33 in src/Models/ShortURLVisit.php

View workflow job for this annotation

GitHub Actions / PHP8.3 - Laravel 10.*

PHPDoc tag @use contains generic type Illuminate\Database\Eloquent\Factories\HasFactory<AshAllenDesign\ShortURL\Models\Factories\ShortURLVisitFactory> but trait Illuminate\Database\Eloquent\Factories\HasFactory is not generic.

public const DEVICE_TYPE_MOBILE = 'mobile';

Expand Down
Loading