Skip to content

Commit

Permalink
Upgrade to PHPStan 2 (#107)
Browse files Browse the repository at this point in the history
* Upgrade to PHPStan 2

* Increase PHPStan level

* Upgrade to PHPStan 2
  • Loading branch information
staudenmeir authored Nov 17, 2024
1 parent a5e352d commit 8d918db
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![CI](https://github.com/staudenmeir/belongs-to-through/actions/workflows/ci.yml/badge.svg)](https://github.com/staudenmeir/belongs-to-through/actions/workflows/ci.yml?query=branch%3Amain)
[![Code Coverage](https://codecov.io/gh/staudenmeir/belongs-to-through/graph/badge.svg?token=Z4KscVFWIE)](https://codecov.io/gh/staudenmeir/belongs-to-through)
[![PHPStan](https://img.shields.io/badge/PHPStan-level%209-brightgreen.svg?style=flat)](https://github.com/staudenmeir/belongs-to-through/actions/workflows/static-analysis.yml?query=branch%3Amain)
[![PHPStan](https://img.shields.io/badge/PHPStan-level%2010-brightgreen.svg?style=flat)](https://github.com/staudenmeir/belongs-to-through/actions/workflows/static-analysis.yml?query=branch%3Amain)
[![Latest Stable Version](https://poser.pugx.org/staudenmeir/belongs-to-through/v/stable)](https://packagist.org/packages/staudenmeir/belongs-to-through)
[![Total Downloads](https://poser.pugx.org/staudenmeir/belongs-to-through/downloads)](https://packagist.org/packages/staudenmeir/belongs-to-through/stats)
[![License](https://poser.pugx.org/staudenmeir/belongs-to-through/license)](https://github.com/staudenmeir/belongs-to-through/blob/main/LICENSE)
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^3.0",
"larastan/larastan": "^2.9",
"orchestra/testbench": "^9.0",
"laravel/framework": "^11.0",
"larastan/larastan": "^3.0",
"mockery/mockery": "^1.5.1",
"orchestra/testbench-core": "^9.5",
"phpunit/phpunit": "^11.0"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameters:
level: 9
level: 10
paths:
- src
2 changes: 1 addition & 1 deletion phpstan.types.neon.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
includes:
- ./vendor/larastan/larastan/extension.neon
parameters:
level: 9
level: 10
paths:
- types
1 change: 1 addition & 0 deletions src/Relations/BelongsToThrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ protected function performJoins(?Builder $query = null)
$query->join($model->getTable(), $first, '=', $second);

if ($this->hasSoftDeletes($model)) {
/** @var string $column */
/** @phpstan-ignore method.notFound */
$column = $model->getQualifiedDeletedAtColumn();

Expand Down
3 changes: 3 additions & 0 deletions src/Traits/BelongsToThrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
use Illuminate\Database\Eloquent\Model;
use Znck\Eloquent\Relations\BelongsToThrough as Relation;

/**
* @phpstan-ignore trait.unused
*/
trait BelongsToThrough
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Traits/HasTableAlias.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Znck\Eloquent\Traits;

/**
* @phpstan-ignore trait.unused
*/
trait HasTableAlias
{
/** @inheritDoc */
Expand Down

0 comments on commit 8d918db

Please sign in to comment.