Skip to content

Commit

Permalink
fix: stubs not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Oct 29, 2023
1 parent d2f68b8 commit bd4427d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 27 deletions.
11 changes: 7 additions & 4 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@

(new Extend\Model(Discussion::class))
->belongsTo('bestAnswerPost', Post::class, 'best_answer_post_id')
->belongsTo('bestAnswerUser', User::class, 'best_answer_user_id'),
->belongsTo('bestAnswerUser', User::class, 'best_answer_user_id')
->cast('best_answer_post_id', 'int')
->cast('best_answer_user_id', 'int')
->cast('best_answer_set_at', 'datetime')
->cast('best_answer_notified', 'boolean'),

(new Extend\View())
->namespace('fof-best-answer', __DIR__.'/resources/views'),
Expand All @@ -56,9 +60,8 @@
->cast('is_qna', 'boolean')
->cast('qna_reminders', 'boolean'),

(new Extend\Model(Discussion::class))
->cast('best_answer_set_at', 'datetime')
->cast('best_answer_notified', 'boolean'),
(new Extend\Model(User::class))
->cast('best_answer_count', 'int'),

(new Extend\Event())
->listen(Saving::class, Listeners\SaveBestAnswerToDatabase::class)
Expand Down
5 changes: 1 addition & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ parameters:
# The level will be increased in Flarum 2.0
level: 5
paths:
- src
- extend.php
- src
excludePaths:
- *.blade.php
checkMissingIterableValueType: false
databaseMigrationsPath: ['migrations']
stubFiles:
- stubs/User.stub
- stubs/Discussion.stub

11 changes: 0 additions & 11 deletions stubs/Discussion.stub

This file was deleted.

8 changes: 0 additions & 8 deletions stubs/User.stub

This file was deleted.

0 comments on commit bd4427d

Please sign in to comment.