Delivery API: Fix numeric and date based filters #15286
CodeScene PR Check
✅ Code Health Quality Gates: OK
- Declining Code Health: 4 findings(s) 🚩
- Improving Code Health: 5 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Lightweight sanity check
View detailed results in CodeScene
Details
🚩 Declining Code Health (highest to lowest):
- Code Duplication ApiContentQueryFilterBuilder.cs
- Complex Method ApiContentQuerySortBuilder.cs: Append
- Complex Method ApiContentQueryFilterBuilder.cs: Append
- Excess Number of Function Arguments ApiContentQuerySelectorBuilder.cs: Build
✅ Improving Code Health:
- Excess Number of Function Arguments ApiContentQueryProvider.cs: BuildSelectorOperation
- Complex Method ApiContentQueryProvider.cs: ApplySorting
- Complex Method ApiContentQueryProvider.cs: ApplyFiltering
- Overall Code Complexity ApiContentQueryProvider.cs
- Primitive Obsession ApiContentQueryProvider.cs
Annotations
Check notice on line 103 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/13.0)
✅ No longer an issue: Excess Number of Function Arguments
BuildSelectorOperation is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 103 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/13.0)
✅ No longer an issue: Complex Method
ApplySorting is no longer above the threshold for cyclomatic complexity
Check notice on line 103 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/13.0)
✅ No longer an issue: Complex Method
ApplyFiltering is no longer above the threshold for cyclomatic complexity
Check notice on line 1 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/13.0)
✅ No longer an issue: Overall Code Complexity
The mean cyclomatic complexity in this module is no longer above the threshold
Check notice on line 1 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/13.0)
✅ No longer an issue: Primitive Obsession
The ratio of primivite types in function arguments is no longer above the threshold
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/13.0)
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: ApplyExactDateFilter,ApplyExactNumberFilter. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/13.0)
❌ New issue: Complex Method
Append has a cyclomatic complexity of 11, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/13.0)
❌ New issue: Excess Number of Function Arguments
Build has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/13.0)
❌ New issue: Complex Method
Append has a cyclomatic complexity of 15, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.