static code analysis fixes

This commit is contained in:
Dennis Eichhorn 2022-04-05 20:04:47 +02:00
parent ba5217dda4
commit 56b55e1de5
6 changed files with 8 additions and 8 deletions

View File

@ -622,7 +622,7 @@ final class ApiController extends Controller
*/
public function apiSettingsDesignSet(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
{
$uploadedFiles = $request->getFiles() ?? [];
$uploadedFiles = $request->getFiles();
if (!empty($uploadedFiles)) {
$upload = new UploadFile();
@ -674,7 +674,7 @@ final class ApiController extends Controller
// handle app installation
$result = $appManager->install(
__DIR__ . '/../../../' . $app,
__DIR__ . '/../../../' . $request->getData('appDest') ?? '',
__DIR__ . '/../../../' . ($request->getData('appDest') ?? ''),
$request->getData('theme') ?? 'Default'
);
@ -1114,7 +1114,7 @@ final class ApiController extends Controller
$this->app->l11nServer === null ? $request->header->l11n->jsonSerialize() : $this->app->l11nServer->jsonSerialize()
);
} else {
$locale = \explode('_', $request->getData('locale') ?? '');
$locale = \explode('_', $request->getData('locale'));
$account->l11n
->loadFromLanguage(

View File

@ -462,7 +462,7 @@ final class BackendController extends Controller
$module = $request->getData('id') ?? '';
$view->setData('module', $module);
$appPath = __DIR__ . '/../../../Web';
$appPath = __DIR__ . '/../../../Web';
$activeHooks = [];
$apps = \scandir($appPath);

View File

@ -27,7 +27,7 @@ final class AccountCredentialMapper extends AccountMapper
/**
* Columns.
*
* @var array<string, array<string, bool|string|array>>
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
* @since 1.0.0
*/
public const COLUMNS = [

View File

@ -32,7 +32,7 @@ class AccountMapper extends DataMapperFactory
/**
* Columns.
*
* @var array<string, array<string, bool|string|array>>
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
* @since 1.0.0
*/
public const COLUMNS = [

View File

@ -29,7 +29,7 @@ final class AppMapper extends DataMapperFactory
/**
* Columns.
*
* @var array<string, array<string, bool|string|array>>
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
* @since 1.0.0
*/
public const COLUMNS = [

View File

@ -12,7 +12,7 @@
"friendsofphp/php-cs-fixer": ">=3.2",
"squizlabs/php_codesniffer": ">=3.6",
"phpmd/phpmd": ">=2.9",
"phpstan/phpstan": ">=0.12.58",
"phpstan/phpstan": ">=1.5.4",
"phan/phan": ">=3.2.6"
},
"minimum-stability": "dev",