mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 08:24:04 +00:00
fix phpstan errors
This commit is contained in:
parent
2eda22772c
commit
56a6f25dac
2 changed files with 6 additions and 1 deletions
|
|
@ -51,6 +51,10 @@ parameters:
|
|||
- '#Method Stancl\\Tenancy\\Tenancy::cachedResolvers\(\) should return array#'
|
||||
- '#Access to an undefined property Stancl\\Tenancy\\Middleware\\IdentificationMiddleware\:\:\$tenancy#'
|
||||
- '#Access to an undefined property Stancl\\Tenancy\\Middleware\\IdentificationMiddleware\:\:\$resolver#'
|
||||
-
|
||||
message: '#string\|false#'
|
||||
paths:
|
||||
- src/Controllers/TenantAssetController.php
|
||||
|
||||
checkMissingIterableValueType: false
|
||||
checkGenericClassInNonGenericObjectType: false # later we may want to enable this
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ class TenantAssetController implements HasMiddleware // todo@docs this was renam
|
|||
$this->abortIf(! str($attemptedPath)->startsWith($allowedRoot), 'Accessing a file outside the storage root');
|
||||
}
|
||||
|
||||
protected function abortIf($condition, $exceptionMessage): void
|
||||
/** @return void|never */
|
||||
protected function abortIf(bool $condition, string $exceptionMessage = ''): void
|
||||
{
|
||||
if ($condition) {
|
||||
if (app()->runningUnitTests()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue