Skip to content

Commit 5c43956

Browse files
committed
phpstan
1 parent e630d2c commit 5c43956

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

database/factories/DocumentFactory.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ class DocumentFactory extends Factory
99
{
1010
protected $model = Document::class;
1111

12-
/**
13-
* Define the model's default state.
14-
*
15-
* @return array<string, mixed>
16-
*/
1712
public function definition(): array
1813
{
1914
return [

database/factories/LinkFactory.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ class LinkFactory extends Factory
99
{
1010
protected $model = Link::class;
1111

12-
/**
13-
* Define the model's default state.
14-
*
15-
* @return array<string, mixed>
16-
*/
1712
public function definition(): array
1813
{
1914
return [

phpstan.neon.dist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
level: 5
5+
level: 4
66
paths:
77
- src
88
- config
99
- database
1010
tmpDir: build/phpstan
1111
checkOctaneCompatibility: true
1212
checkModelProperties: true
13+
reportUnmatchedIgnoredErrors: false
14+
ignoreErrors:
15+
- '#Static property .* \(view-string\) does not accept#'

src/LmsPanelProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,13 @@ public function navigationItems(NavigationBuilder $builder): NavigationBuilder
110110
$course = Course::where('slug', Route::current()->parameter('courseSlug'))->firstOrFail();
111111

112112
$navigationGroups = $course->lessons->map(function ($lesson) {
113+
/** @var \Tapp\FilamentLms\Models\Lesson $lesson */
113114
return NavigationGroup::make($lesson->name)
114115
// TODO collapsed is not working
115116
// ->collapsed(fn (): bool => ! $lesson->isActive())
116117
// ->collapsible(true)
117118
->items($lesson->steps->map(function ($step) {
119+
/** @var \Tapp\FilamentLms\Models\Step $step */
118120
return NavigationItem::make($step->name)
119121
->icon(fn (): string => $step->completed_at ? 'heroicon-o-check-circle' : '')
120122
->isActiveWhen(fn (): bool => $step->isActive())

0 commit comments

Comments
 (0)