From 74183dfd9948621f7d1274e392922b3b6ac6b3d9 Mon Sep 17 00:00:00 2001 From: mcop1 <89011527+mcop1@users.noreply.github.com> Date: Tue, 21 May 2024 09:58:36 +0200 Subject: [PATCH] [Feature] Dependencies (#57) * Added Hydrator Service, Tags, Repository and basic configurations * Added hydrator service, adapted files accordingly * Added getHydratedDependenciesForElement to controller * 156 Added remaining services and properties * Apply php-cs-fixer changes * 156 Code quality and format optimizations * 156 Integrated DataExtractor service into hydrator * 156 Readded baseline file after merging conflicts * Make consistent and introduce events * Update qodana baseline * Remove space * Add hydratortest * Apply php-cs-fixer changes * Rename result to collection * Renaming --------- Co-authored-by: mcop1 Co-authored-by: mattamon Co-authored-by: mattamon --- config/dependencies.yaml | 21 + qodana.sarif.json | 3051 +++++++++-------- .../Query/DependencyModeParameter.php | 41 + .../Property/DependencyCollection.php | 42 + .../Controller/CollectionController.php | 98 + src/Dependency/Event/DependencyEvent.php | 40 + .../Hydrator/DependencyHydrator.php | 68 + .../Hydrator/DependencyHydratorInterface.php | 27 + .../Repository/DependencyRepository.php | 79 + .../DependencyRepositoryInterface.php | 31 + .../Request/DependencyParameters.php | 70 + src/Dependency/Response/Collection.php | 60 + src/Dependency/Schema/Dependency.php | 70 + src/Dependency/Service/DependencyMode.php | 13 + src/Dependency/Service/DependencyService.php | 109 + .../Service/DependencyServiceInterface.php | 29 + .../PimcoreStudioBackendExtension.php | 1 + src/Dto/Dependency.php | 69 - src/Exception/InvalidDependencyMode.php | 28 + src/OpenApi/Config/Tags.php | 5 + .../Event/PredefinedPropertyEvent.php | 1 + .../Dependency/DependencyHydratorTest.php | 76 + 22 files changed, 2520 insertions(+), 1509 deletions(-) create mode 100644 config/dependencies.yaml create mode 100644 src/Dependency/Attributes/Parameters/Query/DependencyModeParameter.php create mode 100644 src/Dependency/Attributes/Response/Property/DependencyCollection.php create mode 100644 src/Dependency/Controller/CollectionController.php create mode 100644 src/Dependency/Event/DependencyEvent.php create mode 100644 src/Dependency/Hydrator/DependencyHydrator.php create mode 100644 src/Dependency/Hydrator/DependencyHydratorInterface.php create mode 100644 src/Dependency/Repository/DependencyRepository.php create mode 100644 src/Dependency/Repository/DependencyRepositoryInterface.php create mode 100644 src/Dependency/Request/DependencyParameters.php create mode 100644 src/Dependency/Response/Collection.php create mode 100644 src/Dependency/Schema/Dependency.php create mode 100644 src/Dependency/Service/DependencyMode.php create mode 100644 src/Dependency/Service/DependencyService.php create mode 100644 src/Dependency/Service/DependencyServiceInterface.php delete mode 100644 src/Dto/Dependency.php create mode 100644 src/Exception/InvalidDependencyMode.php create mode 100644 tests/Unit/Dependency/DependencyHydratorTest.php diff --git a/config/dependencies.yaml b/config/dependencies.yaml new file mode 100644 index 000000000..31923375d --- /dev/null +++ b/config/dependencies.yaml @@ -0,0 +1,21 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + # controllers are imported separately to make sure they're public + # and have a tag that allows actions to type-hint services + Pimcore\Bundle\StudioBackendBundle\Dependency\Controller\: + resource: '../src/Dependency/Controller' + public: true + tags: [ 'controller.service_arguments' ] + + Pimcore\Bundle\StudioBackendBundle\Dependency\Repository\DependencyRepositoryInterface: + class: Pimcore\Bundle\StudioBackendBundle\Dependency\Repository\DependencyRepository + + Pimcore\Bundle\StudioBackendBundle\Dependency\Service\DependencyServiceInterface: + class: Pimcore\Bundle\StudioBackendBundle\Dependency\Service\DependencyService + + Pimcore\Bundle\StudioBackendBundle\Dependency\Hydrator\DependencyHydratorInterface: + class: Pimcore\Bundle\StudioBackendBundle\Dependency\Hydrator\DependencyHydrator \ No newline at end of file diff --git a/qodana.sarif.json b/qodana.sarif.json index 8e04bd104..7e515b223 100644 --- a/qodana.sarif.json +++ b/qodana.sarif.json @@ -283,13 +283,13 @@ ] }, { - "id": "PHP/Control flow", - "name": "Control flow", + "id": "PHP/PHPDoc/Code style", + "name": "Code style", "relationships": [ { "target": { - "id": "PHP", - "index": 0, + "id": "PHP/PHPDoc", + "index": 4, "toolComponent": { "name": "QDPHP" } @@ -301,13 +301,13 @@ ] }, { - "id": "PHP/PHPDoc/Code style", - "name": "Code style", + "id": "PHP/Control flow", + "name": "Control flow", "relationships": [ { "target": { - "id": "PHP/PHPDoc", - "index": 4, + "id": "PHP", + "index": 0, "toolComponent": { "name": "QDPHP" } @@ -326,6 +326,10 @@ "id": "HTML", "name": "HTML" }, + { + "id": "Cucumber", + "name": "Cucumber" + }, { "id": "JavaScript and TypeScript/Unused symbols", "name": "Unused symbols", @@ -344,10 +348,6 @@ } ] }, - { - "id": "Cucumber", - "name": "Cucumber" - }, { "id": "JavaScript and TypeScript/Flow type checker", "name": "Flow type checker", @@ -367,13 +367,13 @@ ] }, { - "id": "PHP/Php Inspections (EA Extended)/Code Style", - "name": "Code Style", + "id": "JavaScript and TypeScript/Data flow", + "name": "Data flow", "relationships": [ { "target": { - "id": "PHP/Php Inspections (EA Extended)", - "index": 1, + "id": "JavaScript and TypeScript", + "index": 10, "toolComponent": { "name": "QDPHP" } @@ -385,13 +385,13 @@ ] }, { - "id": "JavaScript and TypeScript/Data flow", - "name": "Data flow", + "id": "PHP/Php Inspections (EA Extended)/Code Style", + "name": "Code Style", "relationships": [ { "target": { - "id": "JavaScript and TypeScript", - "index": 10, + "id": "PHP/Php Inspections (EA Extended)", + "index": 1, "toolComponent": { "name": "QDPHP" } @@ -1063,13 +1063,13 @@ ] }, { - "id": "PHP/Php Inspections (EA Extended)/Architecture", - "name": "Architecture", + "id": "JavaScript and TypeScript/DOM issues", + "name": "DOM issues", "relationships": [ { "target": { - "id": "PHP/Php Inspections (EA Extended)", - "index": 1, + "id": "JavaScript and TypeScript", + "index": 10, "toolComponent": { "name": "QDPHP" } @@ -1081,13 +1081,13 @@ ] }, { - "id": "JavaScript and TypeScript/DOM issues", - "name": "DOM issues", + "id": "PHP/Php Inspections (EA Extended)/Architecture", + "name": "Architecture", "relationships": [ { "target": { - "id": "JavaScript and TypeScript", - "index": 10, + "id": "PHP/Php Inspections (EA Extended)", + "index": 1, "toolComponent": { "name": "QDPHP" } @@ -1331,13 +1331,13 @@ ] }, { - "id": "PHP/Quality tools", - "name": "Quality tools", + "id": "JavaScript and TypeScript/Function metrics", + "name": "Function metrics", "relationships": [ { "target": { - "id": "PHP", - "index": 0, + "id": "JavaScript and TypeScript", + "index": 10, "toolComponent": { "name": "QDPHP" } @@ -1349,13 +1349,13 @@ ] }, { - "id": "JavaScript and TypeScript/Function metrics", - "name": "Function metrics", + "id": "PHP/Quality tools", + "name": "Quality tools", "relationships": [ { "target": { - "id": "JavaScript and TypeScript", - "index": 10, + "id": "PHP", + "index": 0, "toolComponent": { "name": "QDPHP" } @@ -1664,7 +1664,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -1697,7 +1697,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -1763,7 +1763,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -1961,7 +1961,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -2225,7 +2225,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -2258,7 +2258,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -2291,7 +2291,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -2456,7 +2456,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -2522,7 +2522,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -2588,7 +2588,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -2753,7 +2753,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -2819,7 +2819,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Architecture", - "index": 74, + "index": 75, "toolComponent": { "name": "QDPHP" } @@ -3083,7 +3083,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Architecture", - "index": 74, + "index": 75, "toolComponent": { "name": "QDPHP" } @@ -3314,7 +3314,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -3677,7 +3677,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Architecture", - "index": 74, + "index": 75, "toolComponent": { "name": "QDPHP" } @@ -3908,7 +3908,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -3974,7 +3974,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -4106,7 +4106,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -4139,7 +4139,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Architecture", - "index": 74, + "index": 75, "toolComponent": { "name": "QDPHP" } @@ -4238,7 +4238,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -4568,7 +4568,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -4733,7 +4733,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -4766,7 +4766,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -4832,7 +4832,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -4865,7 +4865,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -5030,7 +5030,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -5063,7 +5063,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -5195,7 +5195,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Architecture", - "index": 74, + "index": 75, "toolComponent": { "name": "QDPHP" } @@ -5393,7 +5393,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -5438,19 +5438,19 @@ ] }, { - "id": "NullPointerExceptionInspection", + "id": "ObGetCleanCanBeUsedInspection", "shortDescription": { - "text": "Null reference" + "text": "'ob_get_clean()' can be used" }, "fullDescription": { "text": "Documentation can be found here", - "markdown": "Documentation can be found [here](https://github.com/kalessil/phpinspectionsea/blob/master/docs/probable-bugs.md#null-pointer-exceptions-prevention)" + "markdown": "Documentation can be found [here](https://github.com/kalessil/phpinspectionsea/blob/master/docs/control-flow.md#ob_get_clean-can-be-used)" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "NullPointerExceptionInspection", + "suppressToolId": "ObGetCleanCanBeUsedInspection", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -5458,8 +5458,8 @@ "relationships": [ { "target": { - "id": "PHP/Php Inspections (EA Extended)/Probable bugs", - "index": 2, + "id": "PHP/Php Inspections (EA Extended)/Control Flow", + "index": 17, "toolComponent": { "name": "QDPHP" } @@ -5471,19 +5471,19 @@ ] }, { - "id": "ObGetCleanCanBeUsedInspection", + "id": "NullPointerExceptionInspection", "shortDescription": { - "text": "'ob_get_clean()' can be used" + "text": "Null reference" }, "fullDescription": { "text": "Documentation can be found here", - "markdown": "Documentation can be found [here](https://github.com/kalessil/phpinspectionsea/blob/master/docs/control-flow.md#ob_get_clean-can-be-used)" + "markdown": "Documentation can be found [here](https://github.com/kalessil/phpinspectionsea/blob/master/docs/probable-bugs.md#null-pointer-exceptions-prevention)" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "ObGetCleanCanBeUsedInspection", + "suppressToolId": "NullPointerExceptionInspection", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -5491,8 +5491,8 @@ "relationships": [ { "target": { - "id": "PHP/Php Inspections (EA Extended)/Control Flow", - "index": 17, + "id": "PHP/Php Inspections (EA Extended)/Probable bugs", + "index": 2, "toolComponent": { "name": "QDPHP" } @@ -5591,7 +5591,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -5888,7 +5888,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -6515,7 +6515,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Architecture", - "index": 74, + "index": 75, "toolComponent": { "name": "QDPHP" } @@ -6713,7 +6713,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -6845,7 +6845,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -6857,28 +6857,28 @@ ] }, { - "id": "TypeUnsafeArraySearchInspection", + "id": "StaticLambdaBindingInspection", "shortDescription": { - "text": "'in_array(...)', 'array_search(...)' type unsafe usage" + "text": "Static lambdas binding" }, "fullDescription": { - "text": "Analyzes usages of 'array_search(..)' and 'in_array(...)'. If the 'strict' (third) parameter is missing, refactoring will be proposed for security's sake. Refactoring this might present a significant cost in terms of additional development and legacy code reverse engineering, so the cost-benefit should be weighed carefully. Documentation can be found here", - "markdown": "Analyzes usages of 'array_search(..)' and 'in_array(...)'. If the 'strict' (third) parameter is missing, refactoring will be proposed for security's sake. \n\nRefactoring this might present a significant cost in terms of additional development and legacy code reverse engineering, so the cost-benefit should be weighed carefully. \nDocumentation can be found [here](https://github.com/kalessil/phpinspectionsea/blob/master/docs/types-compatibility.md#strict-type-search-in-arrays)" + "text": "Reports static closures, referencing '$this' (provokes a fatal error).", + "markdown": "Reports static closures, referencing '$this' (provokes a fatal error)." }, "defaultConfiguration": { "enabled": true, - "level": "note", + "level": "error", "parameters": { - "suppressToolId": "TypeUnsafeArraySearchInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "StaticLambdaBindingInspection", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" } }, "relationships": [ { "target": { - "id": "PHP/Php Inspections (EA Extended)/Type compatibility", - "index": 83, + "id": "PHP/Php Inspections (EA Extended)/Probable bugs", + "index": 2, "toolComponent": { "name": "QDPHP" } @@ -6890,28 +6890,28 @@ ] }, { - "id": "StaticLambdaBindingInspection", + "id": "TypeUnsafeArraySearchInspection", "shortDescription": { - "text": "Static lambdas binding" + "text": "'in_array(...)', 'array_search(...)' type unsafe usage" }, "fullDescription": { - "text": "Reports static closures, referencing '$this' (provokes a fatal error).", - "markdown": "Reports static closures, referencing '$this' (provokes a fatal error)." + "text": "Analyzes usages of 'array_search(..)' and 'in_array(...)'. If the 'strict' (third) parameter is missing, refactoring will be proposed for security's sake. Refactoring this might present a significant cost in terms of additional development and legacy code reverse engineering, so the cost-benefit should be weighed carefully. Documentation can be found here", + "markdown": "Analyzes usages of 'array_search(..)' and 'in_array(...)'. If the 'strict' (third) parameter is missing, refactoring will be proposed for security's sake. \n\nRefactoring this might present a significant cost in terms of additional development and legacy code reverse engineering, so the cost-benefit should be weighed carefully. \nDocumentation can be found [here](https://github.com/kalessil/phpinspectionsea/blob/master/docs/types-compatibility.md#strict-type-search-in-arrays)" }, "defaultConfiguration": { "enabled": true, - "level": "error", + "level": "note", "parameters": { - "suppressToolId": "StaticLambdaBindingInspection", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" + "suppressToolId": "TypeUnsafeArraySearchInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "PHP/Php Inspections (EA Extended)/Probable bugs", - "index": 2, + "id": "PHP/Php Inspections (EA Extended)/Type compatibility", + "index": 83, "toolComponent": { "name": "QDPHP" } @@ -7043,7 +7043,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -7076,7 +7076,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Architecture", - "index": 74, + "index": 75, "toolComponent": { "name": "QDPHP" } @@ -7109,7 +7109,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Architecture", - "index": 74, + "index": 75, "toolComponent": { "name": "QDPHP" } @@ -7142,7 +7142,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Architecture", - "index": 74, + "index": 75, "toolComponent": { "name": "QDPHP" } @@ -7208,7 +7208,7 @@ { "target": { "id": "PHP/Php Inspections (EA Extended)/Code Style", - "index": 26, + "index": 27, "toolComponent": { "name": "QDPHP" } @@ -7826,27 +7826,27 @@ ] }, { - "id": "PhpWriteAccessToReferencedArrayValueWithoutUnsetInspection", + "id": "PhpMissingDocCommentInspection", "shortDescription": { - "text": "Write access to referenced array value without 'unset'" + "text": "Missing PHPDoc comment" }, "fullDescription": { - "text": "Reports the write access expressions on variables that are still referencing the array value previously used in a 'foreach' statement. It is recommended to destroy such references by using 'unset'. See foreach (php.net) and unset (php.net) for details.", - "markdown": "Reports the write access expressions on variables that are still referencing the array value previously used in a `foreach` statement.\n\n\nIt is recommended to destroy such references by using `unset`.\n\n\nSee [foreach (php.net)](https://www.php.net/manual/en/control-structures.foreach.php) and [unset (php.net)](https://www.php.net/manual/en/function.unset.php) for details." + "text": "Reports non-fully typed elements without a PHPDoc comment or with a PHPDoc comment only containing the '@noinspection' tag. You can use the Enforce PHPDoc Comment inspection to report fully typed elements.", + "markdown": "Reports non-fully typed elements without a PHPDoc comment or with a PHPDoc comment only containing the `@noinspection` tag.\n\nYou can use the *Enforce PHPDoc Comment* inspection to report fully typed elements." }, "defaultConfiguration": { - "enabled": true, - "level": "warning", + "enabled": false, + "level": "note", "parameters": { - "suppressToolId": "PhpWriteAccessToReferencedArrayValueWithoutUnsetInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "PhpMissingDocCommentInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "PHP/Control flow", + "id": "PHP/PHPDoc/Code style", "index": 19, "toolComponent": { "name": "QDPHP" @@ -7859,27 +7859,27 @@ ] }, { - "id": "PhpMissingDocCommentInspection", + "id": "PhpWriteAccessToReferencedArrayValueWithoutUnsetInspection", "shortDescription": { - "text": "Missing PHPDoc comment" + "text": "Write access to referenced array value without 'unset'" }, "fullDescription": { - "text": "Reports non-fully typed elements without a PHPDoc comment or with a PHPDoc comment only containing the '@noinspection' tag. You can use the Enforce PHPDoc Comment inspection to report fully typed elements.", - "markdown": "Reports non-fully typed elements without a PHPDoc comment or with a PHPDoc comment only containing the `@noinspection` tag.\n\nYou can use the *Enforce PHPDoc Comment* inspection to report fully typed elements." + "text": "Reports the write access expressions on variables that are still referencing the array value previously used in a 'foreach' statement. It is recommended to destroy such references by using 'unset'. See foreach (php.net) and unset (php.net) for details.", + "markdown": "Reports the write access expressions on variables that are still referencing the array value previously used in a `foreach` statement.\n\n\nIt is recommended to destroy such references by using `unset`.\n\n\nSee [foreach (php.net)](https://www.php.net/manual/en/control-structures.foreach.php) and [unset (php.net)](https://www.php.net/manual/en/function.unset.php) for details." }, "defaultConfiguration": { - "enabled": false, - "level": "note", + "enabled": true, + "level": "warning", "parameters": { - "suppressToolId": "PhpMissingDocCommentInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "PhpWriteAccessToReferencedArrayValueWithoutUnsetInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "PHP/PHPDoc/Code style", + "id": "PHP/Control flow", "index": 20, "toolComponent": { "name": "QDPHP" @@ -8540,7 +8540,7 @@ { "target": { "id": "PHP/PHPDoc/Code style", - "index": 20, + "index": 19, "toolComponent": { "name": "QDPHP" } @@ -8969,7 +8969,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -9278,19 +9278,19 @@ ] }, { - "id": "PhpClosureCanBeConvertedToFirstClassCallableInspection", + "id": "PhpRedundantArrayCallInForeachIteratedValueInspection", "shortDescription": { - "text": "'Closure::fromCallable()' can be converted to the first-class callable syntax" + "text": "Redundant 'array_values' call on a value iterated in 'foreach'" }, "fullDescription": { - "text": "Reports the 'callable' creation expressions that use 'Closure::fromCallable' but can be replaced with first-class callable syntax 'f(...)' available since PHP 8.1. See First-class callable syntax (php.net) for details.", - "markdown": "Reports the `callable` creation expressions that use `Closure::fromCallable` but can be replaced with first-class callable syntax `f(...)` available since PHP 8.1.\n\n\nSee [First-class callable syntax (php.net)](https://wiki.php.net/rfc/first_class_callable_syntax) for details." + "text": "Reports the 'array_values()' calls inside 'foreach' loops in which the iterated value is used without a key. Such calls are redundant and can be safely removed.", + "markdown": "Reports the `array_values()` calls inside `foreach` loops in which the iterated value is used without a key. Such calls are redundant and can be safely removed." }, "defaultConfiguration": { "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpClosureCanBeConvertedToFirstClassCallableInspection", + "suppressToolId": "PhpRedundantArrayCallInForeachIteratedValueInspection", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -9298,8 +9298,8 @@ "relationships": [ { "target": { - "id": "PHP/Code style", - "index": 5, + "id": "PHP/Code smell", + "index": 3, "toolComponent": { "name": "QDPHP" } @@ -9311,19 +9311,19 @@ ] }, { - "id": "PhpRedundantArrayCallInForeachIteratedValueInspection", + "id": "PhpClosureCanBeConvertedToFirstClassCallableInspection", "shortDescription": { - "text": "Redundant 'array_values' call on a value iterated in 'foreach'" + "text": "'Closure::fromCallable()' can be converted to the first-class callable syntax" }, "fullDescription": { - "text": "Reports the 'array_values()' calls inside 'foreach' loops in which the iterated value is used without a key. Such calls are redundant and can be safely removed.", - "markdown": "Reports the `array_values()` calls inside `foreach` loops in which the iterated value is used without a key. Such calls are redundant and can be safely removed." + "text": "Reports the 'callable' creation expressions that use 'Closure::fromCallable' but can be replaced with first-class callable syntax 'f(...)' available since PHP 8.1. See First-class callable syntax (php.net) for details.", + "markdown": "Reports the `callable` creation expressions that use `Closure::fromCallable` but can be replaced with first-class callable syntax `f(...)` available since PHP 8.1.\n\n\nSee [First-class callable syntax (php.net)](https://wiki.php.net/rfc/first_class_callable_syntax) for details." }, "defaultConfiguration": { "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpRedundantArrayCallInForeachIteratedValueInspection", + "suppressToolId": "PhpClosureCanBeConvertedToFirstClassCallableInspection", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -9331,8 +9331,8 @@ "relationships": [ { "target": { - "id": "PHP/Code smell", - "index": 3, + "id": "PHP/Code style", + "index": 5, "toolComponent": { "name": "QDPHP" } @@ -9365,7 +9365,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -9377,28 +9377,28 @@ ] }, { - "id": "PhpUnitAssertCountInspection", + "id": "PhpDefineConstantNameStartsWithLeadingSlashInspection", "shortDescription": { - "text": "Usage 'assertCount/assertSameSize' methods instead of assertEquals" + "text": "Constant name defined with a leading slash" }, "fullDescription": { - "text": "Reports alternative usage of the 'assertEquals' and 'assertNotEquals' methods with 'count' function as a parameter See Usage of the assertCount for details. See Usage of the assertSameSize for details.", - "markdown": "Reports alternative usage of the `assertEquals` and `assertNotEquals` methods with `count` function as a parameter\n\n\nSee [Usage of the assertCount](https://phpunit.readthedocs.io/en/stable/assertions.html#assertcount) for details.\n\n\nSee [Usage of the assertSameSize](https://hotexamples.com/examples/-/PHPUnit_Framework_Assert/assertSameSize/php-phpunit_framework_assert-assertsamesize-method-examples.html) for details." + "text": "Reports the 'define' constructs in which the constant's FQN starts with a leading slash. Such constants will not be correctly registered by PHP.", + "markdown": "Reports the `define` constructs in which the constant's FQN starts with a leading slash. Such constants will not be correctly registered by PHP." }, "defaultConfiguration": { "enabled": true, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "PhpUnitAssertCountInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "PhpDefineConstantNameStartsWithLeadingSlashInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "PHP/PHPUnit", - "index": 29, + "id": "PHP/Code smell", + "index": 3, "toolComponent": { "name": "QDPHP" } @@ -9410,28 +9410,28 @@ ] }, { - "id": "PhpDefineConstantNameStartsWithLeadingSlashInspection", + "id": "PhpUnitAssertCountInspection", "shortDescription": { - "text": "Constant name defined with a leading slash" + "text": "Usage 'assertCount/assertSameSize' methods instead of assertEquals" }, "fullDescription": { - "text": "Reports the 'define' constructs in which the constant's FQN starts with a leading slash. Such constants will not be correctly registered by PHP.", - "markdown": "Reports the `define` constructs in which the constant's FQN starts with a leading slash. Such constants will not be correctly registered by PHP." + "text": "Reports alternative usage of the 'assertEquals' and 'assertNotEquals' methods with 'count' function as a parameter See Usage of the assertCount for details. See Usage of the assertSameSize for details.", + "markdown": "Reports alternative usage of the `assertEquals` and `assertNotEquals` methods with `count` function as a parameter\n\n\nSee [Usage of the assertCount](https://phpunit.readthedocs.io/en/stable/assertions.html#assertcount) for details.\n\n\nSee [Usage of the assertSameSize](https://hotexamples.com/examples/-/PHPUnit_Framework_Assert/assertSameSize/php-phpunit_framework_assert-assertsamesize-method-examples.html) for details." }, "defaultConfiguration": { "enabled": true, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "PhpDefineConstantNameStartsWithLeadingSlashInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "PhpUnitAssertCountInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "PHP/Code smell", - "index": 3, + "id": "PHP/PHPUnit", + "index": 29, "toolComponent": { "name": "QDPHP" } @@ -9893,7 +9893,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -10091,7 +10091,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -10784,7 +10784,7 @@ { "target": { "id": "PHP/PHPDoc/Code style", - "index": 20, + "index": 19, "toolComponent": { "name": "QDPHP" } @@ -10982,7 +10982,7 @@ { "target": { "id": "PHP/PHPDoc/Code style", - "index": 20, + "index": 19, "toolComponent": { "name": "QDPHP" } @@ -11180,7 +11180,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -11258,28 +11258,28 @@ ] }, { - "id": "PhpDeprecatedImplodeUsageInspection", + "id": "PhpDangerousArrayInitializationInspection", "shortDescription": { - "text": "Deprecated 'implode/join' usage" + "text": "Dangerous array initialization" }, "fullDescription": { - "text": "Reports deprecated usage of the 'implode' and 'join' functions. Starting from PHP 7.4, using 'implode' and 'join' with an array as the first argument and a string as the second argument is deprecated. See Deprecations for PHP 7.4 (php.net) for details.", - "markdown": "Reports deprecated usage of the `implode` and `join` functions.\n\nStarting from PHP 7.4, using `implode` and `join` with an array as the first argument and a string as the second argument is deprecated.\n\n\nSee [Deprecations for PHP 7.4 (php.net)](https://wiki.php.net/rfc/deprecations_php_7_4#implode_parameter_order_mix) for details." + "text": "Reports dangerous array initializations (such as '$arr[] = value'). This practice is discouraged because if '$arr' already contains some value (for example, a string from a request variable), then this value will stay in place and '[]' may actually stand for string access operator. It is always preferable to initialize a variable by direct assignment. See Creating/modifying with square bracket syntax (php.net) for details.", + "markdown": "Reports dangerous array initializations (such as `$arr[] = value`).\n\n\nThis practice is discouraged because if `$arr` already contains some value (for example, a string from a request variable), then this value will stay in place and `[]` may actually stand for string access operator. It is always preferable to initialize a variable by direct assignment.\n\nSee [Creating/modifying with square bracket syntax (php.net)](https://www.php.net/manual/en/language.types.array.php#language.types.array.syntax.modifying) for details." }, "defaultConfiguration": { "enabled": true, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "PhpDeprecatedImplodeUsageInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "PhpDangerousArrayInitializationInspection", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ { "target": { - "id": "PHP/General", - "index": 8, + "id": "PHP/Code style", + "index": 5, "toolComponent": { "name": "QDPHP" } @@ -11291,28 +11291,28 @@ ] }, { - "id": "PhpDangerousArrayInitializationInspection", + "id": "PhpDeprecatedImplodeUsageInspection", "shortDescription": { - "text": "Dangerous array initialization" + "text": "Deprecated 'implode/join' usage" }, "fullDescription": { - "text": "Reports dangerous array initializations (such as '$arr[] = value'). This practice is discouraged because if '$arr' already contains some value (for example, a string from a request variable), then this value will stay in place and '[]' may actually stand for string access operator. It is always preferable to initialize a variable by direct assignment. See Creating/modifying with square bracket syntax (php.net) for details.", - "markdown": "Reports dangerous array initializations (such as `$arr[] = value`).\n\n\nThis practice is discouraged because if `$arr` already contains some value (for example, a string from a request variable), then this value will stay in place and `[]` may actually stand for string access operator. It is always preferable to initialize a variable by direct assignment.\n\nSee [Creating/modifying with square bracket syntax (php.net)](https://www.php.net/manual/en/language.types.array.php#language.types.array.syntax.modifying) for details." + "text": "Reports deprecated usage of the 'implode' and 'join' functions. Starting from PHP 7.4, using 'implode' and 'join' with an array as the first argument and a string as the second argument is deprecated. See Deprecations for PHP 7.4 (php.net) for details.", + "markdown": "Reports deprecated usage of the `implode` and `join` functions.\n\nStarting from PHP 7.4, using `implode` and `join` with an array as the first argument and a string as the second argument is deprecated.\n\n\nSee [Deprecations for PHP 7.4 (php.net)](https://wiki.php.net/rfc/deprecations_php_7_4#implode_parameter_order_mix) for details." }, "defaultConfiguration": { "enabled": true, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "PhpDangerousArrayInitializationInspection", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "PhpDeprecatedImplodeUsageInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "PHP/Code style", - "index": 5, + "id": "PHP/General", + "index": 8, "toolComponent": { "name": "QDPHP" } @@ -11576,7 +11576,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -11588,28 +11588,28 @@ ] }, { - "id": "PhpCSFixerValidationInspection", + "id": "PhpClosureCanBeConvertedToShortArrowFunctionInspection", "shortDescription": { - "text": "PHP CS Fixer validation" + "text": "Closure can be converted to arrow function" }, "fullDescription": { - "text": "Reports coding style problems detected by PHP CS Fixer. The inspection requires PHP CS Fixer to be properly installed and set up in the IDE under Settings | PHP | Quality Tools | PHP CS Fixer. To learn more about installing PHP CS Fixer, see PHP-CS-Fixer installation (GitHub).", - "markdown": "Reports coding style problems detected by PHP CS Fixer.\n\n\nThe inspection requires PHP CS Fixer to be properly installed and set up in the IDE under\n[Settings \\| PHP \\| Quality Tools \\| PHP CS Fixer](settings://settings.php.quality.tools.php.cs.fixer).\n\n\nTo learn more about installing PHP CS Fixer, see [PHP-CS-Fixer installation (GitHub)](https://github.com/FriendsOfPHP/PHP-CS-Fixer#installation)." + "text": "Reports the anonymous functions that can be transformed to short arrow functions. Support for short arrow functions is available since PHP 7.4. See PHP RFC: Arrow Functions 2.0 (php.net) for details.", + "markdown": "Reports the anonymous functions that can be transformed to short arrow functions. Support for short arrow functions is available since PHP 7.4.\n\n\nSee [PHP RFC: Arrow Functions 2.0 (php.net)](https://wiki.php.net/rfc/arrow_functions_v2) for details." }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpCSFixerValidationInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "PhpClosureCanBeConvertedToShortArrowFunctionInspection", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ { "target": { - "id": "PHP/Quality tools", - "index": 92, + "id": "PHP/Code style", + "index": 5, "toolComponent": { "name": "QDPHP" } @@ -11621,28 +11621,28 @@ ] }, { - "id": "PhpClosureCanBeConvertedToShortArrowFunctionInspection", + "id": "PhpCSFixerValidationInspection", "shortDescription": { - "text": "Closure can be converted to arrow function" + "text": "PHP CS Fixer validation" }, "fullDescription": { - "text": "Reports the anonymous functions that can be transformed to short arrow functions. Support for short arrow functions is available since PHP 7.4. See PHP RFC: Arrow Functions 2.0 (php.net) for details.", - "markdown": "Reports the anonymous functions that can be transformed to short arrow functions. Support for short arrow functions is available since PHP 7.4.\n\n\nSee [PHP RFC: Arrow Functions 2.0 (php.net)](https://wiki.php.net/rfc/arrow_functions_v2) for details." + "text": "Reports coding style problems detected by PHP CS Fixer. The inspection requires PHP CS Fixer to be properly installed and set up in the IDE under Settings | PHP | Quality Tools | PHP CS Fixer. To learn more about installing PHP CS Fixer, see PHP-CS-Fixer installation (GitHub).", + "markdown": "Reports coding style problems detected by PHP CS Fixer.\n\n\nThe inspection requires PHP CS Fixer to be properly installed and set up in the IDE under\n[Settings \\| PHP \\| Quality Tools \\| PHP CS Fixer](settings://settings.php.quality.tools.php.cs.fixer).\n\n\nTo learn more about installing PHP CS Fixer, see [PHP-CS-Fixer installation (GitHub)](https://github.com/FriendsOfPHP/PHP-CS-Fixer#installation)." }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "note", "parameters": { - "suppressToolId": "PhpClosureCanBeConvertedToShortArrowFunctionInspection", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "PhpCSFixerValidationInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "PHP/Code style", - "index": 5, + "id": "PHP/Quality tools", + "index": 93, "toolComponent": { "name": "QDPHP" } @@ -11984,28 +11984,28 @@ ] }, { - "id": "PhpArrayIsAlwaysEmptyInspection", + "id": "PhpIllegalArrayKeyTypeInspection", "shortDescription": { - "text": "Array is always empty at the point of access" + "text": "Illegal array key type" }, "fullDescription": { - "text": "Reports the iterated/accessed arrays that are known to be empty at the point of access.", - "markdown": "Reports the iterated/accessed arrays that are known to be empty at the point of access." + "text": "Reports the array keys that are of illegal type, such as objects or arrays. See Arrays (php.net) for details.", + "markdown": "Reports the array keys that are of illegal type, such as objects or arrays.\n\n\nSee [Arrays (php.net)](http://www.php.net/manual/en/language.types.array.php) for details." }, "defaultConfiguration": { "enabled": true, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "PhpArrayIsAlwaysEmptyInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "PhpIllegalArrayKeyTypeInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "PHP/Code smell", - "index": 3, + "id": "PHP/Type compatibility", + "index": 33, "toolComponent": { "name": "QDPHP" } @@ -12017,28 +12017,28 @@ ] }, { - "id": "PhpIllegalArrayKeyTypeInspection", + "id": "PhpArrayIsAlwaysEmptyInspection", "shortDescription": { - "text": "Illegal array key type" + "text": "Array is always empty at the point of access" }, "fullDescription": { - "text": "Reports the array keys that are of illegal type, such as objects or arrays. See Arrays (php.net) for details.", - "markdown": "Reports the array keys that are of illegal type, such as objects or arrays.\n\n\nSee [Arrays (php.net)](http://www.php.net/manual/en/language.types.array.php) for details." + "text": "Reports the iterated/accessed arrays that are known to be empty at the point of access.", + "markdown": "Reports the iterated/accessed arrays that are known to be empty at the point of access." }, "defaultConfiguration": { "enabled": true, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "PhpIllegalArrayKeyTypeInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "PhpArrayIsAlwaysEmptyInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "PHP/Type compatibility", - "index": 33, + "id": "PHP/Code smell", + "index": 3, "toolComponent": { "name": "QDPHP" } @@ -12071,7 +12071,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -12236,7 +12236,7 @@ { "target": { "id": "PHP/PHPDoc/Code style", - "index": 20, + "index": 19, "toolComponent": { "name": "QDPHP" } @@ -12863,7 +12863,7 @@ { "target": { "id": "PHP/Quality tools", - "index": 92, + "index": 93, "toolComponent": { "name": "QDPHP" } @@ -13205,19 +13205,19 @@ ] }, { - "id": "PhpConcatenationWithEmptyStringCanBeInlinedInspection", + "id": "PhpDisabledQualityToolComposerInspection", "shortDescription": { - "text": "Concatenation to empty string can be merged with assignment" + "text": "Quality tool inspection is disabled" }, "fullDescription": { - "text": "Reports the '.=' concatenation assignments performed right after assignment to an empty string literal. Such assignments can be merged together.", - "markdown": "Reports the `.=` concatenation assignments performed right after assignment to an empty string literal. Such assignments can be merged together." + "text": "Highlights the quality tools' entries in composer.json in case the corresponding code inspections are disabled.", + "markdown": "Highlights the quality tools' entries in *composer.json* in case the corresponding code inspections are disabled." }, "defaultConfiguration": { "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpConcatenationWithEmptyStringCanBeInlinedInspection", + "suppressToolId": "PhpDisabledQualityToolComposerInspection", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -13225,8 +13225,8 @@ "relationships": [ { "target": { - "id": "PHP/Code smell", - "index": 3, + "id": "PHP/Composer", + "index": 52, "toolComponent": { "name": "QDPHP" } @@ -13238,19 +13238,19 @@ ] }, { - "id": "PhpDisabledQualityToolComposerInspection", + "id": "PhpConcatenationWithEmptyStringCanBeInlinedInspection", "shortDescription": { - "text": "Quality tool inspection is disabled" + "text": "Concatenation to empty string can be merged with assignment" }, "fullDescription": { - "text": "Highlights the quality tools' entries in composer.json in case the corresponding code inspections are disabled.", - "markdown": "Highlights the quality tools' entries in *composer.json* in case the corresponding code inspections are disabled." + "text": "Reports the '.=' concatenation assignments performed right after assignment to an empty string literal. Such assignments can be merged together.", + "markdown": "Reports the `.=` concatenation assignments performed right after assignment to an empty string literal. Such assignments can be merged together." }, "defaultConfiguration": { "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpDisabledQualityToolComposerInspection", + "suppressToolId": "PhpConcatenationWithEmptyStringCanBeInlinedInspection", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -13258,8 +13258,8 @@ "relationships": [ { "target": { - "id": "PHP/Composer", - "index": 52, + "id": "PHP/Code smell", + "index": 3, "toolComponent": { "name": "QDPHP" } @@ -13655,7 +13655,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -13931,19 +13931,19 @@ ] }, { - "id": "PhpDocRedundantThrowsInspection", + "id": "PhpStrFunctionsInspection", "shortDescription": { - "text": "Redundant @throws tag(s)" + "text": "'str*()' calls can be replaced with PHP 8 'str_*()' calls" }, "fullDescription": { - "text": "Reports '@throws' tags for exceptions that are not thrown by the function or method. The exception classes added to the Unchecked Exceptions list under Settings | PHP | Analysis are excluded from the inspection scope.", - "markdown": "Reports `@throws` tags for exceptions that are not thrown by the function or method.\n\nThe exception classes added to the **Unchecked Exceptions** list under\n[Settings \\| PHP \\| Analysis](settings://reference.webide.settings.project.settings.php?Unchecked%20Exceptions)\nare excluded from the inspection scope." + "text": "Reports the 'strpos' and 'substr' functions calls that can be replaced with the 'str_*' functions calls (introduced in PHP 8.0). See str_contains (php.net) and str_starts_with and str_ends_with functions (php.net) for details.", + "markdown": "Reports the `strpos` and `substr` functions calls that can be replaced with the `str_*` functions calls (introduced in PHP 8.0).\n\n\nSee [str_contains (php.net)](https://wiki.php.net/rfc/str_contains) and [str_starts_with and str_ends_with functions (php.net)](https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions) for details." }, "defaultConfiguration": { "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpDocRedundantThrowsInspection", + "suppressToolId": "PhpStrFunctionsInspection", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -13951,8 +13951,8 @@ "relationships": [ { "target": { - "id": "PHP/PHPDoc", - "index": 4, + "id": "PHP/Code style", + "index": 5, "toolComponent": { "name": "QDPHP" } @@ -13964,19 +13964,19 @@ ] }, { - "id": "PhpStrFunctionsInspection", + "id": "PhpDocRedundantThrowsInspection", "shortDescription": { - "text": "'str*()' calls can be replaced with PHP 8 'str_*()' calls" + "text": "Redundant @throws tag(s)" }, "fullDescription": { - "text": "Reports the 'strpos' and 'substr' functions calls that can be replaced with the 'str_*' functions calls (introduced in PHP 8.0). See str_contains (php.net) and str_starts_with and str_ends_with functions (php.net) for details.", - "markdown": "Reports the `strpos` and `substr` functions calls that can be replaced with the `str_*` functions calls (introduced in PHP 8.0).\n\n\nSee [str_contains (php.net)](https://wiki.php.net/rfc/str_contains) and [str_starts_with and str_ends_with functions (php.net)](https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions) for details." + "text": "Reports '@throws' tags for exceptions that are not thrown by the function or method. The exception classes added to the Unchecked Exceptions list under Settings | PHP | Analysis are excluded from the inspection scope.", + "markdown": "Reports `@throws` tags for exceptions that are not thrown by the function or method.\n\nThe exception classes added to the **Unchecked Exceptions** list under\n[Settings \\| PHP \\| Analysis](settings://reference.webide.settings.project.settings.php?Unchecked%20Exceptions)\nare excluded from the inspection scope." }, "defaultConfiguration": { "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpStrFunctionsInspection", + "suppressToolId": "PhpDocRedundantThrowsInspection", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -13984,8 +13984,8 @@ "relationships": [ { "target": { - "id": "PHP/Code style", - "index": 5, + "id": "PHP/PHPDoc", + "index": 4, "toolComponent": { "name": "QDPHP" } @@ -14117,7 +14117,7 @@ { "target": { "id": "PHP/Quality tools", - "index": 92, + "index": 93, "toolComponent": { "name": "QDPHP" } @@ -14414,7 +14414,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -14492,19 +14492,19 @@ ] }, { - "id": "PhpBooleanCanBeSimplifiedInspection", + "id": "PhpFuncGetArgCanBeReplacedWithParamInspection", "shortDescription": { - "text": "Boolean expression can be simplified" + "text": "'func_get_arg()' call can be replaced with parameter access" }, "fullDescription": { - "text": "Reports the boolean expressions that contain the 'true' or 'false' literals and can be simplified.", - "markdown": "Reports the boolean expressions that contain the `true` or `false` literals and can be simplified." + "text": "Reports the 'func_get_arg()' calls that can be replaced with direct parameter access.", + "markdown": "Reports the `func_get_arg()` calls that can be replaced with direct parameter access." }, "defaultConfiguration": { "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpBooleanCanBeSimplifiedInspection", + "suppressToolId": "PhpFuncGetArgCanBeReplacedWithParamInspection", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -14525,19 +14525,19 @@ ] }, { - "id": "PhpFuncGetArgCanBeReplacedWithParamInspection", + "id": "PhpBooleanCanBeSimplifiedInspection", "shortDescription": { - "text": "'func_get_arg()' call can be replaced with parameter access" + "text": "Boolean expression can be simplified" }, "fullDescription": { - "text": "Reports the 'func_get_arg()' calls that can be replaced with direct parameter access.", - "markdown": "Reports the `func_get_arg()` calls that can be replaced with direct parameter access." + "text": "Reports the boolean expressions that contain the 'true' or 'false' literals and can be simplified.", + "markdown": "Reports the boolean expressions that contain the `true` or `false` literals and can be simplified." }, "defaultConfiguration": { "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpFuncGetArgCanBeReplacedWithParamInspection", + "suppressToolId": "PhpBooleanCanBeSimplifiedInspection", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -15701,7 +15701,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -15833,7 +15833,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -16043,28 +16043,28 @@ ] }, { - "id": "PhpIncorrectMagicMethodSignatureInspection", + "id": "PhpUnitMissingTargetForTestInspection", "shortDescription": { - "text": "Incorrect magic method signature" + "text": "Missing target element for PHPUnit test" }, "fullDescription": { - "text": "Reports incompatible magic methods signatures. See RFC: Ensure correct signatures of magic methods (php.net) for details.", - "markdown": "Reports incompatible magic methods signatures.\n\n\nSee [RFC: Ensure correct signatures of magic methods (php.net)](https://wiki.php.net/rfc/magic-methods-signature) for details." + "text": "Reports the test classes and methods, for which no corresponding production classes or methods were found.", + "markdown": "Reports the test classes and methods, for which no corresponding production classes or methods were found." }, "defaultConfiguration": { "enabled": true, - "level": "error", + "level": "note", "parameters": { - "suppressToolId": "PhpIncorrectMagicMethodSignatureInspection", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" + "suppressToolId": "PhpUnitMissingTargetForTestInspection", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ { "target": { - "id": "PHP/General", - "index": 8, + "id": "PHP/PHPUnit", + "index": 29, "toolComponent": { "name": "QDPHP" } @@ -16076,28 +16076,28 @@ ] }, { - "id": "PhpUnitMissingTargetForTestInspection", + "id": "PhpIncorrectMagicMethodSignatureInspection", "shortDescription": { - "text": "Missing target element for PHPUnit test" + "text": "Incorrect magic method signature" }, "fullDescription": { - "text": "Reports the test classes and methods, for which no corresponding production classes or methods were found.", - "markdown": "Reports the test classes and methods, for which no corresponding production classes or methods were found." + "text": "Reports incompatible magic methods signatures. See RFC: Ensure correct signatures of magic methods (php.net) for details.", + "markdown": "Reports incompatible magic methods signatures.\n\n\nSee [RFC: Ensure correct signatures of magic methods (php.net)](https://wiki.php.net/rfc/magic-methods-signature) for details." }, "defaultConfiguration": { "enabled": true, - "level": "note", + "level": "error", "parameters": { - "suppressToolId": "PhpUnitMissingTargetForTestInspection", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "PhpIncorrectMagicMethodSignatureInspection", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" } }, "relationships": [ { "target": { - "id": "PHP/PHPUnit", - "index": 29, + "id": "PHP/General", + "index": 8, "toolComponent": { "name": "QDPHP" } @@ -17429,19 +17429,19 @@ ] }, { - "id": "PhpRegExpRedundantModifierInspection", + "id": "PhpAttributeCanBeAddedToOverriddenMemberInspection", "shortDescription": { - "text": "Redundant modifier" + "text": "Attribute can be added to overriding member " }, "fullDescription": { - "text": "Reports the 'i' (case insensitivity) modifiers that are used in regular expression patterns containing no letters. Such modifiers are redundant and can be safely removed.", - "markdown": "Reports the `i` (case insensitivity) modifiers that are used in regular expression patterns containing no letters. Such modifiers are redundant and can be safely removed." + "text": "Reports the methods' and parameters' attributes that can be propagated to overriding methods/parameters. See Attributes (php.net) for details.", + "markdown": "Reports the methods' and parameters' attributes that can be propagated to overriding methods/parameters.\n\n\nSee [Attributes (php.net)](https://wiki.php.net/rfc/attributes_v2) for details." }, "defaultConfiguration": { "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpRegExpRedundantModifierInspection", + "suppressToolId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -17449,8 +17449,8 @@ "relationships": [ { "target": { - "id": "PHP/Regular expressions", - "index": 91, + "id": "PHP/Attributes", + "index": 61, "toolComponent": { "name": "QDPHP" } @@ -17462,19 +17462,19 @@ ] }, { - "id": "PhpAttributeCanBeAddedToOverriddenMemberInspection", + "id": "PhpRegExpRedundantModifierInspection", "shortDescription": { - "text": "Attribute can be added to overriding member " + "text": "Redundant modifier" }, "fullDescription": { - "text": "Reports the methods' and parameters' attributes that can be propagated to overriding methods/parameters. See Attributes (php.net) for details.", - "markdown": "Reports the methods' and parameters' attributes that can be propagated to overriding methods/parameters.\n\n\nSee [Attributes (php.net)](https://wiki.php.net/rfc/attributes_v2) for details." + "text": "Reports the 'i' (case insensitivity) modifiers that are used in regular expression patterns containing no letters. Such modifiers are redundant and can be safely removed.", + "markdown": "Reports the `i` (case insensitivity) modifiers that are used in regular expression patterns containing no letters. Such modifiers are redundant and can be safely removed." }, "defaultConfiguration": { "enabled": true, "level": "note", "parameters": { - "suppressToolId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", + "suppressToolId": "PhpRegExpRedundantModifierInspection", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -17482,8 +17482,8 @@ "relationships": [ { "target": { - "id": "PHP/Attributes", - "index": 61, + "id": "PHP/Regular expressions", + "index": 91, "toolComponent": { "name": "QDPHP" } @@ -17681,7 +17681,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -18188,21 +18188,21 @@ ] }, { - "id": "PhpUnitInvalidMockingEntityInspection", + "id": "PhpUnitAssertCanBeReplacedWithEmptyInspection", "shortDescription": { - "text": "Invalid PHPUnit mocking target" + "text": "Assertion can be replaced with 'assertEmpty/assertNotEmpty'" }, "fullDescription": { - "text": "Reports the methods and classes that are incorrectly mocked in PHPUnit tests. The following entities are reported: Enums and 'final' classes 'private', 'static', or 'final' methods Duplicate methods provided in the mocked methods lists via 'addMethods()', 'onlyMethods()', 'setMethods()', and so on.", - "markdown": "Reports the methods and classes that are incorrectly mocked in PHPUnit tests.\n\n\nThe following entities are reported:\n\n* Enums and `final` classes\n* `private`, `static`, or `final` methods\n* Duplicate methods provided in the mocked methods lists via `addMethods()`, `onlyMethods()`, `setMethods()`, and so on." + "text": "Reports the 'assertTrue'/'assertFalse' usages that can be replaced with 'assertEmpty'/'assertNotEmpty' in PHPUnit tests. See assertEmpty (phpunit.readthedocs.io) for details.", + "markdown": "Reports the `assertTrue`/`assertFalse` usages that can be replaced with `assertEmpty`/`assertNotEmpty` in PHPUnit tests.\n\n\nSee [assertEmpty (phpunit.readthedocs.io)](https://phpunit.readthedocs.io/en/stable/assertions.html#assertempty) for details." }, "defaultConfiguration": { "enabled": true, - "level": "error", + "level": "note", "parameters": { - "suppressToolId": "PhpUnitInvalidMockingEntityInspection", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" + "suppressToolId": "PhpUnitAssertCanBeReplacedWithEmptyInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ @@ -18221,21 +18221,21 @@ ] }, { - "id": "PhpUnitAssertCanBeReplacedWithEmptyInspection", + "id": "PhpUnitInvalidMockingEntityInspection", "shortDescription": { - "text": "Assertion can be replaced with 'assertEmpty/assertNotEmpty'" + "text": "Invalid PHPUnit mocking target" }, "fullDescription": { - "text": "Reports the 'assertTrue'/'assertFalse' usages that can be replaced with 'assertEmpty'/'assertNotEmpty' in PHPUnit tests. See assertEmpty (phpunit.readthedocs.io) for details.", - "markdown": "Reports the `assertTrue`/`assertFalse` usages that can be replaced with `assertEmpty`/`assertNotEmpty` in PHPUnit tests.\n\n\nSee [assertEmpty (phpunit.readthedocs.io)](https://phpunit.readthedocs.io/en/stable/assertions.html#assertempty) for details." + "text": "Reports the methods and classes that are incorrectly mocked in PHPUnit tests. The following entities are reported: Enums and 'final' classes 'private', 'static', or 'final' methods Duplicate methods provided in the mocked methods lists via 'addMethods()', 'onlyMethods()', 'setMethods()', and so on.", + "markdown": "Reports the methods and classes that are incorrectly mocked in PHPUnit tests.\n\n\nThe following entities are reported:\n\n* Enums and `final` classes\n* `private`, `static`, or `final` methods\n* Duplicate methods provided in the mocked methods lists via `addMethods()`, `onlyMethods()`, `setMethods()`, and so on." }, "defaultConfiguration": { "enabled": true, - "level": "note", + "level": "error", "parameters": { - "suppressToolId": "PhpUnitAssertCanBeReplacedWithEmptyInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "PhpUnitInvalidMockingEntityInspection", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" } }, "relationships": [ @@ -18506,7 +18506,7 @@ { "target": { "id": "PHP/Control flow", - "index": 19, + "index": 20, "toolComponent": { "name": "QDPHP" } @@ -18704,7 +18704,7 @@ { "target": { "id": "PHP/Quality tools", - "index": 92, + "index": 93, "toolComponent": { "name": "QDPHP" } @@ -18815,28 +18815,28 @@ ] }, { - "id": "PhpWrongForeachArgumentTypeInspection", + "id": "PhpInvalidStringOffsetUsageInspection", "shortDescription": { - "text": "Invalid argument supplied for 'foreach()'" + "text": "Invalid string offset usage" }, "fullDescription": { - "text": "Reports the 'foreach' constructs used on variables of the 'string', 'float', 'int', or 'boolean' type. See foreach (php.net) for details.", - "markdown": "Reports the `foreach` constructs used on variables of the `string`, `float`, `int`, or `boolean` type.\n\n\nSee [foreach (php.net)](http://www.php.net/manual/en/control-structures.foreach.php) for details." + "text": "Reports invalid string offset usages that will result in a runtime error. The following usages are reported: Using string offsets as objects or arrays Unsetting string offsets via 'unset' Passing string offsets by reference Creating references to or from string offsets Incrementing or decrementing string offsets Using combined operator assignments such as '+=' or '.=' on string offsets Assigning string offsets with empty strings or strings with length >1", + "markdown": "Reports invalid string offset usages that will result in a runtime error.\n\n\nThe following usages are reported:\n\n* Using string offsets as objects or arrays\n* Unsetting string offsets via `unset`\n* Passing string offsets by reference\n* Creating references to or from string offsets\n* Incrementing or decrementing string offsets\n* Using combined operator assignments such as `+=` or `.=` on string offsets\n* Assigning string offsets with empty strings or strings with length \\>1" }, "defaultConfiguration": { "enabled": true, - "level": "warning", + "level": "error", "parameters": { - "suppressToolId": "PhpWrongForeachArgumentTypeInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "PhpInvalidStringOffsetUsageInspection", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" } }, "relationships": [ { "target": { - "id": "PHP/Type compatibility", - "index": 33, + "id": "PHP/Probable bugs", + "index": 12, "toolComponent": { "name": "QDPHP" } @@ -18848,28 +18848,28 @@ ] }, { - "id": "PhpTooManyParametersInspection", + "id": "PhpWrongForeachArgumentTypeInspection", "shortDescription": { - "text": "Too many parameters in function declaration" + "text": "Invalid argument supplied for 'foreach()'" }, "fullDescription": { - "text": "Reports the function/method declarations with the number of parameters exceeding the specified limit.", - "markdown": "Reports the function/method declarations with the number of parameters exceeding the specified limit." + "text": "Reports the 'foreach' constructs used on variables of the 'string', 'float', 'int', or 'boolean' type. See foreach (php.net) for details.", + "markdown": "Reports the `foreach` constructs used on variables of the `string`, `float`, `int`, or `boolean` type.\n\n\nSee [foreach (php.net)](http://www.php.net/manual/en/control-structures.foreach.php) for details." }, "defaultConfiguration": { - "enabled": false, - "level": "note", + "enabled": true, + "level": "warning", "parameters": { - "suppressToolId": "PhpTooManyParametersInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "PhpWrongForeachArgumentTypeInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "PHP/Code smell", - "index": 3, + "id": "PHP/Type compatibility", + "index": 33, "toolComponent": { "name": "QDPHP" } @@ -18881,28 +18881,28 @@ ] }, { - "id": "PhpInvalidStringOffsetUsageInspection", + "id": "PhpTooManyParametersInspection", "shortDescription": { - "text": "Invalid string offset usage" + "text": "Too many parameters in function declaration" }, "fullDescription": { - "text": "Reports invalid string offset usages that will result in a runtime error. The following usages are reported: Using string offsets as objects or arrays Unsetting string offsets via 'unset' Passing string offsets by reference Creating references to or from string offsets Incrementing or decrementing string offsets Using combined operator assignments such as '+=' or '.=' on string offsets Assigning string offsets with empty strings or strings with length >1", - "markdown": "Reports invalid string offset usages that will result in a runtime error.\n\n\nThe following usages are reported:\n\n* Using string offsets as objects or arrays\n* Unsetting string offsets via `unset`\n* Passing string offsets by reference\n* Creating references to or from string offsets\n* Incrementing or decrementing string offsets\n* Using combined operator assignments such as `+=` or `.=` on string offsets\n* Assigning string offsets with empty strings or strings with length \\>1" + "text": "Reports the function/method declarations with the number of parameters exceeding the specified limit.", + "markdown": "Reports the function/method declarations with the number of parameters exceeding the specified limit." }, "defaultConfiguration": { - "enabled": true, - "level": "error", + "enabled": false, + "level": "note", "parameters": { - "suppressToolId": "PhpInvalidStringOffsetUsageInspection", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" + "suppressToolId": "PhpTooManyParametersInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "PHP/Probable bugs", - "index": 12, + "id": "PHP/Code smell", + "index": 3, "toolComponent": { "name": "QDPHP" } @@ -19544,28 +19544,28 @@ ] }, { - "id": "MysqlParsingInspection", + "id": "SqlCallNotationInspection", "shortDescription": { - "text": "Unsupported syntax in pre-8.0 versions" + "text": "Using of named and positional arguments" }, "fullDescription": { - "text": "Reports invalid usages of UNION in queries. The inspection works in MySQL versions that are earlier than 8.0. Example (MySQL): 'SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;'", - "markdown": "Reports invalid usages of UNION in queries.\n\nThe inspection works in MySQL versions that are earlier than 8.0.\n\nExample (MySQL):\n\n\n SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;\n" + "text": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2. Example (In PostgreSQL): 'CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n$$\nBEGIN\n RETURN a + b + c;\nEND\n$$;\nSELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\nSELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\nSELECT foo(b => 2, 1, 3);'", + "markdown": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2.\n\nExample (In PostgreSQL):\n\n CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n $$\n BEGIN\n RETURN a + b + c;\n END\n $$;\n SELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\n SELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\n SELECT foo(b => 2, 1, 3);\n" }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "error", "parameters": { - "suppressToolId": "MysqlParsing", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "SqlCallNotation", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" } }, "relationships": [ { "target": { - "id": "MySQL", - "index": 13, + "id": "SQL", + "index": 46, "toolComponent": { "name": "QDPHP" } @@ -19577,28 +19577,28 @@ ] }, { - "id": "SqlCallNotationInspection", + "id": "MysqlParsingInspection", "shortDescription": { - "text": "Using of named and positional arguments" + "text": "Unsupported syntax in pre-8.0 versions" }, "fullDescription": { - "text": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2. Example (In PostgreSQL): 'CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n$$\nBEGIN\n RETURN a + b + c;\nEND\n$$;\nSELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\nSELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\nSELECT foo(b => 2, 1, 3);'", - "markdown": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2.\n\nExample (In PostgreSQL):\n\n CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n $$\n BEGIN\n RETURN a + b + c;\n END\n $$;\n SELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\n SELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\n SELECT foo(b => 2, 1, 3);\n" + "text": "Reports invalid usages of UNION in queries. The inspection works in MySQL versions that are earlier than 8.0. Example (MySQL): 'SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;'", + "markdown": "Reports invalid usages of UNION in queries.\n\nThe inspection works in MySQL versions that are earlier than 8.0.\n\nExample (MySQL):\n\n\n SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;\n" }, "defaultConfiguration": { "enabled": false, - "level": "error", + "level": "warning", "parameters": { - "suppressToolId": "SqlCallNotation", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" + "suppressToolId": "MysqlParsing", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "SQL", - "index": 46, + "id": "MySQL", + "index": 13, "toolComponent": { "name": "QDPHP" } @@ -25784,19 +25784,19 @@ ] }, { - "id": "XmlDeprecatedElement", + "id": "RegExpRedundantNestedCharacterClass", "shortDescription": { - "text": "Deprecated symbol" + "text": "Redundant nested character class" }, "fullDescription": { - "text": "Reports a deprecated XML element or attribute. Symbols can be marked by XML comment or documentation tag with text 'deprecated'.", - "markdown": "Reports a deprecated XML element or attribute.\n\nSymbols can be marked by XML comment or documentation tag with text 'deprecated'." + "text": "Reports unnecessary nested character classes. Example: '[a-c[x-z]]' After the quick-fix is applied: '[a-cx-z]' New in 2020.2", + "markdown": "Reports unnecessary nested character classes.\n\n**Example:**\n\n\n [a-c[x-z]]\n\nAfter the quick-fix is applied:\n\n\n [a-cx-z]\n\nNew in 2020.2" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "XmlDeprecatedElement", + "suppressToolId": "RegExpRedundantNestedCharacterClass", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -25804,8 +25804,8 @@ "relationships": [ { "target": { - "id": "XML", - "index": 53, + "id": "RegExp", + "index": 65, "toolComponent": { "name": "QDPHP" } @@ -25817,19 +25817,19 @@ ] }, { - "id": "RegExpRedundantNestedCharacterClass", + "id": "XmlDeprecatedElement", "shortDescription": { - "text": "Redundant nested character class" + "text": "Deprecated symbol" }, "fullDescription": { - "text": "Reports unnecessary nested character classes. Example: '[a-c[x-z]]' After the quick-fix is applied: '[a-cx-z]' New in 2020.2", - "markdown": "Reports unnecessary nested character classes.\n\n**Example:**\n\n\n [a-c[x-z]]\n\nAfter the quick-fix is applied:\n\n\n [a-cx-z]\n\nNew in 2020.2" + "text": "Reports a deprecated XML element or attribute. Symbols can be marked by XML comment or documentation tag with text 'deprecated'.", + "markdown": "Reports a deprecated XML element or attribute.\n\nSymbols can be marked by XML comment or documentation tag with text 'deprecated'." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "RegExpRedundantNestedCharacterClass", + "suppressToolId": "XmlDeprecatedElement", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -25837,8 +25837,8 @@ "relationships": [ { "target": { - "id": "RegExp", - "index": 65, + "id": "XML", + "index": 53, "toolComponent": { "name": "QDPHP" } @@ -25982,19 +25982,19 @@ ] }, { - "id": "RegExpDuplicateAlternationBranch", + "id": "RegExpRepeatedSpace", "shortDescription": { - "text": "Duplicate branch in alternation" + "text": "Consecutive spaces" }, "fullDescription": { - "text": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression. Example: '(alpha|bravo|charlie|alpha)' After the quick-fix is applied: '(alpha|bravo|charlie)' New in 2017.1", - "markdown": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression.\n\n**Example:**\n\n\n (alpha|bravo|charlie|alpha)\n\nAfter the quick-fix is applied:\n\n\n (alpha|bravo|charlie)\n\nNew in 2017.1" + "text": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier. Example: '( )' After the quick-fix is applied: '( {5})' New in 2017.1", + "markdown": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier.\n\n**Example:**\n\n\n ( )\n\nAfter the quick-fix is applied:\n\n\n ( {5})\n\n\nNew in 2017.1" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "RegExpDuplicateAlternationBranch", + "suppressToolId": "RegExpRepeatedSpace", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -26015,19 +26015,19 @@ ] }, { - "id": "RegExpRepeatedSpace", + "id": "RegExpDuplicateAlternationBranch", "shortDescription": { - "text": "Consecutive spaces" + "text": "Duplicate branch in alternation" }, "fullDescription": { - "text": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier. Example: '( )' After the quick-fix is applied: '( {5})' New in 2017.1", - "markdown": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier.\n\n**Example:**\n\n\n ( )\n\nAfter the quick-fix is applied:\n\n\n ( {5})\n\n\nNew in 2017.1" + "text": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression. Example: '(alpha|bravo|charlie|alpha)' After the quick-fix is applied: '(alpha|bravo|charlie)' New in 2017.1", + "markdown": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression.\n\n**Example:**\n\n\n (alpha|bravo|charlie|alpha)\n\nAfter the quick-fix is applied:\n\n\n (alpha|bravo|charlie)\n\nNew in 2017.1" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "RegExpRepeatedSpace", + "suppressToolId": "RegExpDuplicateAlternationBranch", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -26088,6 +26088,249 @@ ], "isComprehensive": false }, + { + "name": "gherkin", + "version": "241.16902", + "rules": [ + { + "id": "GherkinScenarioToScenarioOutline", + "shortDescription": { + "text": "Scenario with Examples section" + }, + "fullDescription": { + "text": "Reports Gherkin scenarios that contain an 'Examples' section. Use the quick-fix to convert 'Scenario' to 'Scenario Outline'.", + "markdown": "Reports Gherkin scenarios that contain an `Examples` section.\n\nUse the quick-fix to convert `Scenario` to `Scenario Outline`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "GherkinScenarioToScenarioOutline", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Cucumber", + "index": 23, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CucumberTableInspection", + "shortDescription": { + "text": "Unused or missing columns in Cucumber tables" + }, + "fullDescription": { + "text": "Reports tables in 'Examples' sections in Cucumber .feature files with unused or missing columns.", + "markdown": "Reports tables in `Examples` sections in Cucumber .feature files with unused or missing columns." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CucumberTableInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Cucumber", + "index": 23, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "GherkinBrokenTableInspection", + "shortDescription": { + "text": "Gherkin table is broken" + }, + "fullDescription": { + "text": "Reports a table if there is at least one row with the number of cells different from the number of cells in the table header.", + "markdown": "Reports a table if there is at least one row with the number of cells different from the number of cells in the table header." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "GherkinBrokenTableInspection", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Cucumber", + "index": 23, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "GherkinMisplacedBackground", + "shortDescription": { + "text": "Misplaced background section" + }, + "fullDescription": { + "text": "Reports 'Background' sections that are located incorrectly. The 'Background' section must be located before the 'Scenario' section.", + "markdown": "Reports `Background` sections that are located incorrectly. The `Background` section must be located before the `Scenario` section." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "GherkinMisplacedBackground", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Cucumber", + "index": 23, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CucumberMissedExamples", + "shortDescription": { + "text": "Missing examples section" + }, + "fullDescription": { + "text": "Reports scenario outlines in Cucumber .feature files that do not have the 'Examples' section. Use the quick-fix to automatically create the 'Examples' section with a pre-filled table header.", + "markdown": "Reports scenario outlines in Cucumber .feature files that do not have the `Examples` section.\n\nUse the quick-fix to automatically create the `Examples` section with a pre-filled table header." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CucumberMissedExamples", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Cucumber", + "index": 23, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CucumberUndefinedStep", + "shortDescription": { + "text": "Undefined step" + }, + "fullDescription": { + "text": "Reports steps in Cucumber (or some other Gherkin) .feature files that do not have matching step definitions. Use the quick-fix to automatically create a new step definition.", + "markdown": "Reports steps in Cucumber (or some other Gherkin) .feature files that do not have matching step definitions.\n\nUse the quick-fix to automatically create a new step definition." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CucumberUndefinedStep", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Cucumber", + "index": 23, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CucumberExamplesColon", + "shortDescription": { + "text": "Missing ':' after examples keyword" + }, + "fullDescription": { + "text": "Reports 'Examples' sections in Cucumber .feature files if they do not have ':' after the 'Examples' keyword.", + "markdown": "Reports `Examples` sections in Cucumber .feature files if they do not have ':' after the `Examples` keyword." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CucumberExamplesColon", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Cucumber", + "index": 23, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, { "name": "JavaScript", "version": "241.16902", @@ -26114,7 +26357,7 @@ { "target": { "id": "JavaScript and TypeScript/Unused symbols", - "index": 23, + "index": 24, "toolComponent": { "name": "QDPHP" } @@ -26180,7 +26423,7 @@ { "target": { "id": "JavaScript and TypeScript/Data flow", - "index": 27, + "index": 26, "toolComponent": { "name": "QDPHP" } @@ -26444,7 +26687,7 @@ { "target": { "id": "JavaScript and TypeScript/Data flow", - "index": 27, + "index": 26, "toolComponent": { "name": "QDPHP" } @@ -26939,7 +27182,7 @@ { "target": { "id": "JavaScript and TypeScript/Unused symbols", - "index": 23, + "index": 24, "toolComponent": { "name": "QDPHP" } @@ -27005,7 +27248,7 @@ { "target": { "id": "JavaScript and TypeScript/DOM issues", - "index": 75, + "index": 74, "toolComponent": { "name": "QDPHP" } @@ -27149,28 +27392,28 @@ ] }, { - "id": "TextLabelInSwitchStatementJS", + "id": "ES6PossiblyAsyncFunction", "shortDescription": { - "text": "Text label in 'switch' statement" + "text": "'await' in non-async function" }, "fullDescription": { - "text": "Reports a labeled statement inside a 'switch' statement, which often results from a typo. Example: 'switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }'", - "markdown": "Reports a labeled statement inside a `switch` statement, which often results from a typo.\n\nExample:\n\n\n switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }\n" + "text": "Reports a usage of 'await' in a function that was possibly intended to be async but is actually missing the 'async' modifier. Although 'await' can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made 'async'.", + "markdown": "Reports a usage of `await` in a function that was possibly intended to be async but is actually missing the `async` modifier. Although `await` can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made `async`." }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "TextLabelInSwitchStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "ES6PossiblyAsyncFunction", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "JavaScript and TypeScript/Switch statement issues", - "index": 73, + "id": "JavaScript and TypeScript/Async code and promises", + "index": 76, "toolComponent": { "name": "QDPHP" } @@ -27182,28 +27425,28 @@ ] }, { - "id": "ES6PossiblyAsyncFunction", + "id": "TextLabelInSwitchStatementJS", "shortDescription": { - "text": "'await' in non-async function" + "text": "Text label in 'switch' statement" }, "fullDescription": { - "text": "Reports a usage of 'await' in a function that was possibly intended to be async but is actually missing the 'async' modifier. Although 'await' can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made 'async'.", - "markdown": "Reports a usage of `await` in a function that was possibly intended to be async but is actually missing the `async` modifier. Although `await` can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made `async`." + "text": "Reports a labeled statement inside a 'switch' statement, which often results from a typo. Example: 'switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }'", + "markdown": "Reports a labeled statement inside a `switch` statement, which often results from a typo.\n\nExample:\n\n\n switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }\n" }, "defaultConfiguration": { "enabled": false, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "ES6PossiblyAsyncFunction", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "TextLabelInSwitchStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "JavaScript and TypeScript/Async code and promises", - "index": 76, + "id": "JavaScript and TypeScript/Switch statement issues", + "index": 73, "toolComponent": { "name": "QDPHP" } @@ -28490,7 +28733,7 @@ { "target": { "id": "JavaScript and TypeScript/Function metrics", - "index": 93, + "index": 92, "toolComponent": { "name": "QDPHP" } @@ -28556,7 +28799,7 @@ { "target": { "id": "JavaScript and TypeScript/Function metrics", - "index": 93, + "index": 92, "toolComponent": { "name": "QDPHP" } @@ -28997,19 +29240,19 @@ ] }, { - "id": "PlatformDetectionJS", + "id": "IfStatementWithIdenticalBranchesJS", "shortDescription": { - "text": "Inaccurate platform detection" + "text": "'if' statement with identical branches" }, "fullDescription": { - "text": "Reports a common JavaScript pattern for detecting the browser or operating system in which the script is run. In addition to pointing out non-portable constructs, these platform detection patterns are often incomplete and easily fooled. For most cases, detection of individual environment features is preferable to attempting to detect the entire platform. Patterns detected include: 'document.all' 'document.layers' 'navigator.userAgent' 'navigator.oscpu' 'navigator.appName' 'navigator.appCodeName' 'navigator.platform'", - "markdown": "Reports a common JavaScript pattern for detecting the browser or operating system in which the script is run. In addition to pointing out non-portable constructs, these platform detection patterns are often incomplete and easily fooled. For most cases, detection of individual environment features is preferable to attempting to detect the entire platform.\n\nPatterns detected include:\n\n* `document.all`\n* `document.layers`\n* `navigator.userAgent`\n* `navigator.oscpu`\n* `navigator.appName`\n* `navigator.appCodeName`\n* `navigator.platform`" + "text": "Reports an 'if' statement with identical 'then' and 'else' branches. Such statements are almost certainly an error.", + "markdown": "Reports an `if` statement with identical `then` and `else` branches. Such statements are almost certainly an error." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "PlatformDetectionJS", + "suppressToolId": "IfStatementWithIdenticalBranchesJS", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29017,8 +29260,8 @@ "relationships": [ { "target": { - "id": "JavaScript and TypeScript/DOM issues", - "index": 75, + "id": "JavaScript and TypeScript/Control flow issues", + "index": 54, "toolComponent": { "name": "QDPHP" } @@ -29030,19 +29273,19 @@ ] }, { - "id": "IfStatementWithIdenticalBranchesJS", + "id": "PlatformDetectionJS", "shortDescription": { - "text": "'if' statement with identical branches" + "text": "Inaccurate platform detection" }, "fullDescription": { - "text": "Reports an 'if' statement with identical 'then' and 'else' branches. Such statements are almost certainly an error.", - "markdown": "Reports an `if` statement with identical `then` and `else` branches. Such statements are almost certainly an error." + "text": "Reports a common JavaScript pattern for detecting the browser or operating system in which the script is run. In addition to pointing out non-portable constructs, these platform detection patterns are often incomplete and easily fooled. For most cases, detection of individual environment features is preferable to attempting to detect the entire platform. Patterns detected include: 'document.all' 'document.layers' 'navigator.userAgent' 'navigator.oscpu' 'navigator.appName' 'navigator.appCodeName' 'navigator.platform'", + "markdown": "Reports a common JavaScript pattern for detecting the browser or operating system in which the script is run. In addition to pointing out non-portable constructs, these platform detection patterns are often incomplete and easily fooled. For most cases, detection of individual environment features is preferable to attempting to detect the entire platform.\n\nPatterns detected include:\n\n* `document.all`\n* `document.layers`\n* `navigator.userAgent`\n* `navigator.oscpu`\n* `navigator.appName`\n* `navigator.appCodeName`\n* `navigator.platform`" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "IfStatementWithIdenticalBranchesJS", + "suppressToolId": "PlatformDetectionJS", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29050,8 +29293,8 @@ "relationships": [ { "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 54, + "id": "JavaScript and TypeScript/DOM issues", + "index": 74, "toolComponent": { "name": "QDPHP" } @@ -29195,19 +29438,19 @@ ] }, { - "id": "InnerHTMLJS", + "id": "ES6UnusedImports", "shortDescription": { - "text": "Use of 'innerHTML' property" + "text": "Unused import" }, "fullDescription": { - "text": "Reports a JavaScript access to DOM nodes as text using the 'innerHTML' property. Most usages of 'innerHTML' are performed better with explicit DOM calls, such as 'getElementByID()' and 'createElement()'. Additionally, 'innerHTML' will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can lead to difficulties in diagnosing bugs.", - "markdown": "Reports a JavaScript access to DOM nodes as text using the `innerHTML` property. Most usages of `innerHTML` are performed better with explicit DOM calls, such as `getElementByID()` and `createElement()`. Additionally, `innerHTML` will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can lead to difficulties in diagnosing bugs." + "text": "Reports a redundant 'import' statement. This is usually the case if the imported symbols are not used in the source file. To avoid side-effects, consider using bare import 'import 'packageName'' instead of the regular one.", + "markdown": "Reports a redundant `import` statement. This is usually the case if the imported symbols are not used in the source file. To avoid side-effects, consider using bare import `import 'packageName'` instead of the regular one." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "InnerHTMLJS", + "suppressToolId": "ES6UnusedImports", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29215,8 +29458,8 @@ "relationships": [ { "target": { - "id": "JavaScript and TypeScript/DOM issues", - "index": 75, + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 80, "toolComponent": { "name": "QDPHP" } @@ -29228,19 +29471,19 @@ ] }, { - "id": "ES6UnusedImports", + "id": "InnerHTMLJS", "shortDescription": { - "text": "Unused import" + "text": "Use of 'innerHTML' property" }, "fullDescription": { - "text": "Reports a redundant 'import' statement. This is usually the case if the imported symbols are not used in the source file. To avoid side-effects, consider using bare import 'import 'packageName'' instead of the regular one.", - "markdown": "Reports a redundant `import` statement. This is usually the case if the imported symbols are not used in the source file. To avoid side-effects, consider using bare import `import 'packageName'` instead of the regular one." + "text": "Reports a JavaScript access to DOM nodes as text using the 'innerHTML' property. Most usages of 'innerHTML' are performed better with explicit DOM calls, such as 'getElementByID()' and 'createElement()'. Additionally, 'innerHTML' will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can lead to difficulties in diagnosing bugs.", + "markdown": "Reports a JavaScript access to DOM nodes as text using the `innerHTML` property. Most usages of `innerHTML` are performed better with explicit DOM calls, such as `getElementByID()` and `createElement()`. Additionally, `innerHTML` will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can lead to difficulties in diagnosing bugs." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ES6UnusedImports", + "suppressToolId": "InnerHTMLJS", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29248,8 +29491,8 @@ "relationships": [ { "target": { - "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 80, + "id": "JavaScript and TypeScript/DOM issues", + "index": 74, "toolComponent": { "name": "QDPHP" } @@ -29876,7 +30119,7 @@ { "target": { "id": "JavaScript and TypeScript/Function metrics", - "index": 93, + "index": 92, "toolComponent": { "name": "QDPHP" } @@ -29954,19 +30197,19 @@ ] }, { - "id": "JSObjectNullOrUndefined", + "id": "TypeScriptMissingConfigOption", "shortDescription": { - "text": "Object is 'null' or 'undefined'" + "text": "Missing tsconfig.json option " }, "fullDescription": { - "text": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is 'undefined' or 'null'.", - "markdown": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is `undefined` or `null`." + "text": "Reports a usage that requires an explicit option in 'tsconfig.json'. For example, to use JSX in '.tsx' files, 'tsconfig.json' must contain '\"jsx\"' property.", + "markdown": "Reports a usage that requires an explicit option in `tsconfig.json`. For example, to use JSX in `.tsx` files, `tsconfig.json` must contain `\"jsx\"` property." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "JSObjectNullOrUndefined", + "suppressToolId": "TypeScriptMissingConfigOption", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29974,8 +30217,8 @@ "relationships": [ { "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 54, + "id": "JavaScript and TypeScript/TypeScript", + "index": 71, "toolComponent": { "name": "QDPHP" } @@ -29987,19 +30230,19 @@ ] }, { - "id": "TypeScriptMissingConfigOption", + "id": "JSObjectNullOrUndefined", "shortDescription": { - "text": "Missing tsconfig.json option " + "text": "Object is 'null' or 'undefined'" }, "fullDescription": { - "text": "Reports a usage that requires an explicit option in 'tsconfig.json'. For example, to use JSX in '.tsx' files, 'tsconfig.json' must contain '\"jsx\"' property.", - "markdown": "Reports a usage that requires an explicit option in `tsconfig.json`. For example, to use JSX in `.tsx` files, `tsconfig.json` must contain `\"jsx\"` property." + "text": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is 'undefined' or 'null'.", + "markdown": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is `undefined` or `null`." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "TypeScriptMissingConfigOption", + "suppressToolId": "JSObjectNullOrUndefined", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -30007,8 +30250,8 @@ "relationships": [ { "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 71, + "id": "JavaScript and TypeScript/Control flow issues", + "index": 54, "toolComponent": { "name": "QDPHP" } @@ -30635,7 +30878,7 @@ { "target": { "id": "JavaScript and TypeScript/Function metrics", - "index": 93, + "index": 92, "toolComponent": { "name": "QDPHP" } @@ -30679,39 +30922,6 @@ } ] }, - { - "id": "UnusedCatchParameterJS", - "shortDescription": { - "text": "Unused 'catch' parameter" - }, - "fullDescription": { - "text": "Reports a 'catch' parameter that is not used in the corresponding block. The 'catch' parameters named 'ignore' or 'ignored' are ignored. Use the checkbox below to disable this inspection for 'catch' blocks with comments.", - "markdown": "Reports a `catch` parameter that is not used in the corresponding block. The `catch` parameters named `ignore` or `ignored` are ignored.\n\n\nUse the checkbox below to disable this inspection for `catch`\nblocks with comments." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "UnusedCatchParameterJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Try statement issues", - "index": 48, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, { "id": "NpmUsedModulesInstalled", "shortDescription": { @@ -30746,118 +30956,19 @@ ] }, { - "id": "WithStatementJS", - "shortDescription": { - "text": "'with' statement" - }, - "fullDescription": { - "text": "Reports a 'with' statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables.", - "markdown": "Reports a `with` statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "WithStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "index": 55, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSConstantReassignment", - "shortDescription": { - "text": "Attempt to assign to const or readonly variable" - }, - "fullDescription": { - "text": "Reports reassigning a value to a constant or a readonly variable.", - "markdown": "Reports reassigning a value to a constant or a readonly variable." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "JSConstantReassignment", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Validity issues", - "index": 41, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MagicNumberJS", - "shortDescription": { - "text": "Magic number" - }, - "fullDescription": { - "text": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored.", - "markdown": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MagicNumberJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 43, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "FunctionNamingConventionJS", + "id": "UnusedCatchParameterJS", "shortDescription": { - "text": "Function naming convention" + "text": "Unused 'catch' parameter" }, "fullDescription": { - "text": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression for function names. Use the standard 'java.util.regex' format for regular expressions.", - "markdown": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nfor function names. Use the standard `java.util.regex` format for regular expressions." + "text": "Reports a 'catch' parameter that is not used in the corresponding block. The 'catch' parameters named 'ignore' or 'ignored' are ignored. Use the checkbox below to disable this inspection for 'catch' blocks with comments.", + "markdown": "Reports a `catch` parameter that is not used in the corresponding block. The `catch` parameters named `ignore` or `ignored` are ignored.\n\n\nUse the checkbox below to disable this inspection for `catch`\nblocks with comments." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "FunctionNamingConventionJS", + "suppressToolId": "UnusedCatchParameterJS", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -30865,74 +30976,8 @@ "relationships": [ { "target": { - "id": "JavaScript and TypeScript/Naming conventions", - "index": 86, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptLibrary", - "shortDescription": { - "text": "Missing global library" - }, - "fullDescription": { - "text": "Reports a TypeScript library file that is required for a symbol but is not listed under the 'lib' compiler option in 'tsconfig.json'.", - "markdown": "Reports a TypeScript library file that is required for a symbol but is not listed under the `lib` compiler option in `tsconfig.json`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "TypeScriptLibrary", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 71, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptMissingAugmentationImport", - "shortDescription": { - "text": "Missing augmentation import" - }, - "fullDescription": { - "text": "Reports a usage from augmentation module without an explicit import.", - "markdown": "Reports a usage from [augmentation module](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) without an explicit import." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "TypeScriptMissingAugmentationImport", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 71, + "id": "JavaScript and TypeScript/Try statement issues", + "index": 48, "toolComponent": { "name": "QDPHP" } @@ -30944,19 +30989,217 @@ ] }, { - "id": "AnonymousFunctionJS", + "id": "WithStatementJS", "shortDescription": { - "text": "Anonymous function" + "text": "'with' statement" }, "fullDescription": { - "text": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a 'name' property specified in the ECMAScript 6 standard. For example, 'var bar = function() {};' is not reported.", - "markdown": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a `name` property specified in the ECMAScript 6 standard. For example, `var bar = function() {};` is not reported." + "text": "Reports a 'with' statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables.", + "markdown": "Reports a `with` statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "AnonymousFunctionJS", + "suppressToolId": "WithStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 55, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSConstantReassignment", + "shortDescription": { + "text": "Attempt to assign to const or readonly variable" + }, + "fullDescription": { + "text": "Reports reassigning a value to a constant or a readonly variable.", + "markdown": "Reports reassigning a value to a constant or a readonly variable." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSConstantReassignment", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 41, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MagicNumberJS", + "shortDescription": { + "text": "Magic number" + }, + "fullDescription": { + "text": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored.", + "markdown": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MagicNumberJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 43, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionNamingConventionJS", + "shortDescription": { + "text": "Function naming convention" + }, + "fullDescription": { + "text": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression for function names. Use the standard 'java.util.regex' format for regular expressions.", + "markdown": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nfor function names. Use the standard `java.util.regex` format for regular expressions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionNamingConventionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 86, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptLibrary", + "shortDescription": { + "text": "Missing global library" + }, + "fullDescription": { + "text": "Reports a TypeScript library file that is required for a symbol but is not listed under the 'lib' compiler option in 'tsconfig.json'.", + "markdown": "Reports a TypeScript library file that is required for a symbol but is not listed under the `lib` compiler option in `tsconfig.json`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptLibrary", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 71, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptMissingAugmentationImport", + "shortDescription": { + "text": "Missing augmentation import" + }, + "fullDescription": { + "text": "Reports a usage from augmentation module without an explicit import.", + "markdown": "Reports a usage from [augmentation module](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) without an explicit import." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptMissingAugmentationImport", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 71, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AnonymousFunctionJS", + "shortDescription": { + "text": "Anonymous function" + }, + "fullDescription": { + "text": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a 'name' property specified in the ECMAScript 6 standard. For example, 'var bar = function() {};' is not reported.", + "markdown": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a `name` property specified in the ECMAScript 6 standard. For example, `var bar = function() {};` is not reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AnonymousFunctionJS", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -31262,7 +31505,7 @@ { "target": { "id": "JavaScript and TypeScript/Function metrics", - "index": 93, + "index": 92, "toolComponent": { "name": "QDPHP" } @@ -31493,7 +31736,7 @@ { "target": { "id": "JavaScript and TypeScript/DOM issues", - "index": 75, + "index": 74, "toolComponent": { "name": "QDPHP" } @@ -31636,72 +31879,6 @@ } ] }, - { - "id": "JSIncompatibleTypesComparison", - "shortDescription": { - "text": "Comparison of expressions having incompatible types" - }, - "fullDescription": { - "text": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values.", - "markdown": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSIncompatibleTypesComparison", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 60, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSUnfilteredForInLoop", - "shortDescription": { - "text": "Unfiltered for..in loop" - }, - "fullDescription": { - "text": "Reports unfiltered 'for-in' loops. The use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when 'Object''s prototype may be incorrectly modified. For example, the following code will print 42 and myMethod: 'Object.prototype.myMethod = function myMethod() {};\nlet a = { foo: 42 };\nfor (let i in a) {\n console.log(a[i]);\n}' Suggests replacing the whole loop with a 'Object.keys()' method or adding a 'hasOwnProperty()' check. After applying the quick-fix the code looks as follows: 'for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n}'", - "markdown": "Reports unfiltered `for-in` loops. \n\nThe use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when `Object`'s prototype may be incorrectly modified. For example, the following code will print **42** and **myMethod** : \n\n\n Object.prototype.myMethod = function myMethod() {};\n let a = { foo: 42 };\n for (let i in a) {\n console.log(a[i]);\n }\n\nSuggests replacing the whole loop with a `Object.keys()` method or adding a `hasOwnProperty()` check. After applying the quick-fix the code looks as follows:\n\n\n for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSUnfilteredForInLoop", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 34, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, { "id": "JSAnnotator", "shortDescription": { @@ -31735,6 +31912,72 @@ } ] }, + { + "id": "JSUnfilteredForInLoop", + "shortDescription": { + "text": "Unfiltered for..in loop" + }, + "fullDescription": { + "text": "Reports unfiltered 'for-in' loops. The use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when 'Object''s prototype may be incorrectly modified. For example, the following code will print 42 and myMethod: 'Object.prototype.myMethod = function myMethod() {};\nlet a = { foo: 42 };\nfor (let i in a) {\n console.log(a[i]);\n}' Suggests replacing the whole loop with a 'Object.keys()' method or adding a 'hasOwnProperty()' check. After applying the quick-fix the code looks as follows: 'for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n}'", + "markdown": "Reports unfiltered `for-in` loops. \n\nThe use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when `Object`'s prototype may be incorrectly modified. For example, the following code will print **42** and **myMethod** : \n\n\n Object.prototype.myMethod = function myMethod() {};\n let a = { foo: 42 };\n for (let i in a) {\n console.log(a[i]);\n }\n\nSuggests replacing the whole loop with a `Object.keys()` method or adding a `hasOwnProperty()` check. After applying the quick-fix the code looks as follows:\n\n\n for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnfilteredForInLoop", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 34, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSIncompatibleTypesComparison", + "shortDescription": { + "text": "Comparison of expressions having incompatible types" + }, + "fullDescription": { + "text": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values.", + "markdown": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSIncompatibleTypesComparison", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 60, + "toolComponent": { + "name": "QDPHP" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, { "id": "JSFunctionExpressionToArrowFunction", "shortDescription": { @@ -31922,7 +32165,7 @@ { "target": { "id": "JavaScript and TypeScript/Function metrics", - "index": 93, + "index": 92, "toolComponent": { "name": "QDPHP" } @@ -32186,7 +32429,7 @@ { "target": { "id": "JavaScript and TypeScript/Function metrics", - "index": 93, + "index": 92, "toolComponent": { "name": "QDPHP" } @@ -33011,249 +33254,6 @@ { "target": { "id": "JavaScript and TypeScript/Unused symbols", - "index": 23, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "gherkin", - "version": "241.16902", - "rules": [ - { - "id": "GherkinScenarioToScenarioOutline", - "shortDescription": { - "text": "Scenario with Examples section" - }, - "fullDescription": { - "text": "Reports Gherkin scenarios that contain an 'Examples' section. Use the quick-fix to convert 'Scenario' to 'Scenario Outline'.", - "markdown": "Reports Gherkin scenarios that contain an `Examples` section.\n\nUse the quick-fix to convert `Scenario` to `Scenario Outline`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "GherkinScenarioToScenarioOutline", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Cucumber", - "index": 24, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CucumberTableInspection", - "shortDescription": { - "text": "Unused or missing columns in Cucumber tables" - }, - "fullDescription": { - "text": "Reports tables in 'Examples' sections in Cucumber .feature files with unused or missing columns.", - "markdown": "Reports tables in `Examples` sections in Cucumber .feature files with unused or missing columns." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CucumberTableInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Cucumber", - "index": 24, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "GherkinBrokenTableInspection", - "shortDescription": { - "text": "Gherkin table is broken" - }, - "fullDescription": { - "text": "Reports a table if there is at least one row with the number of cells different from the number of cells in the table header.", - "markdown": "Reports a table if there is at least one row with the number of cells different from the number of cells in the table header." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "GherkinBrokenTableInspection", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Cucumber", - "index": 24, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "GherkinMisplacedBackground", - "shortDescription": { - "text": "Misplaced background section" - }, - "fullDescription": { - "text": "Reports 'Background' sections that are located incorrectly. The 'Background' section must be located before the 'Scenario' section.", - "markdown": "Reports `Background` sections that are located incorrectly. The `Background` section must be located before the `Scenario` section." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "GherkinMisplacedBackground", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Cucumber", - "index": 24, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CucumberMissedExamples", - "shortDescription": { - "text": "Missing examples section" - }, - "fullDescription": { - "text": "Reports scenario outlines in Cucumber .feature files that do not have the 'Examples' section. Use the quick-fix to automatically create the 'Examples' section with a pre-filled table header.", - "markdown": "Reports scenario outlines in Cucumber .feature files that do not have the `Examples` section.\n\nUse the quick-fix to automatically create the `Examples` section with a pre-filled table header." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CucumberMissedExamples", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Cucumber", - "index": 24, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CucumberUndefinedStep", - "shortDescription": { - "text": "Undefined step" - }, - "fullDescription": { - "text": "Reports steps in Cucumber (or some other Gherkin) .feature files that do not have matching step definitions. Use the quick-fix to automatically create a new step definition.", - "markdown": "Reports steps in Cucumber (or some other Gherkin) .feature files that do not have matching step definitions.\n\nUse the quick-fix to automatically create a new step definition." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CucumberUndefinedStep", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Cucumber", - "index": 24, - "toolComponent": { - "name": "QDPHP" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CucumberExamplesColon", - "shortDescription": { - "text": "Missing ':' after examples keyword" - }, - "fullDescription": { - "text": "Reports 'Examples' sections in Cucumber .feature files if they do not have ':' after the 'Examples' keyword.", - "markdown": "Reports `Examples` sections in Cucumber .feature files if they do not have ':' after the `Examples` keyword." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CucumberExamplesColon", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Cucumber", "index": 24, "toolComponent": { "name": "QDPHP" @@ -37724,7 +37724,7 @@ { "target": { "id": "PHP/Quality tools", - "index": 92, + "index": 93, "toolComponent": { "name": "QDPHP" } @@ -38414,7 +38414,7 @@ { "target": { "id": "PHP/Quality tools", - "index": 92, + "index": 93, "toolComponent": { "name": "QDPHP" } @@ -38482,9 +38482,9 @@ }, "invocations": [ { - "startTimeUtc": "2024-05-16T15:07:02.938101012Z", + "startTimeUtc": "2024-05-17T09:20:35.046647408Z", "exitCode": 255, - "exitCodeDescription": "Failure condition triggered:\n- Detected 3 problems across all severities, fail threshold: 0", + "exitCodeDescription": "Failure condition triggered:\n- Detected 36 problems across all severities, fail threshold: 0", "executionSuccessful": true } ], @@ -38492,8 +38492,8 @@ "versionControlProvenance": [ { "repositoryUri": "https://github.com/pimcore/studio-backend-bundle.git", - "revisionId": "fce8204d0ed85197896667b47f846557332dd39b", - "branch": "182-properties", + "revisionId": "76bbe2cd00f5140de01ae95c4d9acf6fcf77459f", + "branch": "156-dependencies", "properties": { "repoUrl": "https://github.com/pimcore/studio-backend-bundle.git", "lastAuthorName": "mattamon", @@ -38503,63 +38503,6 @@ } ], "results": [ - { - "ruleId": "EfferentObjectCouplingInspection", - "kind": "fail", - "level": "note", - "message": { - "text": "[EA] High efferent coupling (22).", - "markdown": "\\[EA\\] High efferent coupling (22)." - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/Asset/Controller/CustomSettingsController.php", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 44, - "startColumn": 13, - "charOffset": 2116, - "charLength": 24, - "snippet": { - "text": "CustomSettingsController" - }, - "sourceLanguage": "PHP" - }, - "contextRegion": { - "startLine": 42, - "startColumn": 1, - "charOffset": 2087, - "charLength": 115, - "snippet": { - "text": " * @internal\n */\nfinal class CustomSettingsController extends AbstractApiController\n{\n use ElementProviderTrait;" - }, - "sourceLanguage": "PHP" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "project", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7ba46194b23c4715", - "equalIndicator/v1": "c3a1fb37b40e52d1c38c4c51dc39402aa72d2557cd4c06356d0b1747ada4bf85" - }, - "baselineState": "unchanged", - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "PHP" - ] - } - }, { "ruleId": "DuplicatedCode", "kind": "fail", @@ -38778,6 +38721,63 @@ "equalIndicator/v2": "1a48abf43e131b3c", "equalIndicator/v1": "d332e327ffffb913d03b5c1b123366ccfb39379be3645fdac1a4e16298cddeb5" }, + "baselineState": "new", + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "PHP" + ] + } + }, + { + "ruleId": "EfferentObjectCouplingInspection", + "kind": "fail", + "level": "note", + "message": { + "text": "[EA] High efferent coupling (25).", + "markdown": "\\[EA\\] High efferent coupling (25)." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/Dependency/Controller/CollectionController.php", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 13, + "charOffset": 2485, + "charLength": 20, + "snippet": { + "text": "CollectionController" + }, + "sourceLanguage": "PHP" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 2456, + "charLength": 113, + "snippet": { + "text": " * @internal\n */\nfinal class CollectionController extends AbstractApiController\n{\n use PaginatedResponseTrait;" + }, + "sourceLanguage": "PHP" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "project", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "576763bd4bcb2c7c", + "equalIndicator/v1": "2697ac122041ac59d9eddfc3209cd27515ff25f85a22b32964cada2b16c80ede" + }, "baselineState": "unchanged", "properties": { "ideaSeverity": "WEAK WARNING", @@ -38835,7 +38835,64 @@ "equalIndicator/v2": "af124e8aa2be2d8b", "equalIndicator/v1": "31c95f4bfa8bf741b071ffed051cc58534a0d8fa41131ab271c2271332f08bcd" }, - "baselineState": "unchanged", + "baselineState": "new", + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "PHP" + ] + } + }, + { + "ruleId": "EfferentObjectCouplingInspection", + "kind": "fail", + "level": "note", + "message": { + "text": "[EA] High efferent coupling (22).", + "markdown": "\\[EA\\] High efferent coupling (22)." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/Property/Controller/UpdateController.php", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 13, + "charOffset": 2077, + "charLength": 16, + "snippet": { + "text": "UpdateController" + }, + "sourceLanguage": "PHP" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 2048, + "charLength": 110, + "snippet": { + "text": " * @internal\n */\nfinal class UpdateController extends AbstractApiController\n{\n public function __construct(" + }, + "sourceLanguage": "PHP" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "project", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc30109889285c34", + "equalIndicator/v1": "341f72b7a05cc112d36ecbeb0620f8e1323e502c1a8e0d94186d9a2f29accb0f" + }, + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -38892,7 +38949,7 @@ "equalIndicator/v2": "2628b827dadbc43e", "equalIndicator/v1": "4eff5b6887106f38106f3d5e26c162bd2a02157f1c71659dc533c9ec4a13c41c" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -38949,7 +39006,7 @@ "equalIndicator/v2": "ef77395305986867", "equalIndicator/v1": "56fa5cb989107bf6a2500e4f7e4590ecd2a76c4b9c3266968efd6977f85df779" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39006,7 +39063,121 @@ "equalIndicator/v2": "4fb327c4151fd0ef", "equalIndicator/v1": "5c00a4f43cabb4c6181f0353ac0fcab81fe0f6be307800d7899ad041c4d5a7a5" }, - "baselineState": "unchanged", + "baselineState": "new", + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "PHP" + ] + } + }, + { + "ruleId": "EfferentObjectCouplingInspection", + "kind": "fail", + "level": "note", + "message": { + "text": "[EA] High efferent coupling (20).", + "markdown": "\\[EA\\] High efferent coupling (20)." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/Property/Controller/Element/CollectionController.php", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 13, + "charOffset": 1869, + "charLength": 20, + "snippet": { + "text": "CollectionController" + }, + "sourceLanguage": "PHP" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1840, + "charLength": 114, + "snippet": { + "text": " * @internal\n */\nfinal class CollectionController extends AbstractApiController\n{\n public function __construct(" + }, + "sourceLanguage": "PHP" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "project", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f1f19cd3c9b7872f", + "equalIndicator/v1": "660d5ca670ab0fd528593863c3c5e76b1e99d5b8dd9e7b0ee4de4bfe5db68e6e" + }, + "baselineState": "new", + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "PHP" + ] + } + }, + { + "ruleId": "EfferentObjectCouplingInspection", + "kind": "fail", + "level": "note", + "message": { + "text": "[EA] High efferent coupling (21).", + "markdown": "\\[EA\\] High efferent coupling (21)." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/Property/Controller/CollectionController.php", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 13, + "charOffset": 2160, + "charLength": 20, + "snippet": { + "text": "CollectionController" + }, + "sourceLanguage": "PHP" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 2131, + "charLength": 113, + "snippet": { + "text": " * @internal\n */\nfinal class CollectionController extends AbstractApiController\n{\n use PaginatedResponseTrait;" + }, + "sourceLanguage": "PHP" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "project", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1162108b11fced8", + "equalIndicator/v1": "686a6533fb7f3eb66b60047a900ff083c4787bd4bd4b32ace419a622a369936d" + }, + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39063,7 +39234,7 @@ "equalIndicator/v2": "92b68947b9449ee1", "equalIndicator/v1": "83f4848e12782b2d396312d0d5597edc0a820ff23ebf26d04fa71f2c2699290d" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39073,37 +39244,37 @@ } }, { - "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", + "ruleId": "EfferentObjectCouplingInspection", "kind": "fail", "level": "note", "message": { - "text": "Attribute can be added to overriding parameter", - "markdown": "Attribute can be added to overriding parameter" + "text": "[EA] High efferent coupling (23).", + "markdown": "\\[EA\\] High efferent coupling (23)." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Asset/Schema/Asset.php", + "uri": "src/Property/Controller/Element/UpdateController.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 52, - "startColumn": 11, - "charOffset": 1762, - "charLength": 75, + "startLine": 43, + "startColumn": 13, + "charOffset": 2107, + "charLength": 16, "snippet": { - "text": "Property(description: 'Workflow permissions', type: 'bool', example: false)" + "text": "UpdateController" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 50, + "startLine": 41, "startColumn": 1, - "charOffset": 1699, - "charLength": 291, + "charOffset": 2078, + "charLength": 110, "snippet": { - "text": " )]\n private readonly array $metaData,\n #[Property(description: 'Workflow permissions', type: 'bool', example: false)]\n private readonly bool $hasWorkflowWithPermissions,\n #[Property(description: 'Full path', type: 'string', example: '/path/to/asset.jpg')]" + "text": " * @internal\n */\nfinal class UpdateController extends AbstractApiController\n{\n public function __construct(" }, "sourceLanguage": "PHP" } @@ -39117,10 +39288,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "c8e54b4ae449ef08", - "equalIndicator/v1": "08a9dc4e9b115719de1aeaed732b08c3844bfa0d83ec7ce65f3d70a6998a7355" + "equalIndicator/v2": "45874f215741c0d2", + "equalIndicator/v1": "91ceea34e0aca77ee9e75d42d1674c9203a8a95adedb9a1117b879f8f845df42" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39130,37 +39301,37 @@ } }, { - "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", + "ruleId": "EfferentObjectCouplingInspection", "kind": "fail", "level": "note", "message": { - "text": "Attribute can be added to overriding parameter", - "markdown": "Attribute can be added to overriding parameter" + "text": "[EA] High efferent coupling (22).", + "markdown": "\\[EA\\] High efferent coupling (22)." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Response/Element.php", + "uri": "src/Asset/Controller/CustomSettingsController.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 48, - "startColumn": 11, - "charOffset": 1882, - "charLength": 33, + "startLine": 44, + "startColumn": 13, + "charOffset": 2116, + "charLength": 24, "snippet": { - "text": "Property(ref: Permissions::class)" + "text": "CustomSettingsController" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 46, + "startLine": 42, "startColumn": 1, - "charOffset": 1732, - "charLength": 242, + "charOffset": 2087, + "charLength": 115, "snippet": { - "text": " #[Property(description: 'Modification date', type: 'integer', example: 327417600)]\n private readonly ?int $modificationDate,\n #[Property(ref: Permissions::class)]\n private readonly Permissions $permissions\n ) {" + "text": " * @internal\n */\nfinal class CustomSettingsController extends AbstractApiController\n{\n use ElementProviderTrait;" }, "sourceLanguage": "PHP" } @@ -39174,10 +39345,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "14ab2cf63d196a8d", - "equalIndicator/v1": "1519aa442e4b7420e0c7976d0355262e40ecff315029ceb0f77558914cdc8c7e" + "equalIndicator/v2": "7ba46194b23c4715", + "equalIndicator/v1": "c3a1fb37b40e52d1c38c4c51dc39402aa72d2557cd4c06356d0b1747ada4bf85" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39187,37 +39358,37 @@ } }, { - "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", + "ruleId": "LongInheritanceChainInspection", "kind": "fail", "level": "note", "message": { - "text": "Attribute can be added to overriding parameter", - "markdown": "Attribute can be added to overriding parameter" + "text": "[EA] Class has 4 parent classes, consider using appropriate design patterns.", + "markdown": "\\[EA\\] Class has 4 parent classes, consider using appropriate design patterns." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Version/Schema/AssetVersion.php", + "uri": "src/Dependency/Attributes/Parameters/Query/DependencyModeParameter.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 32, - "startColumn": 11, - "charOffset": 738, - "charLength": 78, + "startLine": 25, + "startColumn": 13, + "charOffset": 755, + "charLength": 23, "snippet": { - "text": "Property(description: 'file name', type: 'string', example: 'myImageFile.png')" + "text": "DependencyModeParameter" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 30, + "startLine": 23, "startColumn": 1, - "charOffset": 693, - "charLength": 264, + "charOffset": 703, + "charLength": 133, "snippet": { - "text": "{\n public function __construct(\n #[Property(description: 'file name', type: 'string', example: 'myImageFile.png')]\n private string $fileName,\n #[Property(description: 'temporary file', type: 'string', example: 'path/to/temporary/file.png')]" + "text": "\n#[Attribute(Attribute::TARGET_METHOD)]\nfinal class DependencyModeParameter extends QueryParameter\n{\n public function __construct(" }, "sourceLanguage": "PHP" } @@ -39231,10 +39402,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "84178e08c07824ca", - "equalIndicator/v1": "40378ee9c96fbd740fa85b6951c8a29bdf4466e8f7534633fd0f233505230f64" + "equalIndicator/v2": "f9fdd280a426dd86", + "equalIndicator/v1": "58343a1402a6002f342abc2ad8066c0acb9b6d8a123b3cfbf36d4a4a627ba2c5" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39244,37 +39415,37 @@ } }, { - "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", + "ruleId": "LongInheritanceChainInspection", "kind": "fail", "level": "note", "message": { - "text": "Attribute can be added to overriding parameter", - "markdown": "Attribute can be added to overriding parameter" + "text": "[EA] Class has 3 parent classes, consider using appropriate design patterns.", + "markdown": "\\[EA\\] Class has 3 parent classes, consider using appropriate design patterns." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Asset/Schema/Asset.php", + "uri": "src/Property/Attributes/Request/PredefinedPropertyRequestBody.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 39, - "startColumn": 11, - "charOffset": 1142, - "charLength": 63, + "startLine": 25, + "startColumn": 13, + "charOffset": 753, + "charLength": 29, "snippet": { - "text": "Property(description: 'Type', type: 'string', example: 'image')" + "text": "PredefinedPropertyRequestBody" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 37, + "startLine": 23, "startColumn": 1, - "charOffset": 1009, - "charLength": 318, + "charOffset": 701, + "charLength": 137, "snippet": { - "text": " #[Property(description: 'Has children', type: 'bool', example: false)]\n private readonly bool $hasChildren,\n #[Property(description: 'Type', type: 'string', example: 'image')]\n private readonly string $type,\n #[Property(description: 'Filename', type: 'string', example: 'cool.jpg')]" + "text": "\n#[Attribute(Attribute::TARGET_METHOD)]\nfinal class PredefinedPropertyRequestBody extends RequestBody\n{\n public function __construct()" }, "sourceLanguage": "PHP" } @@ -39288,10 +39459,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "669bc6ac0069bd19", - "equalIndicator/v1": "43a80b488985c32dafac3a484c67f89e44977e35238a60da91129ee894458006" + "equalIndicator/v2": "0f6c1858595af6ed", + "equalIndicator/v1": "9a2e03681f116de615f949dba300e280938521cbee12263ad61337d3fc735818" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39301,37 +39472,37 @@ } }, { - "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", + "ruleId": "LongInheritanceChainInspection", "kind": "fail", "level": "note", "message": { - "text": "Attribute can be added to overriding parameter", - "markdown": "Attribute can be added to overriding parameter" + "text": "[EA] Class has 4 parent classes, consider using appropriate design patterns.", + "markdown": "\\[EA\\] Class has 4 parent classes, consider using appropriate design patterns." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Version/Schema/AssetVersion.php", + "uri": "src/Dependency/Attributes/Response/Property/DependencyCollection.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 34, - "startColumn": 11, - "charOffset": 862, - "charLength": 94, + "startLine": 27, + "startColumn": 13, + "charOffset": 742, + "charLength": 20, "snippet": { - "text": "Property(description: 'temporary file', type: 'string', example: 'path/to/temporary/file.png')" + "text": "DependencyCollection" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 32, + "startLine": 25, "startColumn": 1, - "charOffset": 728, - "charLength": 277, + "charOffset": 713, + "charLength": 102, "snippet": { - "text": " #[Property(description: 'file name', type: 'string', example: 'myImageFile.png')]\n private string $fileName,\n #[Property(description: 'temporary file', type: 'string', example: 'path/to/temporary/file.png')]\n private ?string $temporaryFile,\n ) {" + "text": " * @internal\n */\nfinal class DependencyCollection extends Property\n{\n public function __construct()" }, "sourceLanguage": "PHP" } @@ -39345,10 +39516,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "402d16b5748c1803", - "equalIndicator/v1": "4d0f4b8b25bda5952fb05a5f1ae26ef53b28dc776cb6c9b419e6ea833fdcdf52" + "equalIndicator/v2": "74c1f86ba7becaa1", + "equalIndicator/v1": "eb8afedc856125616bbe9e28a3944af903e27992059858edebf5f19cf42dac85" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39358,37 +39529,37 @@ } }, { - "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", + "ruleId": "LongInheritanceChainInspection", "kind": "fail", "level": "note", "message": { - "text": "Attribute can be added to overriding parameter", - "markdown": "Attribute can be added to overriding parameter" + "text": "[EA] Class has 3 parent classes, consider using appropriate design patterns.", + "markdown": "\\[EA\\] Class has 3 parent classes, consider using appropriate design patterns." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Response/Element.php", + "uri": "src/Property/Attributes/Request/ElementPropertyRequestBody.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 46, - "startColumn": 11, - "charOffset": 1742, - "charLength": 79, + "startLine": 25, + "startColumn": 13, + "charOffset": 791, + "charLength": 26, "snippet": { - "text": "Property(description: 'Modification date', type: 'integer', example: 327417600)" + "text": "ElementPropertyRequestBody" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 44, + "startLine": 23, "startColumn": 1, - "charOffset": 1600, - "charLength": 316, + "charOffset": 739, + "charLength": 134, "snippet": { - "text": " #[Property(description: 'Creation date', type: 'integer', example: 221846400)]\n private readonly ?int $creationDate,\n #[Property(description: 'Modification date', type: 'integer', example: 327417600)]\n private readonly ?int $modificationDate,\n #[Property(ref: Permissions::class)]" + "text": "\n#[Attribute(Attribute::TARGET_METHOD)]\nfinal class ElementPropertyRequestBody extends RequestBody\n{\n public function __construct()" }, "sourceLanguage": "PHP" } @@ -39402,10 +39573,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "7bcbe5e0ca1111b0", - "equalIndicator/v1": "56ec89239bdfba357459724f1bb84609cec99734a3a9fbc3a0a1cce71f74f674" + "equalIndicator/v2": "952cdaedba577771", + "equalIndicator/v1": "efa881f809aa9b51baa0f9649613db3e73246ba0a4f74904195d8a6c6a1dfe48" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39426,26 +39597,26 @@ { "physicalLocation": { "artifactLocation": { - "uri": "src/Request/CollectionParameters.php", + "uri": "src/Asset/Schema/Asset.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 33, + "startLine": 52, "startColumn": 11, - "charOffset": 905, - "charLength": 8, + "charOffset": 1762, + "charLength": 75, "snippet": { - "text": "Positive" + "text": "Property(description: 'Workflow permissions', type: 'bool', example: false)" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 31, + "startLine": 50, "startColumn": 1, - "charOffset": 844, - "charLength": 114, + "charOffset": 1699, + "charLength": 291, "snippet": { - "text": " private int $page = 1,\n #[NotBlank]\n #[Positive]\n private int $pageSize = 10,\n ) {" + "text": " )]\n private readonly array $metaData,\n #[Property(description: 'Workflow permissions', type: 'bool', example: false)]\n private readonly bool $hasWorkflowWithPermissions,\n #[Property(description: 'Full path', type: 'string', example: '/path/to/asset.jpg')]" }, "sourceLanguage": "PHP" } @@ -39459,10 +39630,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "77d6ecc501de5c0c", - "equalIndicator/v1": "64afe4fba632fd3636d6943e45b1124b60c35b33bcbcbb3be68e9ad0e99134a3" + "equalIndicator/v2": "c8e54b4ae449ef08", + "equalIndicator/v1": "08a9dc4e9b115719de1aeaed732b08c3844bfa0d83ec7ce65f3d70a6998a7355" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39483,26 +39654,26 @@ { "physicalLocation": { "artifactLocation": { - "uri": "src/Request/CollectionParameters.php", + "uri": "src/Response/Element.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 32, + "startLine": 48, "startColumn": 11, - "charOffset": 885, - "charLength": 8, + "charOffset": 1882, + "charLength": 33, "snippet": { - "text": "NotBlank" + "text": "Property(ref: Permissions::class)" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 30, + "startLine": 46, "startColumn": 1, - "charOffset": 824, - "charLength": 126, + "charOffset": 1732, + "charLength": 242, "snippet": { - "text": " #[Positive]\n private int $page = 1,\n #[NotBlank]\n #[Positive]\n private int $pageSize = 10," + "text": " #[Property(description: 'Modification date', type: 'integer', example: 327417600)]\n private readonly ?int $modificationDate,\n #[Property(ref: Permissions::class)]\n private readonly Permissions $permissions\n ) {" }, "sourceLanguage": "PHP" } @@ -39516,10 +39687,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "ccd5d96bc68b7e1a", - "equalIndicator/v1": "70cb41f7fe78e21c7d9dc60728b83fd4fe5e2d7eece4ba89f9a57f4d07018b1c" + "equalIndicator/v2": "14ab2cf63d196a8d", + "equalIndicator/v1": "1519aa442e4b7420e0c7976d0355262e40ecff315029ceb0f77558914cdc8c7e" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39540,26 +39711,26 @@ { "physicalLocation": { "artifactLocation": { - "uri": "src/Asset/Schema/Asset.php", + "uri": "src/Version/Schema/AssetVersion.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 45, + "startLine": 32, "startColumn": 11, - "charOffset": 1509, - "charLength": 199, + "charOffset": 738, + "charLength": 78, "snippet": { - "text": "Property(\n description: 'Metadata',\n type: 'array',\n items: new Items(type: 'string', example: 'meta_data_example'),\n example: 'pimcore_icon_pdf'\n )" + "text": "Property(description: 'file name', type: 'string', example: 'myImageFile.png')" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 43, + "startLine": 30, "startColumn": 1, - "charOffset": 1371, - "charLength": 467, + "charOffset": 693, + "charLength": 264, "snippet": { - "text": " #[Property(description: 'Mimetype', type: 'string', example: 'image/jpeg')]\n private readonly ?string $mimeType,\n #[Property(\n description: 'Metadata',\n type: 'array',\n items: new Items(type: 'string', example: 'meta_data_example'),\n example: 'pimcore_icon_pdf'\n )]\n private readonly array $metaData,\n #[Property(description: 'Workflow permissions', type: 'bool', example: false)]" + "text": "{\n public function __construct(\n #[Property(description: 'file name', type: 'string', example: 'myImageFile.png')]\n private string $fileName,\n #[Property(description: 'temporary file', type: 'string', example: 'path/to/temporary/file.png')]" }, "sourceLanguage": "PHP" } @@ -39573,10 +39744,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "b4c6aa1929d1bf97", - "equalIndicator/v1": "7e7fad67b721599df9b4a59f1faf5ae55576773c810fe1f0b11211a03ffdc9fb" + "equalIndicator/v2": "84178e08c07824ca", + "equalIndicator/v1": "40378ee9c96fbd740fa85b6951c8a29bdf4466e8f7534633fd0f233505230f64" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39597,26 +39768,26 @@ { "physicalLocation": { "artifactLocation": { - "uri": "src/Response/Element.php", + "uri": "src/Asset/Schema/Asset.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 34, + "startLine": 39, "startColumn": 11, - "charOffset": 983, - "charLength": 74, + "charOffset": 1142, + "charLength": 63, "snippet": { - "text": "Property(description: 'path', type: 'string', example: '/path/to/element')" + "text": "Property(description: 'Type', type: 'string', example: 'image')" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 32, + "startLine": 37, "startColumn": 1, - "charOffset": 855, - "charLength": 319, + "charOffset": 1009, + "charLength": 318, "snippet": { - "text": " #[Property(description: 'ID of parent', type: 'integer', example: 1)]\n private readonly int $parentId,\n #[Property(description: 'path', type: 'string', example: '/path/to/element')]\n private readonly string $path,\n #[Property(description: 'ID of owner', type: 'integer', example: 1)]" + "text": " #[Property(description: 'Has children', type: 'bool', example: false)]\n private readonly bool $hasChildren,\n #[Property(description: 'Type', type: 'string', example: 'image')]\n private readonly string $type,\n #[Property(description: 'Filename', type: 'string', example: 'cool.jpg')]" }, "sourceLanguage": "PHP" } @@ -39630,10 +39801,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "dd3f5ea7a9dff674", - "equalIndicator/v1": "8126ddc2ba426ea7c6af291056e76b92f38870ecf0967860a9a3bb0fa7933858" + "equalIndicator/v2": "669bc6ac0069bd19", + "equalIndicator/v1": "43a80b488985c32dafac3a484c67f89e44977e35238a60da91129ee894458006" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39654,26 +39825,26 @@ { "physicalLocation": { "artifactLocation": { - "uri": "src/Asset/Schema/Asset.php", + "uri": "src/Version/Schema/AssetVersion.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 54, + "startLine": 34, "startColumn": 11, - "charOffset": 1908, - "charLength": 81, + "charOffset": 862, + "charLength": 94, "snippet": { - "text": "Property(description: 'Full path', type: 'string', example: '/path/to/asset.jpg')" + "text": "Property(description: 'temporary file', type: 'string', example: 'path/to/temporary/file.png')" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 52, + "startLine": 32, "startColumn": 1, - "charOffset": 1752, - "charLength": 298, + "charOffset": 728, + "charLength": 277, "snippet": { - "text": " #[Property(description: 'Workflow permissions', type: 'bool', example: false)]\n private readonly bool $hasWorkflowWithPermissions,\n #[Property(description: 'Full path', type: 'string', example: '/path/to/asset.jpg')]\n private readonly string $fullPath,\n int $id," + "text": " #[Property(description: 'file name', type: 'string', example: 'myImageFile.png')]\n private string $fileName,\n #[Property(description: 'temporary file', type: 'string', example: 'path/to/temporary/file.png')]\n private ?string $temporaryFile,\n ) {" }, "sourceLanguage": "PHP" } @@ -39687,10 +39858,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "0b4f2b468ad5fa55", - "equalIndicator/v1": "8589169c7dc68ddd3a3ff4ca9c715b43f668e1a9f3d177dae4138d9370b0e4a8" + "equalIndicator/v2": "402d16b5748c1803", + "equalIndicator/v1": "4d0f4b8b25bda5952fb05a5f1ae26ef53b28dc776cb6c9b419e6ea833fdcdf52" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39715,22 +39886,22 @@ "uriBaseId": "SRCROOT" }, "region": { - "startLine": 44, + "startLine": 46, "startColumn": 11, - "charOffset": 1610, - "charLength": 75, + "charOffset": 1742, + "charLength": 79, "snippet": { - "text": "Property(description: 'Creation date', type: 'integer', example: 221846400)" + "text": "Property(description: 'Modification date', type: 'integer', example: 327417600)" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 42, + "startLine": 44, "startColumn": 1, - "charOffset": 1480, - "charLength": 342, + "charOffset": 1600, + "charLength": 316, "snippet": { - "text": " #[Property(description: 'Is locked', type: 'boolean', example: false)]\n private readonly bool $isLocked,\n #[Property(description: 'Creation date', type: 'integer', example: 221846400)]\n private readonly ?int $creationDate,\n #[Property(description: 'Modification date', type: 'integer', example: 327417600)]" + "text": " #[Property(description: 'Creation date', type: 'integer', example: 221846400)]\n private readonly ?int $creationDate,\n #[Property(description: 'Modification date', type: 'integer', example: 327417600)]\n private readonly ?int $modificationDate,\n #[Property(ref: Permissions::class)]" }, "sourceLanguage": "PHP" } @@ -39744,10 +39915,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "80bfcd5e195caddf", - "equalIndicator/v1": "a202732b45abe1c94d18ae6ea5f71ddbbfd1fb71649fbfcec1ec249f16766178" + "equalIndicator/v2": "7bcbe5e0ca1111b0", + "equalIndicator/v1": "56ec89239bdfba357459724f1bb84609cec99734a3a9fbc3a0a1cce71f74f674" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39768,26 +39939,26 @@ { "physicalLocation": { "artifactLocation": { - "uri": "src/Response/Element.php", + "uri": "src/Request/CollectionParameters.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 42, + "startLine": 33, "startColumn": 11, - "charOffset": 1490, - "charLength": 67, + "charOffset": 905, + "charLength": 8, "snippet": { - "text": "Property(description: 'Is locked', type: 'boolean', example: false)" + "text": "Positive" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 40, + "startLine": 31, "startColumn": 1, - "charOffset": 1360, - "charLength": 326, + "charOffset": 844, + "charLength": 114, "snippet": { - "text": " #[Property(description: 'Locked', type: 'string', example: 'locked')]\n private readonly ?string $locked,\n #[Property(description: 'Is locked', type: 'boolean', example: false)]\n private readonly bool $isLocked,\n #[Property(description: 'Creation date', type: 'integer', example: 221846400)]" + "text": " private int $page = 1,\n #[NotBlank]\n #[Positive]\n private int $pageSize = 10,\n ) {" }, "sourceLanguage": "PHP" } @@ -39801,10 +39972,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "2fec47e9fbf8e257", - "equalIndicator/v1": "b8d74bf3622ae06c9cab86005a1ab064dc1fea4c53635f2556e00d81b9cddd88" + "equalIndicator/v2": "77d6ecc501de5c0c", + "equalIndicator/v1": "64afe4fba632fd3636d6943e45b1124b60c35b33bcbcbb3be68e9ad0e99134a3" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39829,22 +40000,22 @@ "uriBaseId": "SRCROOT" }, "region": { - "startLine": 30, + "startLine": 32, "startColumn": 11, - "charOffset": 834, + "charOffset": 885, "charLength": 8, "snippet": { - "text": "Positive" + "text": "NotBlank" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 28, + "startLine": 30, "startColumn": 1, - "charOffset": 771, - "charLength": 123, + "charOffset": 824, + "charLength": 126, "snippet": { - "text": " public function __construct(\n #[NotBlank]\n #[Positive]\n private int $page = 1,\n #[NotBlank]" + "text": " #[Positive]\n private int $page = 1,\n #[NotBlank]\n #[Positive]\n private int $pageSize = 10," }, "sourceLanguage": "PHP" } @@ -39858,10 +40029,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "63721e6ae2ff09e4", - "equalIndicator/v1": "cc182978cf2b938bd3cf51d25b8852bdcaefc64d83197c7c517a569e1bed1d79" + "equalIndicator/v2": "ccd5d96bc68b7e1a", + "equalIndicator/v1": "70cb41f7fe78e21c7d9dc60728b83fd4fe5e2d7eece4ba89f9a57f4d07018b1c" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39882,26 +40053,26 @@ { "physicalLocation": { "artifactLocation": { - "uri": "src/Response/Element.php", + "uri": "src/Asset/Schema/Asset.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 36, + "startLine": 45, "startColumn": 11, - "charOffset": 1108, - "charLength": 65, + "charOffset": 1509, + "charLength": 199, "snippet": { - "text": "Property(description: 'ID of owner', type: 'integer', example: 1)" + "text": "Property(\n description: 'Metadata',\n type: 'array',\n items: new Items(type: 'string', example: 'meta_data_example'),\n example: 'pimcore_icon_pdf'\n )" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 34, + "startLine": 43, "startColumn": 1, - "charOffset": 973, - "charLength": 338, + "charOffset": 1371, + "charLength": 467, "snippet": { - "text": " #[Property(description: 'path', type: 'string', example: '/path/to/element')]\n private readonly string $path,\n #[Property(description: 'ID of owner', type: 'integer', example: 1)]\n private readonly int $userOwner,\n #[Property(description: 'User that modified the element', type: 'integer', example: 1)]" + "text": " #[Property(description: 'Mimetype', type: 'string', example: 'image/jpeg')]\n private readonly ?string $mimeType,\n #[Property(\n description: 'Metadata',\n type: 'array',\n items: new Items(type: 'string', example: 'meta_data_example'),\n example: 'pimcore_icon_pdf'\n )]\n private readonly array $metaData,\n #[Property(description: 'Workflow permissions', type: 'bool', example: false)]" }, "sourceLanguage": "PHP" } @@ -39915,10 +40086,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "9c7851323aec72ad", - "equalIndicator/v1": "d23051cfd5b754ac82c3b6a0393e6667205ad4a75d4f5eefbeab50b23606d799" + "equalIndicator/v2": "b4c6aa1929d1bf97", + "equalIndicator/v1": "7e7fad67b721599df9b4a59f1faf5ae55576773c810fe1f0b11211a03ffdc9fb" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -39939,26 +40110,26 @@ { "physicalLocation": { "artifactLocation": { - "uri": "src/Asset/Schema/Asset.php", + "uri": "src/Response/Element.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 43, + "startLine": 34, "startColumn": 11, - "charOffset": 1381, - "charLength": 72, + "charOffset": 983, + "charLength": 74, "snippet": { - "text": "Property(description: 'Mimetype', type: 'string', example: 'image/jpeg')" + "text": "Property(description: 'path', type: 'string', example: '/path/to/element')" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 41, + "startLine": 32, "startColumn": 1, - "charOffset": 1246, - "charLength": 272, + "charOffset": 855, + "charLength": 319, "snippet": { - "text": " #[Property(description: 'Filename', type: 'string', example: 'cool.jpg')]\n private readonly string $filename,\n #[Property(description: 'Mimetype', type: 'string', example: 'image/jpeg')]\n private readonly ?string $mimeType,\n #[Property(" + "text": " #[Property(description: 'ID of parent', type: 'integer', example: 1)]\n private readonly int $parentId,\n #[Property(description: 'path', type: 'string', example: '/path/to/element')]\n private readonly string $path,\n #[Property(description: 'ID of owner', type: 'integer', example: 1)]" }, "sourceLanguage": "PHP" } @@ -39972,10 +40143,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "01e6b1622c1ac541", - "equalIndicator/v1": "e1278b582ec78526441db2e368254195614e887186a2c3c98383915ca5fa35fe" + "equalIndicator/v2": "dd3f5ea7a9dff674", + "equalIndicator/v1": "8126ddc2ba426ea7c6af291056e76b92f38870ecf0967860a9a3bb0fa7933858" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -40000,22 +40171,22 @@ "uriBaseId": "SRCROOT" }, "region": { - "startLine": 41, + "startLine": 54, "startColumn": 11, - "charOffset": 1256, - "charLength": 70, + "charOffset": 1908, + "charLength": 81, "snippet": { - "text": "Property(description: 'Filename', type: 'string', example: 'cool.jpg')" + "text": "Property(description: 'Full path', type: 'string', example: '/path/to/asset.jpg')" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 39, + "startLine": 52, "startColumn": 1, - "charOffset": 1132, - "charLength": 322, + "charOffset": 1752, + "charLength": 298, "snippet": { - "text": " #[Property(description: 'Type', type: 'string', example: 'image')]\n private readonly string $type,\n #[Property(description: 'Filename', type: 'string', example: 'cool.jpg')]\n private readonly string $filename,\n #[Property(description: 'Mimetype', type: 'string', example: 'image/jpeg')]" + "text": " #[Property(description: 'Workflow permissions', type: 'bool', example: false)]\n private readonly bool $hasWorkflowWithPermissions,\n #[Property(description: 'Full path', type: 'string', example: '/path/to/asset.jpg')]\n private readonly string $fullPath,\n int $id," }, "sourceLanguage": "PHP" } @@ -40029,10 +40200,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "4265bd53264b2b0c", - "equalIndicator/v1": "e6cc6503ffca3f6dd7dce4f92789ac1a3e122d9a7ab44c799f8b7aebf6f514e1" + "equalIndicator/v2": "0b4f2b468ad5fa55", + "equalIndicator/v1": "8589169c7dc68ddd3a3ff4ca9c715b43f668e1a9f3d177dae4138d9370b0e4a8" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -40053,26 +40224,26 @@ { "physicalLocation": { "artifactLocation": { - "uri": "src/Request/CollectionParameters.php", + "uri": "src/Response/Element.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 29, + "startLine": 44, "startColumn": 11, - "charOffset": 814, - "charLength": 8, + "charOffset": 1610, + "charLength": 75, "snippet": { - "text": "NotBlank" + "text": "Property(description: 'Creation date', type: 'integer', example: 221846400)" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 27, + "startLine": 42, "startColumn": 1, - "charOffset": 769, - "charLength": 105, + "charOffset": 1480, + "charLength": 342, "snippet": { - "text": "{\n public function __construct(\n #[NotBlank]\n #[Positive]\n private int $page = 1," + "text": " #[Property(description: 'Is locked', type: 'boolean', example: false)]\n private readonly bool $isLocked,\n #[Property(description: 'Creation date', type: 'integer', example: 221846400)]\n private readonly ?int $creationDate,\n #[Property(description: 'Modification date', type: 'integer', example: 327417600)]" }, "sourceLanguage": "PHP" } @@ -40086,10 +40257,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "b924270e17c10f07", - "equalIndicator/v1": "f2c0dc13e7e15ff2d40ef3f389848e6f1605257cc3a55e118392df3632ecdabf" + "equalIndicator/v2": "80bfcd5e195caddf", + "equalIndicator/v1": "a202732b45abe1c94d18ae6ea5f71ddbbfd1fb71649fbfcec1ec249f16766178" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -40114,22 +40285,22 @@ "uriBaseId": "SRCROOT" }, "region": { - "startLine": 40, + "startLine": 42, "startColumn": 11, - "charOffset": 1370, - "charLength": 66, + "charOffset": 1490, + "charLength": 67, "snippet": { - "text": "Property(description: 'Locked', type: 'string', example: 'locked')" + "text": "Property(description: 'Is locked', type: 'boolean', example: false)" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 38, + "startLine": 40, "startColumn": 1, - "charOffset": 1216, - "charLength": 342, + "charOffset": 1360, + "charLength": 326, "snippet": { - "text": " #[Property(description: 'User that modified the element', type: 'integer', example: 1)]\n private readonly int $userModification,\n #[Property(description: 'Locked', type: 'string', example: 'locked')]\n private readonly ?string $locked,\n #[Property(description: 'Is locked', type: 'boolean', example: false)]" + "text": " #[Property(description: 'Locked', type: 'string', example: 'locked')]\n private readonly ?string $locked,\n #[Property(description: 'Is locked', type: 'boolean', example: false)]\n private readonly bool $isLocked,\n #[Property(description: 'Creation date', type: 'integer', example: 221846400)]" }, "sourceLanguage": "PHP" } @@ -40143,10 +40314,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "54e2faa7120fdfad", - "equalIndicator/v1": "faa3722f6b90434e54f632922c9803f6e391e29984d1a9464086c270b3a0ed41" + "equalIndicator/v2": "2fec47e9fbf8e257", + "equalIndicator/v1": "b8d74bf3622ae06c9cab86005a1ab064dc1fea4c53635f2556e00d81b9cddd88" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -40167,26 +40338,26 @@ { "physicalLocation": { "artifactLocation": { - "uri": "src/Response/Element.php", + "uri": "src/Request/CollectionParameters.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 38, + "startLine": 30, "startColumn": 11, - "charOffset": 1226, - "charLength": 84, + "charOffset": 834, + "charLength": 8, "snippet": { - "text": "Property(description: 'User that modified the element', type: 'integer', example: 1)" + "text": "Positive" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 36, + "startLine": 28, "startColumn": 1, - "charOffset": 1098, - "charLength": 339, + "charOffset": 771, + "charLength": 123, "snippet": { - "text": " #[Property(description: 'ID of owner', type: 'integer', example: 1)]\n private readonly int $userOwner,\n #[Property(description: 'User that modified the element', type: 'integer', example: 1)]\n private readonly int $userModification,\n #[Property(description: 'Locked', type: 'string', example: 'locked')]" + "text": " public function __construct(\n #[NotBlank]\n #[Positive]\n private int $page = 1,\n #[NotBlank]" }, "sourceLanguage": "PHP" } @@ -40200,10 +40371,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "0d648721bc039127", - "equalIndicator/v1": "fe6fc561100aa403c25a9624309cc14e7f1cc862740c652d71d7cc91df967beb" + "equalIndicator/v2": "63721e6ae2ff09e4", + "equalIndicator/v1": "cc182978cf2b938bd3cf51d25b8852bdcaefc64d83197c7c517a569e1bed1d79" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -40213,37 +40384,37 @@ } }, { - "ruleId": "EfferentObjectCouplingInspection", + "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", "kind": "fail", "level": "note", "message": { - "text": "[EA] High efferent coupling (21).", - "markdown": "\\[EA\\] High efferent coupling (21)." + "text": "Attribute can be added to overriding parameter", + "markdown": "Attribute can be added to overriding parameter" }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Property/Controller/CollectionController.php", + "uri": "src/Response/Element.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 44, - "startColumn": 13, - "charOffset": 2160, - "charLength": 20, + "startLine": 36, + "startColumn": 11, + "charOffset": 1108, + "charLength": 65, "snippet": { - "text": "CollectionController" + "text": "Property(description: 'ID of owner', type: 'integer', example: 1)" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 42, + "startLine": 34, "startColumn": 1, - "charOffset": 2131, - "charLength": 113, + "charOffset": 973, + "charLength": 338, "snippet": { - "text": " * @internal\n */\nfinal class CollectionController extends AbstractApiController\n{\n use PaginatedResponseTrait;" + "text": " #[Property(description: 'path', type: 'string', example: '/path/to/element')]\n private readonly string $path,\n #[Property(description: 'ID of owner', type: 'integer', example: 1)]\n private readonly int $userOwner,\n #[Property(description: 'User that modified the element', type: 'integer', example: 1)]" }, "sourceLanguage": "PHP" } @@ -40257,10 +40428,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "a1162108b11fced8", - "equalIndicator/v1": "686a6533fb7f3eb66b60047a900ff083c4787bd4bd4b32ace419a622a369936d" + "equalIndicator/v2": "9c7851323aec72ad", + "equalIndicator/v1": "d23051cfd5b754ac82c3b6a0393e6667205ad4a75d4f5eefbeab50b23606d799" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -40270,37 +40441,37 @@ } }, { - "ruleId": "PhpUnusedPrivateMethodInspection", + "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", "kind": "fail", "level": "note", "message": { - "text": "Unused private method 'getLatestVersionForUser'", - "markdown": "Unused private method 'getLatestVersionForUser'" + "text": "Attribute can be added to overriding parameter", + "markdown": "Attribute can be added to overriding parameter" }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Util/Traits/ElementProviderTrait.php", + "uri": "src/Asset/Schema/Asset.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 51, - "startColumn": 22, - "charOffset": 1450, - "charLength": 23, + "startLine": 43, + "startColumn": 11, + "charOffset": 1381, + "charLength": 72, "snippet": { - "text": "getLatestVersionForUser" + "text": "Property(description: 'Mimetype', type: 'string', example: 'image/jpeg')" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 49, + "startLine": 41, "startColumn": 1, - "charOffset": 1422, - "charLength": 135, + "charOffset": 1246, + "charLength": 272, "snippet": { - "text": " }\n\n private function getLatestVersionForUser(\n Asset|Document\\PageSnippet|Concrete $element,\n ?UserInterface $user" + "text": " #[Property(description: 'Filename', type: 'string', example: 'cool.jpg')]\n private readonly string $filename,\n #[Property(description: 'Mimetype', type: 'string', example: 'image/jpeg')]\n private readonly ?string $mimeType,\n #[Property(" }, "sourceLanguage": "PHP" } @@ -40314,10 +40485,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "bfd52ccc33bdf9f8", - "equalIndicator/v1": "295728d99e3a5dcb0efd0d158f8b5f684869670bb2bddd29968e10e6e47ffe22" + "equalIndicator/v2": "01e6b1622c1ac541", + "equalIndicator/v1": "e1278b582ec78526441db2e368254195614e887186a2c3c98383915ca5fa35fe" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -40327,37 +40498,37 @@ } }, { - "ruleId": "EfferentObjectCouplingInspection", + "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", "kind": "fail", "level": "note", "message": { - "text": "[EA] High efferent coupling (22).", - "markdown": "\\[EA\\] High efferent coupling (22)." + "text": "Attribute can be added to overriding parameter", + "markdown": "Attribute can be added to overriding parameter" }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Property/Controller/UpdateController.php", + "uri": "src/Asset/Schema/Asset.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 44, - "startColumn": 13, - "charOffset": 2077, - "charLength": 16, + "startLine": 41, + "startColumn": 11, + "charOffset": 1256, + "charLength": 70, "snippet": { - "text": "UpdateController" + "text": "Property(description: 'Filename', type: 'string', example: 'cool.jpg')" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 42, + "startLine": 39, "startColumn": 1, - "charOffset": 2048, - "charLength": 110, + "charOffset": 1132, + "charLength": 322, "snippet": { - "text": " * @internal\n */\nfinal class UpdateController extends AbstractApiController\n{\n public function __construct(" + "text": " #[Property(description: 'Type', type: 'string', example: 'image')]\n private readonly string $type,\n #[Property(description: 'Filename', type: 'string', example: 'cool.jpg')]\n private readonly string $filename,\n #[Property(description: 'Mimetype', type: 'string', example: 'image/jpeg')]" }, "sourceLanguage": "PHP" } @@ -40371,10 +40542,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "cc30109889285c34", - "equalIndicator/v1": "341f72b7a05cc112d36ecbeb0620f8e1323e502c1a8e0d94186d9a2f29accb0f" + "equalIndicator/v2": "4265bd53264b2b0c", + "equalIndicator/v1": "e6cc6503ffca3f6dd7dce4f92789ac1a3e122d9a7ab44c799f8b7aebf6f514e1" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -40384,37 +40555,37 @@ } }, { - "ruleId": "EfferentObjectCouplingInspection", + "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", "kind": "fail", "level": "note", "message": { - "text": "[EA] High efferent coupling (20).", - "markdown": "\\[EA\\] High efferent coupling (20)." + "text": "Attribute can be added to overriding parameter", + "markdown": "Attribute can be added to overriding parameter" }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Property/Controller/Element/CollectionController.php", + "uri": "src/Request/CollectionParameters.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 40, - "startColumn": 13, - "charOffset": 1869, - "charLength": 20, + "startLine": 29, + "startColumn": 11, + "charOffset": 814, + "charLength": 8, "snippet": { - "text": "CollectionController" + "text": "NotBlank" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 38, + "startLine": 27, "startColumn": 1, - "charOffset": 1840, - "charLength": 114, + "charOffset": 769, + "charLength": 105, "snippet": { - "text": " * @internal\n */\nfinal class CollectionController extends AbstractApiController\n{\n public function __construct(" + "text": "{\n public function __construct(\n #[NotBlank]\n #[Positive]\n private int $page = 1," }, "sourceLanguage": "PHP" } @@ -40428,8 +40599,8 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "f1f19cd3c9b7872f", - "equalIndicator/v1": "660d5ca670ab0fd528593863c3c5e76b1e99d5b8dd9e7b0ee4de4bfe5db68e6e" + "equalIndicator/v2": "b924270e17c10f07", + "equalIndicator/v1": "f2c0dc13e7e15ff2d40ef3f389848e6f1605257cc3a55e118392df3632ecdabf" }, "baselineState": "new", "properties": { @@ -40441,37 +40612,37 @@ } }, { - "ruleId": "EfferentObjectCouplingInspection", + "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", "kind": "fail", "level": "note", "message": { - "text": "[EA] High efferent coupling (23).", - "markdown": "\\[EA\\] High efferent coupling (23)." + "text": "Attribute can be added to overriding parameter", + "markdown": "Attribute can be added to overriding parameter" }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Property/Controller/Element/UpdateController.php", + "uri": "src/Response/Element.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 43, - "startColumn": 13, - "charOffset": 2107, - "charLength": 16, + "startLine": 40, + "startColumn": 11, + "charOffset": 1370, + "charLength": 66, "snippet": { - "text": "UpdateController" + "text": "Property(description: 'Locked', type: 'string', example: 'locked')" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 41, + "startLine": 38, "startColumn": 1, - "charOffset": 2078, - "charLength": 110, + "charOffset": 1216, + "charLength": 342, "snippet": { - "text": " * @internal\n */\nfinal class UpdateController extends AbstractApiController\n{\n public function __construct(" + "text": " #[Property(description: 'User that modified the element', type: 'integer', example: 1)]\n private readonly int $userModification,\n #[Property(description: 'Locked', type: 'string', example: 'locked')]\n private readonly ?string $locked,\n #[Property(description: 'Is locked', type: 'boolean', example: false)]" }, "sourceLanguage": "PHP" } @@ -40485,10 +40656,10 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "45874f215741c0d2", - "equalIndicator/v1": "91ceea34e0aca77ee9e75d42d1674c9203a8a95adedb9a1117b879f8f845df42" + "equalIndicator/v2": "54e2faa7120fdfad", + "equalIndicator/v1": "faa3722f6b90434e54f632922c9803f6e391e29984d1a9464086c270b3a0ed41" }, - "baselineState": "unchanged", + "baselineState": "new", "properties": { "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate", @@ -40498,37 +40669,37 @@ } }, { - "ruleId": "LongInheritanceChainInspection", + "ruleId": "PhpAttributeCanBeAddedToOverriddenMemberInspection", "kind": "fail", "level": "note", "message": { - "text": "[EA] Class has 3 parent classes, consider using appropriate design patterns.", - "markdown": "\\[EA\\] Class has 3 parent classes, consider using appropriate design patterns." + "text": "Attribute can be added to overriding parameter", + "markdown": "Attribute can be added to overriding parameter" }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Property/Attributes/Request/PredefinedPropertyRequestBody.php", + "uri": "src/Response/Element.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 25, - "startColumn": 13, - "charOffset": 753, - "charLength": 29, + "startLine": 38, + "startColumn": 11, + "charOffset": 1226, + "charLength": 84, "snippet": { - "text": "PredefinedPropertyRequestBody" + "text": "Property(description: 'User that modified the element', type: 'integer', example: 1)" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 23, + "startLine": 36, "startColumn": 1, - "charOffset": 701, - "charLength": 137, + "charOffset": 1098, + "charLength": 339, "snippet": { - "text": "\n#[Attribute(Attribute::TARGET_METHOD)]\nfinal class PredefinedPropertyRequestBody extends RequestBody\n{\n public function __construct()" + "text": " #[Property(description: 'ID of owner', type: 'integer', example: 1)]\n private readonly int $userOwner,\n #[Property(description: 'User that modified the element', type: 'integer', example: 1)]\n private readonly int $userModification,\n #[Property(description: 'Locked', type: 'string', example: 'locked')]" }, "sourceLanguage": "PHP" } @@ -40542,8 +40713,8 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "0f6c1858595af6ed", - "equalIndicator/v1": "9a2e03681f116de615f949dba300e280938521cbee12263ad61337d3fc735818" + "equalIndicator/v2": "0d648721bc039127", + "equalIndicator/v1": "fe6fc561100aa403c25a9624309cc14e7f1cc862740c652d71d7cc91df967beb" }, "baselineState": "new", "properties": { @@ -40555,37 +40726,37 @@ } }, { - "ruleId": "LongInheritanceChainInspection", + "ruleId": "PhpUnusedPrivateMethodInspection", "kind": "fail", "level": "note", "message": { - "text": "[EA] Class has 3 parent classes, consider using appropriate design patterns.", - "markdown": "\\[EA\\] Class has 3 parent classes, consider using appropriate design patterns." + "text": "Unused private method 'getLatestVersionForUser'", + "markdown": "Unused private method 'getLatestVersionForUser'" }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "src/Property/Attributes/Request/ElementPropertyRequestBody.php", + "uri": "src/Util/Traits/ElementProviderTrait.php", "uriBaseId": "SRCROOT" }, "region": { - "startLine": 25, - "startColumn": 13, - "charOffset": 791, - "charLength": 26, + "startLine": 51, + "startColumn": 22, + "charOffset": 1450, + "charLength": 23, "snippet": { - "text": "ElementPropertyRequestBody" + "text": "getLatestVersionForUser" }, "sourceLanguage": "PHP" }, "contextRegion": { - "startLine": 23, + "startLine": 49, "startColumn": 1, - "charOffset": 739, - "charLength": 134, + "charOffset": 1422, + "charLength": 135, "snippet": { - "text": "\n#[Attribute(Attribute::TARGET_METHOD)]\nfinal class ElementPropertyRequestBody extends RequestBody\n{\n public function __construct()" + "text": " }\n\n private function getLatestVersionForUser(\n Asset|Document\\PageSnippet|Concrete $element,\n ?UserInterface $user" }, "sourceLanguage": "PHP" } @@ -40599,8 +40770,8 @@ } ], "partialFingerprints": { - "equalIndicator/v2": "952cdaedba577771", - "equalIndicator/v1": "efa881f809aa9b51baa0f9649613db3e73246ba0a4f74904195d8a6c6a1dfe48" + "equalIndicator/v2": "bfd52ccc33bdf9f8", + "equalIndicator/v1": "295728d99e3a5dcb0efd0d158f8b5f684869670bb2bddd29968e10e6e47ffe22" }, "baselineState": "new", "properties": { @@ -40613,10 +40784,10 @@ } ], "automationDetails": { - "id": "project/qodana/2024-05-16", - "guid": "990d78c7-f6f3-4b29-8f75-6d65c42dbc43", + "id": "project/qodana/2024-05-17", + "guid": "cddb935a-e8fa-4119-872b-9d693e2a2a6c", "properties": { - "jobUrl": "https://github.com/pimcore/studio-backend-bundle/actions/runs/9114692268" + "jobUrl": "https://github.com/pimcore/studio-backend-bundle/actions/runs/9125922627" } }, "newlineSequences": [ @@ -40632,8 +40803,8 @@ "configProfile": "path", "deviceId": "200820300000000-7c33-767c-9695-477d79c87e1c", "qodanaNewResultSummary": { - "moderate": 3, - "total": 3 + "moderate": 36, + "total": 36 } } } diff --git a/src/Dependency/Attributes/Parameters/Query/DependencyModeParameter.php b/src/Dependency/Attributes/Parameters/Query/DependencyModeParameter.php new file mode 100644 index 000000000..20055dd9c --- /dev/null +++ b/src/Dependency/Attributes/Parameters/Query/DependencyModeParameter.php @@ -0,0 +1,41 @@ +value + ), + ); + } +} diff --git a/src/Dependency/Attributes/Response/Property/DependencyCollection.php b/src/Dependency/Attributes/Response/Property/DependencyCollection.php new file mode 100644 index 000000000..fa7606031 --- /dev/null +++ b/src/Dependency/Attributes/Response/Property/DependencyCollection.php @@ -0,0 +1,42 @@ +name] + )] + #[PageParameter] + #[PageSizeParameter] + #[IdParameter('ID of the element', 'element')] + #[DependencyModeParameter] + #[ElementTypeParameter] + #[SuccessResponse( + description: 'Paginated dependencies with total count as header param', + content: new CollectionJson(new DependencyCollection()) + )] + #[NotFoundResponse] + #[UnauthorizedResponse] + #[BadRequestResponse] + #[MethodNotAllowedResponse] + #[UnprocessableContentResponse] + public function getDependencies(#[MapQueryString] DependencyParameters $parameters): JsonResponse + { + $collection = $this->hydratorService->getDependencies( + $parameters, + $this->securityService->getCurrentUser() + ); + + return $this->getPaginatedCollection( + $this->serializer, + $collection->getItems(), + $collection->getTotalItems(), + ); + } +} diff --git a/src/Dependency/Event/DependencyEvent.php b/src/Dependency/Event/DependencyEvent.php new file mode 100644 index 000000000..848efc217 --- /dev/null +++ b/src/Dependency/Event/DependencyEvent.php @@ -0,0 +1,40 @@ +dependency; + } +} diff --git a/src/Dependency/Hydrator/DependencyHydrator.php b/src/Dependency/Hydrator/DependencyHydrator.php new file mode 100644 index 000000000..c650969ee --- /dev/null +++ b/src/Dependency/Hydrator/DependencyHydrator.php @@ -0,0 +1,68 @@ +extractData($elementType, $elementId); + + return new Dependency( + $data['id'], + $data['path'], + $data['type'], + $data['subtype'], + $data['published'] + ); + } + + private function extractData(string $elementType, int $elementId): array + { + $element = $this->getElement($this->serviceResolver, $elementType, $elementId); + + return [ + 'id' => $element->getId(), + 'type' => $this->serviceResolver->getElementType($element), + 'subtype' => $element->getType(), + 'published' => $this->serviceResolver->isPublished($element), + 'path' => $element->getRealFullPath(), + ]; + } +} \ No newline at end of file diff --git a/src/Dependency/Hydrator/DependencyHydratorInterface.php b/src/Dependency/Hydrator/DependencyHydratorInterface.php new file mode 100644 index 000000000..b0f8de761 --- /dev/null +++ b/src/Dependency/Hydrator/DependencyHydratorInterface.php @@ -0,0 +1,27 @@ +getElement( + $this->serviceResolver, + $elementType, + $elementId + ) + ->getDependencies() + ->getRequires(); + } + + public function listRequiresDependenciesTotalCount(string $elementType, int $elementId): int + { + return + $this->getElement( + $this->serviceResolver, + $elementType, + $elementId + ) + ->getDependencies() + ->getRequiresTotalCount(); + } + + public function listRequiredByDependencies(string $elementType, int $elementId): array + { + return $this->getElement( + $this->serviceResolver, + $elementType, + $elementId + ) + ->getDependencies() + ->getRequiredBy(); + } + + public function listRequiredByDependenciesTotalCount(string $elementType, int $elementId): int + { + return + $this->getElement( + $this->serviceResolver, + $elementType, + $elementId + ) + ->getDependencies() + ->getRequiredByTotalCount(); + } +} \ No newline at end of file diff --git a/src/Dependency/Repository/DependencyRepositoryInterface.php b/src/Dependency/Repository/DependencyRepositoryInterface.php new file mode 100644 index 000000000..7c07c527c --- /dev/null +++ b/src/Dependency/Repository/DependencyRepositoryInterface.php @@ -0,0 +1,31 @@ +mode = $this->getDependencyMode($dependencyMode); + parent::__construct($page, $pageSize); + } + + public function getMode(): DependencyMode + { + return $this->mode; + } + + public function getElementId(): int + { + return $this->elementId; + } + + public function getElementType(): string + { + if ($this->elementType === ElementTypes::TYPE_DATA_OBJECT) { + return ElementTypes::TYPE_OBJECT; + } + + return $this->elementType; + } + + private function getDependencyMode(string $mode): DependencyMode { + $dependencyMode = DependencyMode::tryFrom($mode); + + if(!$dependencyMode) { + throw new InvalidDependencyMode('Invalid dependency mode: ' . $mode); + } + + return $dependencyMode; + } + +} diff --git a/src/Dependency/Response/Collection.php b/src/Dependency/Response/Collection.php new file mode 100644 index 000000000..c9921aa12 --- /dev/null +++ b/src/Dependency/Response/Collection.php @@ -0,0 +1,60 @@ +totalItems; + } + + /** + * @return array + */ + public function getItems(): array + { + return $this->items; + } + + public function getCurrentPage(): int + { + return $this->currentPage; + } + + public function getPageSize(): int + { + return $this->pageSize; + } +} diff --git a/src/Dependency/Schema/Dependency.php b/src/Dependency/Schema/Dependency.php new file mode 100644 index 000000000..19defab67 --- /dev/null +++ b/src/Dependency/Schema/Dependency.php @@ -0,0 +1,70 @@ +id; + } + + public function getPath(): string + { + return $this->path; + } + + public function getType(): string + { + return $this->type; + } + + public function getSubType(): string + { + return $this->subType; + } + + public function isPublished(): bool + { + return $this->published; + } +} \ No newline at end of file diff --git a/src/Dependency/Service/DependencyMode.php b/src/Dependency/Service/DependencyMode.php new file mode 100644 index 000000000..548db2516 --- /dev/null +++ b/src/Dependency/Service/DependencyMode.php @@ -0,0 +1,13 @@ +getMode()) { + DependencyMode::REQUIRES => $this->getRequiredDependencies($parameters), + DependencyMode::REQUIRED_BY => $this->getRequiredByDependencies($parameters), + }; + } + + private function getDependencyCollection(array $dependencies): array + { + $hydratedDependencies = []; + + foreach($dependencies as $dependency) { + $dependency = $this->dependencyHydrator->hydrate($dependency); + if($dependency) { + $this->eventDispatcher->dispatch( + new DependencyEvent($dependency), + DependencyEvent::EVENT_NAME + ); + $hydratedDependencies[] = $dependency; + } + } + + return $hydratedDependencies; + } + + private function getRequiredDependencies( + DependencyParameters $parameters + ): Collection { + + $dependencies = $this->dependencyRepository->listRequiresDependencies( + $parameters->getElementType(), + $parameters->getElementId() + ); + + $dependencies = $this->getDependencyCollection($dependencies); + + return new Collection( + $dependencies, + $parameters->getPage(), + $parameters->getPageSize(), + $this->dependencyRepository->listRequiresDependenciesTotalCount( + $parameters->getElementType(), + $parameters->getElementId() + ) + ); + } + + private function getRequiredByDependencies( + DependencyParameters $parameters + ): Collection { + $dependencies = $this->dependencyRepository->listRequiredByDependencies( + $parameters->getElementType(), + $parameters->getElementId() + ); + + $dependencies = $this->getDependencyCollection($dependencies); + + return new Collection( + $dependencies, + $parameters->getPage(), + $parameters->getPageSize(), + $this->dependencyRepository->listRequiredByDependenciesTotalCount( + $parameters->getElementType(), + $parameters->getElementId() + ) + ); + } +} \ No newline at end of file diff --git a/src/Dependency/Service/DependencyServiceInterface.php b/src/Dependency/Service/DependencyServiceInterface.php new file mode 100644 index 000000000..b0f9a1ea5 --- /dev/null +++ b/src/Dependency/Service/DependencyServiceInterface.php @@ -0,0 +1,29 @@ +load('data_index.yaml'); $loader->load('data_index_filters.yaml'); $loader->load('data_objects.yaml'); + $loader->load('dependencies.yaml'); $loader->load('event_subscribers.yaml'); $loader->load('factories.yaml'); $loader->load('filters.yaml'); diff --git a/src/Dto/Dependency.php b/src/Dto/Dependency.php deleted file mode 100644 index 840b73539..000000000 --- a/src/Dto/Dependency.php +++ /dev/null @@ -1,69 +0,0 @@ -dependency->getSourceId(); - } - - public function getRequires(int $offset = null, int $limit = null): array - { - return $this->dependency->getRequires($offset, $limit); - } - - public function getFilterRequiresByPath(int $offset = null, int $limit = null, string $value = null): array - { - return $this->dependency->getFilterRequiresByPath($offset, $limit, $value); - } - - public function getFilterRequiredByPath(int $offset = null, int $limit = null, string $value = null): array - { - return $this->dependency->getFilterRequiredByPath($offset, $limit, $value); - } - - public function getRequiredBy(int $offset = null, int $limit = null): array - { - return $this->dependency->getRequiredBy($offset, $limit); - } - - public function getSourceType(): string - { - return $this->dependency->getSourceType(); - } - - public function getRequiresTotalCount(): int - { - return $this->dependency->getRequiresTotalCount(); - } - - public function getRequiredByTotalCount(): int - { - return $this->dependency->getRequiredByTotalCount(); - } - - public function isRequired(): bool - { - return $this->dependency->isRequired(); - } -} diff --git a/src/Exception/InvalidDependencyMode.php b/src/Exception/InvalidDependencyMode.php new file mode 100644 index 000000000..255caef6d --- /dev/null +++ b/src/Exception/InvalidDependencyMode.php @@ -0,0 +1,28 @@ +name, description: 'DataObject operations to get/update/create/delete data objects' )] +#[Tag( + name: Tags::Dependencies->name, + description: 'Get dependencies for a single element.' +)] #[Tag( name: Tags::Properties->name, description: 'Property operations to get/update/create/delete properties' @@ -54,6 +58,7 @@ enum Tags: string case Assets = 'Assets'; case Authorization = 'Authorization'; case DataObjects = 'DataObjects'; + case Dependencies = 'Dependencies'; case Properties = 'Properties'; case PropertiesForElement = 'Properties for Element'; case Translation = 'Translation'; diff --git a/src/Property/Event/PredefinedPropertyEvent.php b/src/Property/Event/PredefinedPropertyEvent.php index 2a5d4a9d9..54a5e9b10 100644 --- a/src/Property/Event/PredefinedPropertyEvent.php +++ b/src/Property/Event/PredefinedPropertyEvent.php @@ -22,6 +22,7 @@ final class PredefinedPropertyEvent extends AbstractPreResponseEvent { public const EVENT_NAME = 'pre_response.predefined_property'; + public function __construct( private readonly PredefinedProperty $predefinedProperty ) diff --git a/tests/Unit/Dependency/DependencyHydratorTest.php b/tests/Unit/Dependency/DependencyHydratorTest.php new file mode 100644 index 000000000..d8f37cbf6 --- /dev/null +++ b/tests/Unit/Dependency/DependencyHydratorTest.php @@ -0,0 +1,76 @@ +getHydrator(); + + $dependency = $hydrator->hydrate(['id' => 1, 'type' => 'document']); + + $this->assertSame(1, $dependency->getId()); + $this->assertSame('/testtest', $dependency->getPath()); + $this->assertSame('document', $dependency->getType()); + $this->assertSame('page', $dependency->getSubType()); + $this->assertTrue($dependency->isPublished()); + $this->assertEmpty($dependency->getAdditionalAttributes()); + } + + /** + * @throws Exception + */ + private function getHydrator(): DependencyHydratorInterface + { + return new DependencyHydrator($this->mockServiceResolver()); + } + + /** + * @throws Exception + */ + private function mockServiceResolver(): ServiceResolverInterface + { + return $this->makeEmpty(ServiceResolverInterface::class, + [ + 'getElementById' => $this->getDocument(), + 'getElementType' => 'document', + 'isPublished' => true, + ]); + } + + private function getDocument(): Document + { + $document = new Document(); + $document->setPath('/test'); + $document->setId(1); + $document->setType('page'); + $document->setKey('test'); + + return $document; + } +}