mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-09-09 06:29:32 +03:00
Maintenance: Updated larastan target level, fixed issues from tests
This commit is contained in:
@@ -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.
|
||||||
|
@@ -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) {
|
||||||
|
@@ -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();
|
||||||
}
|
}
|
||||||
|
@@ -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
|
||||||
|
@@ -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,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user