{"results":{"result":{"added-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-url":"https://github.com/umbraco/Umbraco-CMS/pull/22712","old-code-health":9.460947784725608,"modified-files":{"code-health":9.541715608403694,"old-code-health":9.460947784725608,"files":[{"file":"src/Umbraco.Cms.Api.Management/OpenApi/Transformers/BackOfficeSecurityRequirementsTransformer.cs","loc":89,"old-loc":85,"code-health":10.0,"old-code-health":9.6882083290695},{"file":"tests/Umbraco.Tests.UnitTests/Umbraco.Cms.Api.Management/OpenApi/BackOfficeSecurityRequirementsTransformerTests.cs","loc":264,"old-loc":262,"code-health":9.387218218812514,"old-code-health":9.387218218812514}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"22712","analysis-time":"2026-05-05T14:30:43Z","negative-impact-count":0,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":0,"commits":["dbdf339d034e0823b0bd3de3376e11a341f138fb","e6e73ac7f4f080f8198620b123e82b6cf27dd642"],"is-negative-review":false,"negative-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"positive-impact-count":2,"repo":"Umbraco-CMS","code-health":9.541715608403694,"version":"3.0","authors":["Jacob Overgaard","Laura Neto"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":2,"number-of-files-touched":2,"findings":[{"method":"TransformAsync","why-it-occurs":"A complex conditional is an expression inside a branch such as an <code>if</code>-statmeent which consists of multiple, logical operations. Example: <code>if (x.started() && y.running())</code>.Complex conditionals make the code even harder to read, and contribute to the Complex Method code smell. Encapsulate them.","name":"Complex Conditional","file":"src/Umbraco.Cms.Api.Management/OpenApi/Transformers/BackOfficeSecurityRequirementsTransformer.cs","change-level":"improvement","is-hotspot?":false,"line":29,"what-changed":"TransformAsync no longer has a complex conditional","how-to-fix":"Apply the [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring so that the complex conditional is encapsulated in a separate function with a good name that captures the business rule. Optionally, for simple expressions, introduce a new variable which holds the result of the complex conditional.","change-type":"fixed"},{"name":"Code Duplication","file":"tests/Umbraco.Tests.UnitTests/Umbraco.Cms.Api.Management/OpenApi/BackOfficeSecurityRequirementsTransformerTests.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Duplicated code often leads to code that's harder to change since the same logical change has to be done in multiple functions. More duplication gives lower code health.","how-to-fix":"A certain degree of duplicated code might be acceptable. The problems start when it is the same behavior that is duplicated across the functions in the module, ie. a violation of the Don't Repeat Yourself (DRY) principle. DRY violations lead to code that is changed together in predictable patterns, which is both expensive and risky. DRY violations can be identified using CodeScene's X-Ray analysis to detect clusters of change coupled functions with high code similarity. [Read More](https://codescene.com/blog/software-revolution-part3/)\n\nOnce you have identified the similarities across functions, look to extract and encapsulate the concept that varies into its own function(s). These shared abstractions can then be re-used, which minimizes the amount of duplication and simplifies change.","what-changed":"reduced similar code in: TransformAsync_Operation_Skips_AllowAnonymous_Controllers,TransformAsync_Operation_Skips_AllowAnonymous_Methods"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2026-05-05T14:30:43.000Z","project-name":"Umbraco-CMS","repository":"https://github.com/umbraco/Umbraco-CMS.git"}}