Improve TIntermediateModels generics and add inheritDoc #95
Annotations
7 errors
phpstan (8.3, stable):
src/Relations/BelongsToThrough.php#L234
Method Znck\Eloquent\Relations\BelongsToThrough::getResults() should return TResult but returns object|null.
|
phpstan (8.3, stable):
src/Traits/BelongsToThrough.php (in context of class Tests/IdeHelper/Models/Comment)#L26
Template type TIntermediateModels of method Tests\IdeHelper\Models\Comment::belongsToThrough() is not referenced in a parameter.
|
phpstan (8.3, stable):
src/Traits/BelongsToThrough.php (in context of class Tests/IdeHelper/Models/Comment)#L66
Method Tests\IdeHelper\Models\Comment::belongsToThrough() should return Znck\Eloquent\Relations\BelongsToThrough<TRelatedModel of Illuminate\Database\Eloquent\Model, TIntermediateModels of array<int, TIntermediateModel of Illuminate\Database\Eloquent\Model>, $this(Tests\IdeHelper\Models\Comment)> but returns Znck\Eloquent\Relations\BelongsToThrough<TRelatedModel of Illuminate\Database\Eloquent\Model, array<int, TIntermediateModel of Illuminate\Database\Eloquent\Model>, $this(Tests\IdeHelper\Models\Comment)>.
|
phpstan (8.3, stable):
src/Traits/BelongsToThrough.php (in context of class Tests/Models/Model)#L26
Template type TIntermediateModels of method Tests\Models\Model::belongsToThrough() is not referenced in a parameter.
|
phpstan (8.3, stable):
src/Traits/BelongsToThrough.php (in context of class Tests/Models/Model)#L66
Method Tests\Models\Model::belongsToThrough() should return Znck\Eloquent\Relations\BelongsToThrough<TRelatedModel of Illuminate\Database\Eloquent\Model, TIntermediateModels of array<int, TIntermediateModel of Illuminate\Database\Eloquent\Model>, $this(Tests\Models\Model)> but returns Znck\Eloquent\Relations\BelongsToThrough<TRelatedModel of Illuminate\Database\Eloquent\Model, array<int, TIntermediateModel of Illuminate\Database\Eloquent\Model>, $this(Tests\Models\Model)>.
|
phpstan (8.3, stable):
tests/Models/Comment.php#L22
Method Tests\Models\Comment::country() should return Znck\Eloquent\Relations\BelongsToThrough<Tests\Models\Country, array{Tests\Models\User, Tests\Models\Post}, $this(Tests\Models\Comment)> but returns Znck\Eloquent\Relations\BelongsToThrough<Tests\Models\Country, array<int, Tests\Models\Post|Tests\Models\User>, $this(Tests\Models\Comment)>.
|
phpstan (8.3, stable)
Process completed with exit code 1.
|