#-------------------------------------------------------------------------------#
#               Qodana analysis is configured by qodana.yaml file                 #
#             https://www.jetbrains.com/help/qodana/qodana-yaml.html            #
#-------------------------------------------------------------------------------#
version: "1.0"
#Specify inspection profile for code analysis
profile:
  name: qodana.starter
#Enable inspections
include:
  - name: PhpCurlyBraceAccessSyntaxUsageInspection
  - name: PhpInconsistentReturnPointsInspection
  - name: PhpSwitchStatementWitSingleBranchInspection
  - name: PhpArrayAccessCanBeReplacedWithForeachValueInspection
  - name: PhpConditionCanBeReplacedWithMinMaxCallInspection
  - name: PhpReturnValueOfMethodIsNeverUsedInspection
  - name: PhpMethodParametersCountMismatchInspection
  - name: PhpRedundantOptionalArgumentInspection
  - name: PhpTernaryExpressionCanBeReplacedWithConditionInspection
  - name: PhpUnnecessaryLocalVariableInspection
  - name: PhpUnnecessarySemicolonInspection
  - name: PhpIssetCanBeReplacedWithCoalesceInspection
  - name: PhpMethodOrClassCallIsNotCaseSensitiveInspection
  - name: PhpIllegalPsrClassPathInspection
  - name: PhpDefineCanBeReplacedWithConstInspection
  - name: PhpEnforceDocCommentInspection
  - name: PhpFullyQualifiedNameUsageInspection
  - name: PhpMissingDocCommentInspection
  - name: PhpMultipleClassesDeclarationsInOneFile
  - name: PhpDocSignatureIsNotCompleteInspection
  - name: PhpRedundantClosingTagInspection
  - name: PhpTraditionalSyntaxArrayLiteralInspection
  - name: PhpCastIsUnnecessaryInspection
  - name: PhpUnnecessaryCurlyVarSyntaxInspection
  - name: PhpUnnecessaryDoubleQuotesInspection
  - name: PhpUnnecessaryFullyQualifiedNameInspection
  - name: PhpComposerExtensionStubsInspection
  - name: PhpIfWithCommonPartsInspection
  - name: PhpConditionAlreadyCheckedInspection
  - name: PhpConditionCheckedByNextConditionInspection
  - name: PhpExpressionAlwaysNullInspection
  - name: PhpUnreachableStatementInspection
  - name: PhpWriteAccessToReferencedArrayValueWithoutUnsetInspection
  - name: TrivialIfJS
  - name: TrivialConditionalJS
  - name: PhpUnhandledExceptionInspection
  - name: PhpDocSignatureInspection
  - name: PhpReturnDocTypeMismatchInspection
  - name: PhpStatementHasEmptyBodyInspection
  - name: PhpSeparateElseIfInspection
  - name: PhpMissingVisibilityInspection
  - name: PhpVarUsageInspection
  - name: RegExpRedundantEscape
  - name: RegExpSimplifiable
  - name: PhpCoveredCharacterInClassInspection
  - name: PhpMissingParamTypeInspection
  - name: PhpMissingFieldTypeInspection
  - name: PhpMissingReturnTypeInspection
  - name: PhpDynamicFieldDeclarationInspection
  - name: PhpUnusedAliasInspection
  - name: PhpUnusedLocalVariableInspection
  - name: PhpUnusedPrivateMethodInspection
  - name: PhpArrayPushWithOneElementInspection
  - name: PhpArrayUsedOnlyForWriteInspection
  - name: PhpFormatCallWithSingleArgumentInspection
  - name: PhpLoopCanBeReplacedWithStdFunctionCallsInspection
  - name: PhpPointlessBooleanExpressionInConditionInspection
  - name: PhpPropertyOnlyWrittenInspection
  - name: PhpUnnecessaryStopStatementInspection
  - name: PhpParameterByRefIsNotUsedAsReferenceInspection
  - name: PhpDocMissingThrowsInspection
  - name: UnnecessaryLocalVariableJS
  - name: PhpLongTypeFormInspection
  - name: PhpUnusedParameterInspection
  - name: PhpArrayIsAlwaysEmptyInspection
  - name: PhpIdempotentOperationInspection
  - name: PhpUnnecessaryBoolCastInspection
  - name: PhpArrayAppendUsingCountInspection
  - name: PhpIncludeInspection
  - name: PhpMissingBreakStatementInspection
#Disable inspections
exclude:
  - name: All
    paths:
      - bin
      - css
      - js
      - logs
      - pdf
      - storage
      - templates
  - name: PhpUndefinedConstantInspection
  - name: PhpUndefinedVariableInspection
# Enable scripts
script:
  name: php-migration
  parameters:
    fromLevel: 7.4
    toLevel: 8.3
#php:
#  version: '8.3' #(Applied in CI/CD pipeline)
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
#bootstrap: sh ./prepare-qodana.sh
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
#plugins:
#  - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
linter: jetbrains/qodana-php:latest
