From f1c3abe2db03ec112075574c1419ee547e5f7c13 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 5 Apr 2022 20:04:47 +0200 Subject: [PATCH] static code analysis fixes --- Config/.eslintrc.json | 47 +------------------------------------------ Config/phpstan.neon | 4 +++- 2 files changed, 4 insertions(+), 47 deletions(-) diff --git a/Config/.eslintrc.json b/Config/.eslintrc.json index 99eb2c7..91caea6 100644 --- a/Config/.eslintrc.json +++ b/Config/.eslintrc.json @@ -22,6 +22,7 @@ "history": "readonly", "screen": "readonly", "Image": "readonly", + "Blob": "readonly", "Notification": "readonly", "XMLHttpRequest": "readonly", "HTMLElement": "readonly", @@ -147,52 +148,6 @@ "error", "consistent" ], - "indent": [ - "warn", - 4, - { - "SwitchCase": 1, - "VariableDeclarator": 1, - "outerIIFEBody": 1, - "MemberExpression": 1, - "FunctionDeclaration": { - "parameters": 1, - "body": 1 - }, - "FunctionExpression": { - "parameters": 1, - "body": 1 - }, - "CallExpression": { - "arguments": "off" - }, - "ArrayExpression": 1, - "ObjectExpression": 1, - "ImportDeclaration": 1, - "flatTernaryExpressions": false, - "ignoreComments": false, - "ignoredNodes": [ - "TemplateLiteral *", - "JSXElement", - "JSXElement > *", - "JSXAttribute", - "JSXIdentifier", - "JSXNamespacedName", - "JSXMemberExpression", - "JSXSpreadAttribute", - "JSXExpressionContainer", - "JSXOpeningElement", - "JSXClosingElement", - "JSXFragment", - "JSXOpeningFragment", - "JSXClosingFragment", - "JSXText", - "JSXEmptyExpression", - "JSXSpreadChild" - ], - "offsetTernaryExpressions": true - } - ], "key-spacing": [ "error", { diff --git a/Config/phpstan.neon b/Config/phpstan.neon index 64a958a..9a56271 100755 --- a/Config/phpstan.neon +++ b/Config/phpstan.neon @@ -8,7 +8,7 @@ parameters: checkMissingIterableValueType: false checkGenericClassInNonGenericObjectType: false treatPhpDocTypesAsCertain: false - excludes_analyse: + excludePaths: - *.tpl.php - */tests/* - */Modules/Media/Files/* @@ -43,6 +43,8 @@ parameters: - */Modules/Organization/Controller/BackendController.php - *Model/CoreSettings.php ignoreErrors: + - '#[.]*tag @var for constant .* is not subtype of value array[.]*#' + - '#[.]*Offset .* on array.* always exists[.]*#' - '#[.]*separator of function explode expects non-empty-string[.]*#' - '#[.]*PhpOffice\\PhpSpreadsheet\\[.]*#' - '#^Call to an undefined method phpOMS\\Module\\ModuleAbstract::[.]*#'