1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-09-07 18:07:29 +03:00

Maintenance: Updated larastan target level, fixed issues from tests

This commit is contained in:
Dan Brown
2025-09-03 15:42:50 +01:00
parent 318b486e0b
commit 7d1c316202
5 changed files with 7 additions and 7 deletions

View File

@@ -30,7 +30,7 @@ class ExternalBaseSessionGuard implements StatefulGuard
/** /**
* The user we last attempted to retrieve. * The user we last attempted to retrieve.
*/ */
protected Authenticatable $lastAttempted; protected Authenticatable|null $lastAttempted;
/** /**
* The session used by the guard. * The session used by the guard.

View File

@@ -52,7 +52,7 @@ class UpdateUrlCommand extends Command
'page_revisions' => ['html', 'text', 'markdown'], 'page_revisions' => ['html', 'text', 'markdown'],
'images' => ['url'], 'images' => ['url'],
'settings' => ['value'], 'settings' => ['value'],
'comments' => ['html', 'text'], 'comments' => ['html'],
]; ];
foreach ($columnsToUpdateByTable as $table => $columns) { foreach ($columnsToUpdateByTable as $table => $columns) {

View File

@@ -9,6 +9,7 @@ use BookStack\Entities\Models\Deletion;
use BookStack\Entities\Models\Page; use BookStack\Entities\Models\Page;
use BookStack\Entities\Repos\DeletionRepo; use BookStack\Entities\Repos\DeletionRepo;
use BookStack\Http\ApiController; use BookStack\Http\ApiController;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasMany;
class RecycleBinApiController extends ApiController class RecycleBinApiController extends ApiController
@@ -69,7 +70,7 @@ class RecycleBinApiController extends ApiController
/** /**
* Load some related details for the deletion listing. * Load some related details for the deletion listing.
*/ */
protected function listFormatter(Deletion $deletion) protected function listFormatter(Deletion $deletion): void
{ {
$deletable = $deletion->deletable; $deletable = $deletion->deletable;
@@ -89,9 +90,9 @@ class RecycleBinApiController extends ApiController
} }
/** /**
* @param HasMany<Chapter|Page, Book|Chapter> $query * @param Builder<Chapter|Page> $query
*/ */
protected static function withTrashedQuery(HasMany $query): void protected static function withTrashedQuery(Builder $query): void
{ {
$query->withTrashed(); $query->withTrashed();
} }

View File

@@ -7,7 +7,7 @@ parameters:
- app - app
# The level 8 is the highest level # The level 8 is the highest level
level: 2 level: 3
phpVersion: phpVersion:
min: 80200 min: 80200

View File

@@ -27,7 +27,6 @@ class CommentStoreTest extends TestCase
'local_id' => 1, 'local_id' => 1,
'entity_id' => $page->id, 'entity_id' => $page->id,
'entity_type' => Page::newModelInstance()->getMorphClass(), 'entity_type' => Page::newModelInstance()->getMorphClass(),
'text' => null,
'parent_id' => 2, 'parent_id' => 2,
]); ]);