Skip to content

Commit e67ba27

Browse files
committed
raise phpstan level to max
1 parent ecfc322 commit e67ba27

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ parameters:
77
- src
88

99
# The level 8 is the highest level
10-
level: 5
10+
level: 8
1111

1212
checkMissingIterableValueType: false

src/Controllers/ModelPermalinkController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
namespace OpenSoutheners\LaravelModelPermalink\Controllers;
44

55
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
6+
use Illuminate\Http\RedirectResponse;
67
use Illuminate\Routing\Controller;
78
use Illuminate\Support\Facades\Response;
89

910
class ModelPermalinkController extends Controller
1011
{
1112
use AuthorizesRequests;
1213

13-
public function __invoke(string $permalink)
14+
/**
15+
* Invoke controller action.
16+
*/
17+
public function __invoke(string $permalink): RedirectResponse
1418
{
1519
/** @var class-string<\OpenSoutheners\LaravelModelPermalink\ModelPermalink> $model */
1620
$model = config('model-permalink.model');

src/ModelPermalink.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/**
1010
* @property string $id
1111
* @property string $uuid
12+
* @property \OpenSoutheners\LaravelModelPermalink\PermalinkAccess $model
1213
* @property string $model_id
1314
* @property string $model_type
1415
*/
@@ -35,6 +36,8 @@ public function uniqueIds()
3536

3637
/**
3738
* Model that is being permalinked.
39+
*
40+
* @return \Illuminate\Database\Eloquent\Relations\MorphTo<\Illuminate\Database\Eloquent\Model, self>
3841
*/
3942
public function model(): MorphTo
4043
{

0 commit comments

Comments
 (0)