Public report — phabricator, published 29 Jul 2026. Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version; ask the repo owner for the full report.
Watchdog 29-07-2026 @ 17:01 UTC Public
Code Health Audit

Phacility/phabricator

44% Weak
CriticalWeakAdequateStrongExemplary
upper third — near Adequate

Very large · 540,315 LoC · rebuild ~3.2 person-years · weakest lens: Readiness (38%)

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

25/26dimensions tool-verifieddeterministic · confidence 1.0 · 1 LLM-assisted, advisory
1674findings with an exact file:lineof 1682 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
26/104dimensions across the health lenses540315 LoC — wide & deep

Executive summary

Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.

phacility/phabricator carries serious gaps (44%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.

It is strongest in Architecture (100%) — the structure is clean and changes stay contained.

The area that most needs attention is Readiness (38%) — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade. Security (40%) is the next concern — exposure to security and compliance incidents is elevated.

Leadership focus, highest impact first: SAST step to CI running what this repository's stack ships (Security & performance tooling); tests that import the unreached modules (directly or through… (Test Coverage); Expand the README with getting-started (Documentation (README)).

For scale: Very large (~540,315 production lines); rebuilding it from scratch would take roughly ~3.2 person-years (~1–7 engineers). Approximate, ±~30%.

It builds on a genuinely strong Architecture foundation (100%); the priorities above are the highest-leverage way to bring the rest up to that level.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Readiness 38% · 47% weightSecurity 40% · 26% weightMaturity 43% · 14% weightCode Health 56% · 8% weightArchitecture 100% · 4% weight

Raise Readiness 38 → 70 (the Healthy floor) ⇒ headline 44 → ~48.

Code composition — where the lines go
Tests 100%
New since the last scan (100+)

202 finding(s) are new versus the previous scan (2026-07-20) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D2 · (anonymous) (cognitive 39) webroot/rsrc/js/application/diffusion/behavior-commit-graph.js
  • D3 · FileTooLong: editor/PhabricatorApplicationTransactionEditor.php src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
  • D3 · FileTooLong: policy/PhabricatorCursorPagedPolicyAwareQuery.php src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
  • D3 · FileTooLong: editengine/PhabricatorEditEngine.php src/applications/transactions/editengine/PhabricatorEditEngine.php
  • D3 · FileTooLong: __tests__/PhutilCalendarRecurrenceRuleTestCase.php src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php
  • D3 · FileTooLong: data/PhutilCalendarRecurrenceRule.php src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php
  • D3 · FileTooLong: parser/DifferentialChangesetParser.php src/applications/differential/parser/DifferentialChangesetParser.php
  • D3 · FileTooLong: translation/PhabricatorUSEnglishTranslation.php src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
  • D3 · FileTooLong: __tests__/PhabricatorProjectCoreTestCase.php src/applications/project/__tests__/PhabricatorProjectCoreTestCase.php
  • D3 · FileTooLong: editor/DifferentialTransactionEditor.php src/applications/differential/editor/DifferentialTransactionEditor.php
  • D3 · FileTooLong: controller/DifferentialRevisionViewController.php src/applications/differential/controller/DifferentialRevisionViewController.php
  • D3 · FileTooLong: __tests__/PhabricatorChangeParserTestCase.php src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php
  • D3 · FileTooLong: engine/PhabricatorProfileMenuEngine.php src/applications/search/engine/PhabricatorProfileMenuEngine.php
  • D3 · FileTooLong: engine/PhabricatorApplicationSearchEngine.php src/applications/search/engine/PhabricatorApplicationSearchEngine.php
  • D3 · FileTooLong: engine/DiffusionCommitHookEngine.php src/applications/diffusion/engine/DiffusionCommitHookEngine.php
  • D3 · FileTooLong: phui/PHUIIconView.php src/view/phui/PHUIIconView.php
  • D3 · FileTooLong: controller/DiffusionServeController.php src/applications/diffusion/controller/DiffusionServeController.php
  • D3 · FileTooLong: controller/DiffusionCommitController.php src/applications/diffusion/controller/DiffusionCommitController.php
  • D3 · FileTooLong: adapter/HeraldAdapter.php src/applications/herald/adapter/HeraldAdapter.php
  • D3 · FileTooLong: controller/PhabricatorProjectBoardViewController.php src/applications/project/controller/PhabricatorProjectBoardViewController.php
  • D3 · FileTooLong: controller/DiffusionBrowseController.php src/applications/diffusion/controller/DiffusionBrowseController.php
  • D3 · FileTooLong: controller/PhabricatorApplicationSearchController.php src/applications/search/controller/PhabricatorApplicationSearchController.php
  • D3 · FileTooLong: query/ManiphestTaskQuery.php src/applications/maniphest/query/ManiphestTaskQuery.php
  • D3 · FileTooLong: field/PhabricatorCustomField.php src/infrastructure/customfield/field/PhabricatorCustomField.php
  • D3 · FileTooLong: ics/PhutilICSParser.php src/applications/calendar/parser/ics/PhutilICSParser.php
  • D3 · FileTooLong: services/PhabricatorConfigDatabaseStatusController.php src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php
  • D3 · FileTooLong: management/DiffusionRepositoryBasicsManagementPanel.php src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php
  • D3 · FileTooLong: query/DiffusionCommitQuery.php src/applications/diffusion/query/DiffusionCommitQuery.php
  • D3 · FileTooLong: factor/PhabricatorDuoAuthFactor.php src/applications/auth/factor/PhabricatorDuoAuthFactor.php
  • D3 · FileTooLong: controller/ManiphestReportController.php src/applications/maniphest/controller/ManiphestReportController.php
  • D3 · FileTooLong: phui/PHUIObjectItemView.php src/view/phui/PHUIObjectItemView.php
  • D3 · FileTooLong: filter/PhabricatorPolicyFilter.php src/applications/policy/filter/PhabricatorPolicyFilter.php
  • D3 · FileTooLong: query/DifferentialRevisionQuery.php src/applications/differential/query/DifferentialRevisionQuery.php
  • D3 · FileTooLong: engine/PhabricatorAuthSessionEngine.php src/applications/auth/engine/PhabricatorAuthSessionEngine.php
  • D3 · FileTooLong: controller/ManiphestTaskDetailController.php src/applications/maniphest/controller/ManiphestTaskDetailController.php
  • D3 · FileTooLong: page/PhabricatorStandardPageView.php src/view/page/PhabricatorStandardPageView.php
  • D3 · FileTooLong: engine/HeraldEngine.php src/applications/herald/engine/HeraldEngine.php
  • D3 · FileTooLong: editor/ManiphestTransactionEditor.php src/applications/maniphest/editor/ManiphestTransactionEditor.php
  • D3 · FileTooLong: protocol/DiffusionRepositoryClusterEngine.php src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
  • D3 · FileTooLong: query/PhabricatorProjectQuery.php src/applications/project/query/PhabricatorProjectQuery.php
  • D3 · FileTooLong: controller/HarbormasterBuildLogRenderController.php src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php
  • D3 · FileTooLong: worker/DrydockLeaseUpdateWorker.php src/applications/drydock/worker/DrydockLeaseUpdateWorker.php
  • D3 · FileTooLong: editor/PhabricatorAuditEditor.php src/applications/audit/editor/PhabricatorAuditEditor.php
  • D3 · FileTooLong: controller/HeraldTranscriptController.php src/applications/herald/controller/HeraldTranscriptController.php
  • D3 · FileTooLong: controller/PhabricatorAuthRegisterController.php src/applications/auth/controller/PhabricatorAuthRegisterController.php
  • D3 · FileTooLong: engine/PhabricatorRepositoryDiscoveryEngine.php src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
  • D3 · FileTooLong: parser/DifferentialHunkParser.php src/applications/differential/parser/DifferentialHunkParser.php
  • D3 · FileTooLong: editfield/PhabricatorEditField.php src/applications/transactions/editfield/PhabricatorEditField.php
  • D3 · FileTooLong: controller/HarbormasterBuildViewController.php src/applications/harbormaster/controller/HarbormasterBuildViewController.php
  • D3 · FileTooLong: controller/LegalpadDocumentSignController.php src/applications/legalpad/controller/LegalpadDocumentSignController.php
  • D3 · FileTooLong: menu/PhabricatorMainMenuView.php src/view/page/menu/PhabricatorMainMenuView.php
  • D3 · FileTooLong: commitchangeparser/PhabricatorRepositorySvnCommitChangeParserWorker.php src/applications/repository/worker/commitchangeparser/PhabricatorRepositorySvnCommitChangeParserWorker.php
  • D3 · FileTooLong: phui/PHUITimelineEventView.php src/view/phui/PHUITimelineEventView.php
  • D4 · Duplicated block (44 lines × 2) src/applications/files/management/PhabricatorFilesManagementIntegrityWorkflow.php
  • D4 · Duplicated block (42 lines × 8) src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php
  • D4 · Duplicated block (32 lines × 2) src/applications/differential/constants/DifferentialConstantsModule.php
  • D4 · Duplicated block (31 lines × 8) src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php
  • D4 · Duplicated block (28 lines × 2) src/applications/config/controller/PhabricatorConfigConsoleController.php
  • D4 · Duplicated block (26 lines × 2) src/applications/almanac/controller/AlmanacDeviceViewController.php
  • D4 · Duplicated block (24 lines × 2) src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceTestCase.php
  • D4 · Duplicated block (24 lines × 2) src/applications/doorkeeper/bridge/DoorkeeperBridgeAsana.php
  • D4 · Duplicated block (24 lines × 2) src/applications/people/conduit/UserDisableConduitAPIMethod.php
  • D4 · Duplicated block (23 lines × 2) src/applications/drydock/controller/DrydockController.php
  • D4 · Duplicated block (23 lines × 2) src/applications/metamta/controller/PhabricatorMetaMTAMailgunReceiveController.php
  • D4 · Duplicated block (23 lines × 2) src/applications/owners/controller/PhabricatorOwnersDetailController.php
  • D4 · Duplicated block (22 lines × 2) src/applications/diffusion/controller/DiffusionCommitBranchesController.php
  • D4 · Duplicated block (22 lines × 2) src/applications/packages/xaction/package/PhabricatorPackagesPackagePublisherTransaction.php
  • D4 · Duplicated block (21 lines × 3) src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php
  • D4 · Duplicated block (21 lines × 2) src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php
  • D4 · Duplicated block (21 lines × 2) src/applications/calendar/parser/data/PhutilCalendarAbsoluteDateTime.php
  • D4 · Duplicated block (21 lines × 2) src/applications/differential/xaction/DifferentialRevisionReviewersTransaction.php
  • D4 · Duplicated block (21 lines × 2) src/applications/diffusion/controller/DiffusionCompareController.php
  • D4 · Duplicated block (21 lines × 2) src/applications/herald/controller/HeraldRuleController.php
  • D4 · Duplicated block (20 lines × 7) src/applications/calendar/query/PhabricatorCalendarExportQuery.php
  • D4 · Duplicated block (20 lines × 4) src/applications/auth/query/PhabricatorAuthContactNumberQuery.php
  • D4 · Duplicated block (20 lines × 3) src/applications/auth/query/PhabricatorAuthChallengeQuery.php
  • D4 · Duplicated block (20 lines × 2) src/applications/almanac/query/AlmanacNamespaceQuery.php
  • D4 · Duplicated block (20 lines × 2) src/applications/dashboard/query/PhabricatorDashboardPortalQuery.php
  • D4 · Duplicated block (20 lines × 2) src/applications/drydock/management/DrydockManagementReleaseLeaseWorkflow.php
  • D4 · Duplicated block (19 lines × 2) src/applications/differential/controller/DifferentialRevisionViewController.php
  • D4 · Duplicated block (19 lines × 2) src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
  • D4 · Duplicated block (19 lines × 2) src/applications/drydock/controller/DrydockBlueprintViewController.php
  • D4 · Duplicated block (19 lines × 2) src/applications/packages/controller/PhabricatorPackagesPackageViewController.php
  • D4 · Duplicated block (18 lines × 2) src/applications/auth/controller/config/PhabricatorAuthListController.php
  • D4 · Duplicated block (18 lines × 2) src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
  • D4 · Duplicated block (18 lines × 2) src/applications/dashboard/controller/dashboard/PhabricatorDashboardViewController.php
  • D4 · Duplicated block (18 lines × 2) src/applications/differential/engine/DifferentialDiffExtractionEngine.php
  • D4 · Duplicated block (18 lines × 2) src/applications/harbormaster/controller/HarbormasterPlanViewController.php
  • D4 · Duplicated block (18 lines × 2) src/applications/passphrase/controller/PassphraseCredentialDestroyController.php
  • D4 · Duplicated block (17 lines × 52) src/applications/almanac/query/AlmanacBindingQuery.php
  • D4 · Duplicated block (17 lines × 5) src/applications/guides/module/PhabricatorGuideInstallModule.php
  • D4 · Duplicated block (17 lines × 3) src/applications/almanac/controller/AlmanacDeviceViewController.php
  • D4 · Duplicated block (17 lines × 3) src/applications/files/controller/PhabricatorFileViewController.php
  • D4 · Duplicated block (17 lines × 3) src/applications/meta/controller/PhabricatorApplicationEditController.php
  • D4 · Duplicated block (17 lines × 3) src/applications/owners/xaction/PhabricatorOwnersPackageAuthorityTransaction.php
  • D4 · Duplicated block (17 lines × 2) src/applications/audit/view/PhabricatorAuditTransactionView.php
  • D4 · Duplicated block (17 lines × 2) src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php
  • D4 · Duplicated block (17 lines × 2) src/applications/conpherence/controller/ConpherenceRoomPictureController.php
  • D4 · Duplicated block (17 lines × 2) src/applications/dashboard/controller/dashboard/PhabricatorDashboardArchiveController.php
  • D4 · Duplicated block (17 lines × 2) src/applications/diffusion/controller/DiffusionBranchTableController.php

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €160,000–€790,000
Cost to rebuild€160,000–€790,000 (1.6–4.9 person-years (2,613–8,291 h), ~1–7 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 44% quality) — the last 20% of quality is most of the work
Size & shapeVery large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~3.2 person-years of build effort (about ~€470,000 to rebuild). Its weakest lens is Readiness at 38% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Resolve the 3 Largest orphaned file finding(s) in Knowledge Freshness — start with PhabricatorApplicationTransactionEditor.php, PhabricatorCursorPagedPolicyAwareQuery.php, PhabricatorRepository.php.
+3.8 pts · Low effort · Knowledge Freshness
2
Add a SAST step to CI running what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
+7.0 pts · Medium effort · Security & performance tooling
3
Add tests that import the unreached modules (directly or through their public entry).
+7.0 pts · Medium effort · Test Coverage

Diagnosis — what's actually going on

Value concentrated against a weak lens · High · Value at risk
This is a Very large asset (~3.2 person-years to rebuild), and its weakest lens is Readiness at 38%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Very large, ~3.2 person-years rebuild (540,315 LoC) · weakest lens: Readiness 38%
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Add a SAST step to CI running what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a SAST step to CI running what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 7.0/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 3–6% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2 complexity, D4 duplication, D6 cohesion: averaging 7.0/10 across the code-quality signals
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

At a glance — Code Health · 56% · Adequate · gated by R1

At a glance — Architecture · 100% · Exemplary

At a glance — Maturity · 43% · Weak · gated by D34, M2

At a glance — Readiness · 38% · Weak · gated by R4, P3

At a glance — Security · 40% · Weak · gated by D28

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2021 — Injection34High / Critical
A02:2021 — Cryptographic Failures4High / Critical

Roadmap

First, integrate static analysis and security scanning into the CI pipeline to fail the build on regressions. Next, increase test coverage by adding tests for all unreached production modules. Then, expand the README with a getting-started guide, architecture overview, and project map. Finally, establish an architecture decision record log to capture significant design choices and their rationale.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 3 Largest orphaned file finding(s) in Knowledge Freshness — start with PhabricatorApplicationTransactionEditor.php, PhabricatorCursorPagedPolicyAwareQuery.php, PhabricatorRepository.php.+3.8 ptsLowKnowledge Freshness
Add a SAST step to CI running what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+7.0 ptsMediumSecurity & performance tooling
Add tests that import the unreached modules (directly or through their public entry).+7.0 ptsMediumTest Coverage
Resolve the 3 Secret finding(s) in Secrets (history) — start with using_oauthserver.diviner (2), PhabricatorUser.php.+3.4 ptsLowSecrets (history)
Expand the README with getting-started, architecture overview and a project map.+5.3 ptsMediumDocumentation (README)
Start an ADR log (docs/adr/) recording significant decisions and their rationale.+5.3 ptsMediumArchitecture documentation
Run the test suite in CI via an explicit runner step (`vendor/bin/phpunit` for the toolchain this pipeline already uses) and gate merges on it.+4.9 ptsMediumCI/CD gates
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+3.7 ptsMediumDependency Hygiene

File quality

Per-file score 0–10 — a quality signature. Of 815 files carrying findings, judged against the Production bar: 0% slop · 46% mixed · 54% near-clean.

FileScoreBandWorst signal
src/applications/differential/parser/DifferentialChangesetParser.php5.5MixedCyclomatic Complexity: DifferentialChangesetParser.render (cyclomatic 65)
src/applications/config/view/PhabricatorSetupIssueView.php5.7MixedStatic Analysis (SAST): Medium: phpinfo-use
src/aphront/configuration/AphrontApplicationConfiguration.php5.8MixedCognitive Complexity: AphrontApplicationConfiguration.readHTTPPOSTData (cognitive 25)
src/infrastructure/diff/interface/PhabricatorInlineComment.php6.3MixedGod Classes: TooManyMethods: PhabricatorInlineComment
src/applications/notification/config/PhabricatorNotificationServersConfigType.php6.4MixedCyclomatic Complexity: PhabricatorNotificationServersConfigType.validateStoredValue (cyclomatic 18)
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php7.0MixedCyclomatic Complexity: PhabricatorApplicationTransactionEditor.applyTransactions (cyclomatic 50)
src/applications/transactions/editengine/PhabricatorEditEngine.php7.0MixedCyclomatic Complexity: PhabricatorEditEngine.buildEditResponse (cyclomatic 39)
src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php7.0MixedCyclomatic Complexity: PhutilCalendarRecurrenceRule.newDaysSet (cyclomatic 35)
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php7.0MixedCyclomatic Complexity: PhabricatorCursorPagedPolicyAwareQuery.buildFerretWhereClause (cyclomatic 30)
src/applications/differential/parser/DifferentialHunkParser.php7.0MixedCyclomatic Complexity: DifferentialHunkParser.parseHunksForHighlightMasks (cyclomatic 26)
webroot/rsrc/js/application/diff/DiffChangesetList.js7.0MixedCyclomatic Complexity: _onjumpkey (cyclomatic 24)
src/applications/differential/editor/DifferentialTransactionEditor.php7.0MixedCyclomatic Complexity: DifferentialTransactionEditor.didApplyHeraldRules (cyclomatic 23)
externals/phpmailer/class.phpmailer-lite.php7.0MixedCyclomatic Complexity: PHPMailerLite.WrapText (cyclomatic 20)
externals/phpmailer/class.phpmailer.php7.0MixedCyclomatic Complexity: PHPMailer.WrapText (cyclomatic 20)
src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php7.0MixedCyclomatic Complexity: HarbormasterBuildLogRenderController.handleRequest (cyclomatic 60)
src/applications/differential/controller/DifferentialRevisionViewController.php7.0MixedCyclomatic Complexity: DifferentialRevisionViewController.handleRequest (cyclomatic 57)
src/applications/diffusion/query/DiffusionCommitQuery.php7.0MixedCyclomatic Complexity: DiffusionCommitQuery.buildWhereClauseParts (cyclomatic 48)
src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php7.0MixedCyclomatic Complexity: DiffusionRepositoryBasicsManagementPanel.buildRepositoryStatus (cyclomatic 38)
src/applications/project/query/PhabricatorProjectQuery.php7.0MixedCyclomatic Complexity: PhabricatorProjectQuery.buildWhereClauseParts (cyclomatic 29)
src/applications/herald/engine/HeraldEngine.php7.0MixedCyclomatic Complexity: HeraldEngine.getRuleMatchResult (cyclomatic 24)

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 25 of 26 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 1 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.4 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 26 dimensions across the health lenses
D1D2D3D4D13D15D21D28D29D34D35M1M2M3M4P1P3P6R1R10R2R3R4R7R8R9

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1674 of 1682 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
jscpdCode duplication✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.302✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.302✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 019faed2-d6f6-7636-9088-7a76f438d03e.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D19 Documentation Quality — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
  • D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (2): D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.1 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 6.1 / 10 · rule-coverage 100% · ceiling Prevented

331 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was PhabricatorAuthRegisterController.handleRequest at 88. A further 11 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being AphrontResponse.getHTTPResponseMessage at 44 — they are counted neither in the figure above nor in this dimension's score.

PhabricatorAuthRegisterController.handleRequest (cyclomatic 88)src/applications/auth/controller/PhabricatorAuthRegisterController.php:10
DifferentialChangesetParser.render (cyclomatic 65)src/applications/differential/parser/DifferentialChangesetParser.php:749
PhutilSearchQueryCompiler.tokenizeQuery (cyclomatic 62)src/applications/search/compiler/PhutilSearchQueryCompiler.php:104
HarbormasterBuildLogRenderController.handleRequest (cyclomatic 60)src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php:10
DifferentialRevisionViewController.handleRequest (cyclomatic 57)src/applications/differential/controller/DifferentialRevisionViewController.php:43

+ 326 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 PhabricatorAuthRegisterController.handleRequest (cyclomatic 88) finding(s) in Cyclomatic Complexity — start with PhabricatorAuthRegisterController.php. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 DifferentialChangesetParser.render (cyclomatic 65) finding(s) in Cyclomatic Complexity — start with DifferentialChangesetParser.php. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 PhutilSearchQueryCompiler.tokenizeQuery (cyclomatic 62) finding(s) in Cyclomatic Complexity — start with PhutilSearchQueryCompiler.php. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.2 / 10Adequate✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 5.2 / 10 · rule-coverage 100% · ceiling Prevented

824 method(s) exceeded the cognitive complexity threshold of 15; the worst was PhabricatorAuthRegisterController.handleRequest at 208.

PhabricatorAuthRegisterController.handleRequest (cognitive 208)src/applications/auth/controller/PhabricatorAuthRegisterController.php:10
DifferentialChangesetTwoUpRenderer.renderTextChange (cognitive 173)src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php:31
PhutilSearchQueryCompiler.tokenizeQuery (cognitive 154)src/applications/search/compiler/PhutilSearchQueryCompiler.php:104
DiffusionCommitController.handleRequest (cognitive 152)src/applications/diffusion/controller/DiffusionCommitController.php:17
DifferentialChangesetParser.render (cognitive 150)src/applications/differential/parser/DifferentialChangesetParser.php:749

+ 819 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 PhabricatorAuthRegisterController.handleRequest (cognitive 208) finding(s) in Cognitive Complexity — start with PhabricatorAuthRegisterController.php. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 DifferentialChangesetTwoUpRenderer.renderTextChange (cognitive 173) finding(s) in Cognitive Complexity — start with DifferentialChangesetTwoUpRenderer.php. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 PhutilSearchQueryCompiler.tokenizeQuery (cognitive 154) finding(s) in Cognitive Complexity — start with PhutilSearchQueryCompiler.php. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes9.1 / 10Exemplary✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 9.1 / 10 · rule-coverage 100% · ceiling Prevented

122 god class(es) detected.

TooManyMethods: PhabricatorApplicationTransactionEditor · ×69src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:40
FileTooLong: editor/PhabricatorApplicationTransactionEditor.php · ×53src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:0

✓ On the Gold path — maintain.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.7 / 10Exemplary✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Verified

352 duplicated block group(s) detected.

Duplicated block (14 lines × 2) · ×34src/applications/almanac/controller/AlmanacDeviceViewController.php:21
Duplicated block (13 lines × 2) · ×31src/applications/almanac/controller/AlmanacNamespaceViewController.php:14
Duplicated block (12 lines × 2) · ×31src/aphront/configuration/AphrontApplicationConfiguration.php:299
Duplicated block (16 lines × 2) · ×30src/applications/almanac/controller/AlmanacConsoleController.php:33
Duplicated block (11 lines × 2) · ×29src/applications/almanac/controller/AlmanacDeviceViewController.php:125

+ 54 more group(s) — more in Appendix A; the complete list is findings.md.

✓ On the Gold path — maintain.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D21 · Naming Consistency / 10Exemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D28 · Secrets (history)3.0 / 10Weak✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.

Maturity: DocumentedVerifiedPrevented · effective 3.0 / 10 · rule-coverage 100% · ceiling Documented

7 finding(s): 0 critical, 7 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

Secret: generic-api-key · ×3src/docs/contributor/using_oauthserver.diviner:104detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed

What to do

  1. Resolve the 3 Secret finding(s) in Secrets (history) — start with using_oauthserver.diviner (2), PhabricatorUser.php. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)5.0 / 10Adequate✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: DocumentedVerifiedPrevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Documented

35 finding(s): 0 critical, 1 high, 1 medium, 33 low.

High: insecure-use-string-copy-fnexternals/figlet/chkfont.c:86detected by semgrep finding
Medium: phpinfo-usesrc/applications/config/view/PhabricatorSetupIssueView.php:357detected by semgrep finding
Low: request-host-used · ×32src/aphront/configuration/AphrontApplicationConfiguration.php:12detected by semgrep finding

What to do

  1. Resolve the 32 Low finding(s) in Static Analysis (SAST) — start with AphrontApplicationConfiguration.php (8), PhabricatorConfigClusterSearchController.php (6), PhabricatorNotificationServersConfigType.php (5). — One of this dimension's main actionable groups (32 recommendation-level).
  2. Resolve the 1 High finding(s) in Static Analysis (SAST) — start with chkfont.c. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Medium finding(s) in Static Analysis (SAST) — start with PhabricatorSetupIssueView.php. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness0.0 / 10Critical✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: DocumentedVerifiedPrevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

1855 of 1855 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php.

Largest orphaned file · ×3src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Dormant codebase

What to do

  1. Resolve the 3 Largest orphaned file finding(s) in Knowledge Freshness — start with PhabricatorApplicationTransactionEditor.php, PhabricatorCursorPagedPolicyAwareQuery.php, PhabricatorRepository.php. — One of this dimension's main actionable groups (3 recommendation-level).
  2. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: PhabricatorInlineComment.php↔DiffInline.js 90%; PhabricatorProjectDetailsProfileMenuItem.php↔PhabricatorProjectWorkboardProfileMenuItem.php 73%; PHUIDiffInlineCommentView.php↔DiffInline.js 64%

Change coupling: PhabricatorInlineComment.php ↔ DiffInline.js · ×4src/infrastructure/diff/interface/PhabricatorInlineComment.php
Change coupling clique: PhabricatorProjectDetailsProfileMenuItem.php, PhabricatorProjectWorkboardProfileMenuItem.php, PhabricatorLinkProfileMenuItem.phpsrc/applications/project/menuitem/PhabricatorProjectDetailsProfileMenuItem.php

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

M1 · Documentation (README)4.0 / 10Weak✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

  • The root README is 33 words — likely missing build/run/architecture context.

What to do

  • Expand the README with getting-started, architecture overview and a project map.
  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — decisions aren't captured for future maintainers.
  • No C4/PlantUML/Mermaid diagram or architecture.md — the high-level shape isn't documented.

What to do

  • Start an ADR log (docs/adr/) recording significant decisions and their rationale.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates6.5 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

  • A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — the gate may be running tests, or "test" may be incidental (a path, "latest", a reporter). Make the test step explicit so the gate is unambiguous.
  • A CI pipeline exists but no build/compile invocation (a build step for your stack — dotnet build, npm run build, go build, mvn package, cargo build, …) was matched — changes may merge without being compiled.

What to do

  • Run the test suite in CI via an explicit runner step (`vendor/bin/phpunit` for the toolchain this pipeline already uses) and gate merges on it.
  • Add an explicit build/compile step to your CI pipeline (whatever your stack uses — e.g. dotnet build, npm run build, go build, mvn package, swift build/xcodebuild) so every change is compiled before merge.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add phpstan or psalm (or `semgrep --config=auto`, which runs on any language) as a CI step.

What to do

  • Add a SAST step to CI running what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

R1 · Type Safety0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 0 typed · 183 plain JS

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.5 / 10Strong✓ Tool-verified

React / JS · Code Health — Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm over JS/TS tokens, D-386).

Method: Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm run over JS/TS tokens). Deterministic.

  • webroot/rsrc/js/application/repository/repository-crossreference.js:59 · webroot/rsrc/js/application/repository/repository-crossreference.js:328 — repository-crossreference.js:59
  • support/aphlict/server/lib/AphlictAdminServer.js:51 · support/aphlict/server/lib/AphlictClientServer.js:57 — AphlictAdminServer.js:51
  • webroot/rsrc/js/application/diff/DiffChangeset.js:106 · webroot/rsrc/js/application/diff/DiffChangeset.js:411 · webroot/rsrc/js/application/diff/DiffInline.js:135 · webroot/rsrc/js/application/diff/DiffInline.js:479 — DiffChangeset.js:106
  • webroot/rsrc/js/application/diff/DiffInline.js:114 · webroot/rsrc/js/application/projects/WorkboardColumn.js:81 — DiffInline.js:114
  • webroot/rsrc/js/application/fact/Chart.js:230 · webroot/rsrc/js/phuix/PHUIXActionListView.js:20 · webroot/rsrc/js/phuix/PHUIXIconView.js:31 — Chart.js:230
  • webroot/rsrc/js/application/fact/ChartFunctionLabel.js:11 · webroot/rsrc/js/phuix/PHUIXFormationFlankView.js:21 — ChartFunctionLabel.js:11
  • webroot/rsrc/js/application/projects/WorkboardCard.js:11 · webroot/rsrc/js/application/projects/WorkboardHeader.js:11 — WorkboardCard.js:11
  • webroot/rsrc/js/phuix/PHUIXActionListView.js:20 · webroot/rsrc/js/phuix/PHUIXIconView.js:31 — PHUIXActionListView.js:20

What to do

  • Extract the duplicated blocks into shared functions/components.
R2 · Cyclomatic Complexity7.4 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • Branch-heavy code is where defects cluster — extract decisions into smaller functions. (×8) — PHUIXAutocomplete.js:428, behavior-phabricator-remarkup-assist.js:188, WorkboardBoard.js:601, …

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files8.3 / 10Strong✓ Tool-verified

React / JS · Code Health — How many components/modules exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

What to do

  • Split the oversized components into smaller, focused ones.
R4 · Test Coverage0.0 / 10Critical✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively — its behavior is unverified. (×8) — DiffChangesetList.js, DiffInline.js, DiffChangeset.js, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • 183 file(s) (~29748 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package.
R8 · Dependency Hygiene8.0 / 10Strong✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. — aphlict_server.js:76

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health56%Adequate — gated by R1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture100%ExemplaryStrongest area.
Maturity43%Weak — gated by D34, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness38%Weak — gated by R4, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security40%Weak — gated by D28Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 78 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations detected
  • AX10 Code composition — not assessed — code composition is computed by ROLE over the .NET document set and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — no singleton implementations detected
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over the .NET project-reference graph and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over the .NET project-reference graph and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from the .NET project graph (projects, types, namespaces) and no such graph was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over the .NET type surface and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — not assessed — test isolation is computed from the .NET project graph (which projects are test projects, and what they reference) and no such graph was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • C1 Data Protection — Not assessed: these personal data controls are read from C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — Not assessed: these audit controls are read from C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~1590 lines of test source are present (.php, .js) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included
  • D12 Dependency Hygiene — Dependency hygiene not measured — no supported dependency manifest was read
  • D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
  • D16 Bus Factor — dormant codebase — no living knowledge left to concentrate
  • D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D19 Documentation Quality — LLM evaluation failed
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D22 Internal API Consistency — No exposed public API
  • D23 Boundary Type-Coupling — Production source is present (.php) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["Acme.Billing"]`, `Catalog: ["Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No PII/GDPR ruleset is bundled (the public p/gdpr semgrep pack was retired) — data compliance is not assessed in this scan.
  • D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .gitlab-ci.yml, azure-pipelines.yml, Jenkinsfile, .circleci); there is no build to attest provenance for.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D38 OSV Dependency Vulnerabilities — No supported non-.NET dependency lockfile found outside build output (npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven pom.xml, Gradle lockfiles, Python requirements.txt/poetry.lock/Pipfile.lock/pdm.lock, PHP composer.lock, Ruby Gemfile.lock, Elixir mix.lock, Dart pubspec.lock, Swift Package.resolved); nothing for OSV to scan. A NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
  • D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is .php, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • D9 Test Distribution — Test source is present (.php, .js) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM1 Domain Modelling — not run — 0/3 markers found
  • ED1 Event-Driven — not run — 0/3 markers found
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not run — 0/3 markers found
  • GD1 Unfinished & placeholder code — no source files
  • IC1 Incompleteness & stubs — not analysed — these correctness checks are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — no data
  • P2 Observability — Observability was not assessed: this check reads .NET source (ILogger/Serilog, OpenTelemetry, health checks) and no such source carries this repository's product — because it is written in another language, or because the solution failed to load. Absence of a .NET logging idiom is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
  • P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
  • P8 Schema migrations — not assessed — schema-migration practice is read from EF Core usage in .NET source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (Clover XML — `vendor/bin/phpunit --coverage-clover coverage.xml`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance was not assessed: this lens reads .NET source (allocation-aware APIs — Span/Memory, ArrayPool/ObjectPool, stackalloc — and a BenchmarkDotNet suite) and no such source was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF2 Allocation hygiene — Performance was not assessed: this lens reads .NET source (allocation-aware APIs — Span/Memory, ArrayPool/ObjectPool, stackalloc — and a BenchmarkDotNet suite) and no such source was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF3 Async & latency hygiene — Performance was not assessed: this lens reads .NET source (allocation-aware APIs — Span/Memory, ArrayPool/ObjectPool, stackalloc — and a BenchmarkDotNet suite) and no such source was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D33 (JS/npm Dependency Vulnerabilities)
  • R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not analysed — these correctness checks are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — not analysed — these correctness checks are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • X3 Exception handling — not analysed — these correctness checks are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • X4 Structured logging — not analysed — these correctness checks are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Issue — 4 finding(s)
D28 · Secrets (history) · Secret · ×3
  • Secret: generic-api-key src/docs/contributor/using_oauthserver.diviner:104 — matched rule 'generic-api-key'
  • Secret: generic-api-key src/docs/developer/using_oauthserver.diviner:104 — matched rule 'generic-api-key'
  • Secret: generic-api-key src/applications/people/storage/user/PhabricatorUser.php:85 — matched rule 'generic-api-key'
D29 · Static Analysis (SAST) · High · ×1
  • High: insecure-use-string-copy-fn externals/figlet/chkfont.c:86 — Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Warning — 1637 finding(s)
D3 · God Classes · TooManyMethods · ×69
  • TooManyMethods: PhabricatorApplicationTransactionEditor src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:40 — TooManyMethods — 192 methods.
  • TooManyMethods: PhabricatorEditEngine src/applications/transactions/editengine/PhabricatorEditEngine.php:15 — TooManyMethods — 132 methods.
  • TooManyMethods: PhabricatorEditField src/applications/transactions/editfield/PhabricatorEditField.php:3 — TooManyMethods — 118 methods.
  • TooManyMethods: PhabricatorCustomField src/infrastructure/customfield/field/PhabricatorCustomField.php:19 — TooManyMethods — 109 methods.
  • TooManyMethods: PhabricatorCursorPagedPolicyAwareQuery src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:16 — TooManyMethods — 94 methods.
  • TooManyMethods: HeraldAdapter src/applications/herald/adapter/HeraldAdapter.php:3 — TooManyMethods — 91 methods.
  • TooManyMethods: DifferentialChangesetRenderer src/applications/differential/render/DifferentialChangesetRenderer.php:3 — TooManyMethods — 90 methods.
  • TooManyMethods: PhabricatorApplicationSearchEngine src/applications/search/engine/PhabricatorApplicationSearchEngine.php:17 — TooManyMethods — 89 methods.
  • TooManyMethods: PhabricatorInlineComment src/infrastructure/diff/interface/PhabricatorInlineComment.php:3 — TooManyMethods — 79 methods.
  • TooManyMethods: DifferentialChangesetParser src/applications/differential/parser/DifferentialChangesetParser.php:3 — TooManyMethods — 75 methods.
  • TooManyMethods: PhutilCalendarRecurrenceRule src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php:3 — TooManyMethods — 68 methods.
  • TooManyMethods: PhabricatorDatabaseRef src/infrastructure/cluster/PhabricatorDatabaseRef.php:3 — TooManyMethods — 67 methods.
  • TooManyMethods: PhabricatorStandardCustomField src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php:3 — TooManyMethods — 67 methods.
  • TooManyMethods: AphrontRequest src/aphront/AphrontRequest.php:8 — TooManyMethods — 65 methods.
  • TooManyMethods: PhabricatorAuthProvider src/applications/auth/provider/PhabricatorAuthProvider.php:3 — TooManyMethods — 61 methods.
  • TooManyMethods: PhabricatorApplication src/applications/base/PhabricatorApplication.php:11 — TooManyMethods — 61 methods.
  • TooManyMethods: DifferentialTransactionEditor src/applications/differential/editor/DifferentialTransactionEditor.php:3 — TooManyMethods — 60 methods.
  • TooManyMethods: PhabricatorObjectHandle src/applications/phid/PhabricatorObjectHandle.php:3 — TooManyMethods — 58 methods.
  • TooManyMethods: DiffusionCommitHookEngine src/applications/diffusion/engine/DiffusionCommitHookEngine.php:11 — TooManyMethods — 54 methods.
  • TooManyMethods: DivinerAtom src/applications/diviner/atom/DivinerAtom.php:3 — TooManyMethods — 53 methods.
  • TooManyMethods: PhabricatorTypeaheadDatasource src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php:6 — TooManyMethods — 53 methods.
  • TooManyMethods: PHUITimelineEventView src/view/phui/PHUITimelineEventView.php:3 — TooManyMethods — 52 methods.
  • TooManyMethods: PhabricatorAuthFactor src/applications/auth/factor/PhabricatorAuthFactor.php:3 — TooManyMethods — 51 methods.
  • TooManyMethods: ConduitAPIMethod src/applications/conduit/method/ConduitAPIMethod.php:8 — TooManyMethods — 48 methods.
  • TooManyMethods: PhabricatorProjectCoreTestCase src/applications/project/__tests__/PhabricatorProjectCoreTestCase.php:3 — TooManyMethods — 48 methods.
  • + 44 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×53
  • FileTooLong: editor/PhabricatorApplicationTransactionEditor.php src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:0 — FileTooLong — 3240 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: policy/PhabricatorCursorPagedPolicyAwareQuery.php src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:0 — FileTooLong — 1853 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: diff/DiffChangesetList.js webroot/rsrc/js/application/diff/DiffChangesetList.js:0 — FileTooLong — 1689 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units).
  • FileTooLong: editengine/PhabricatorEditEngine.php src/applications/transactions/editengine/PhabricatorEditEngine.php:0 — FileTooLong — 1566 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: __tests__/PhutilCalendarRecurrenceRuleTestCase.php src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php:0 — FileTooLong — 1254 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: data/PhutilCalendarRecurrenceRule.php src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php:0 — FileTooLong — 1189 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: parser/DifferentialChangesetParser.php src/applications/differential/parser/DifferentialChangesetParser.php:0 — FileTooLong — 1154 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: translation/PhabricatorUSEnglishTranslation.php src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php:0 — FileTooLong — 1114 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: __tests__/PhabricatorProjectCoreTestCase.php src/applications/project/__tests__/PhabricatorProjectCoreTestCase.php:0 — FileTooLong — 1108 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: editor/DifferentialTransactionEditor.php src/applications/differential/editor/DifferentialTransactionEditor.php:0 — FileTooLong — 1015 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: controller/DifferentialRevisionViewController.php src/applications/differential/controller/DifferentialRevisionViewController.php:0 — FileTooLong — 992 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: __tests__/PhabricatorChangeParserTestCase.php src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php:0 — FileTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: engine/PhabricatorProfileMenuEngine.php src/applications/search/engine/PhabricatorProfileMenuEngine.php:0 — FileTooLong — 889 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: engine/PhabricatorApplicationSearchEngine.php src/applications/search/engine/PhabricatorApplicationSearchEngine.php:0 — FileTooLong — 863 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: engine/DiffusionCommitHookEngine.php src/applications/diffusion/engine/DiffusionCommitHookEngine.php:0 — FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: phui/PHUIIconView.php src/view/phui/PHUIIconView.php:0 — FileTooLong — 852 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: controller/DiffusionServeController.php src/applications/diffusion/controller/DiffusionServeController.php:0 — FileTooLong — 812 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: controller/DiffusionCommitController.php src/applications/diffusion/controller/DiffusionCommitController.php:0 — FileTooLong — 807 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: adapter/HeraldAdapter.php src/applications/herald/adapter/HeraldAdapter.php:0 — FileTooLong — 755 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: controller/PhabricatorProjectBoardViewController.php src/applications/project/controller/PhabricatorProjectBoardViewController.php:0 — FileTooLong — 748 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: controller/DiffusionBrowseController.php src/applications/diffusion/controller/DiffusionBrowseController.php:0 — FileTooLong — 736 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: controller/PhabricatorApplicationSearchController.php src/applications/search/controller/PhabricatorApplicationSearchController.php:0 — FileTooLong — 733 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: query/ManiphestTaskQuery.php src/applications/maniphest/query/ManiphestTaskQuery.php:0 — FileTooLong — 694 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: field/PhabricatorCustomField.php src/infrastructure/customfield/field/PhabricatorCustomField.php:0 — FileTooLong — 689 significant lines (blank, comment-only and punctuation-only lines excluded).
  • FileTooLong: ics/PhutilICSParser.php src/applications/calendar/parser/ics/PhutilICSParser.php:0 — FileTooLong — 633 significant lines (blank, comment-only and punctuation-only lines excluded).
  • + 28 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×34
  • Duplicated block (14 lines × 2) src/applications/almanac/controller/AlmanacDeviceViewController.php:21 — src/applications/almanac/controller/AlmanacDeviceViewController.php:21-34 | src/applications/almanac/controller/AlmanacNamespaceViewController.php:19-32
  • Duplicated block (14 lines × 2) src/applications/almanac/management/AlmanacManagementTrustKeyWorkflow.php:25 — src/applications/almanac/management/AlmanacManagementTrustKeyWorkflow.php:25-38 | src/applications/almanac/management/AlmanacManagementUntrustKeyWorkflow.php:25-38
  • Duplicated block (14 lines × 2) src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php:275 — src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php:275-288 | src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php:315-328
  • Duplicated block (14 lines × 2) src/applications/auth/conduit/PhabricatorAuthQueryPublicKeysConduitAPIMethod.php:32 — src/applications/auth/conduit/PhabricatorAuthQueryPublicKeysConduitAPIMethod.php:32-45 | src/applications/harbormaster/conduit/HarbormasterQueryBuildablesConduitAPIMethod.php:32-45
  • Duplicated block (14 lines × 2) src/applications/auth/controller/PhabricatorAuthSetPasswordController.php:105 — src/applications/auth/controller/PhabricatorAuthSetPasswordController.php:105-118 | src/applications/herald/controller/HeraldDisableController.php:43-56
  • Duplicated block (14 lines × 2) src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php:133 — src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php:133-146 | src/applications/oauthserver/editor/PhabricatorOAuthServerEditor.php:116-129
  • Duplicated block (14 lines × 2) src/applications/auth/management/PhabricatorAuthManagementUnlimitWorkflow.php:33 — src/applications/auth/management/PhabricatorAuthManagementUnlimitWorkflow.php:33-47 | src/applications/metamta/management/PhabricatorMailManagementReceiveTestWorkflow.php:75-88
  • Duplicated block (14 lines × 2) src/applications/auth/query/PhabricatorAuthInviteQuery.php:38 — src/applications/auth/query/PhabricatorAuthInviteQuery.php:38-53 | src/applications/diffusion/query/DiffusionSymbolQuery.php:151-164
  • Duplicated block (14 lines × 2) src/applications/auth/xaction/PhabricatorAuthFactorProviderNameTransaction.php:20 — src/applications/auth/xaction/PhabricatorAuthFactorProviderNameTransaction.php:20-33 | src/applications/calendar/xaction/PhabricatorCalendarImportNameTransaction.php:20-33
  • Duplicated block (14 lines × 2) src/applications/calendar/controller/PhabricatorCalendarEventViewController.php:104 — src/applications/calendar/controller/PhabricatorCalendarEventViewController.php:104-117 | src/applications/calendar/controller/PhabricatorCalendarExportViewController.php:56-69
  • Duplicated block (14 lines × 2) src/applications/calendar/controller/PhabricatorCalendarExportViewController.php:13 — src/applications/calendar/controller/PhabricatorCalendarExportViewController.php:13-26 | src/applications/calendar/controller/PhabricatorCalendarImportViewController.php:13-26
  • Duplicated block (14 lines × 2) src/applications/calendar/controller/PhabricatorCalendarExportViewController.php:53 — src/applications/calendar/controller/PhabricatorCalendarExportViewController.php:53-66 | src/applications/calendar/controller/PhabricatorCalendarImportViewController.php:61-74
  • Duplicated block (14 lines × 2) src/applications/calendar/xaction/PhabricatorCalendarEventInviteTransaction.php:127 — src/applications/calendar/xaction/PhabricatorCalendarEventInviteTransaction.php:127-140 | src/applications/maniphest/xaction/ManiphestTaskAttachTransaction.php:32-45
  • Duplicated block (14 lines × 2) src/applications/config/controller/services/PhabricatorConfigClusterDatabasesController.php:20 — src/applications/config/controller/services/PhabricatorConfigClusterDatabasesController.php:20-33 | src/applications/config/controller/settings/PhabricatorConfigSettingsHistoryController.php:30-43
  • Duplicated block (14 lines × 2) src/applications/conpherence/__tests__/ConpherenceRoomTestCase.php:22 — src/applications/conpherence/__tests__/ConpherenceRoomTestCase.php:22-37 | src/applications/conpherence/__tests__/ConpherenceRoomTestCase.php:41-54
  • Duplicated block (14 lines × 2) src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php:52 — src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php:52-65 | src/applications/drydock/controller/DrydockConsoleController.php:69-82
  • Duplicated block (14 lines × 2) src/applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php:32 — src/applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php:32-45 | src/applications/diffusion/conduit/DiffusionUpdateCoverageConduitAPIMethod.php:38-51
  • Duplicated block (14 lines × 2) src/applications/diffusion/controller/DiffusionChangeController.php:18 — src/applications/diffusion/controller/DiffusionChangeController.php:18-33 | src/applications/diffusion/controller/DiffusionDiffController.php:46-59
  • Duplicated block (14 lines × 2) src/applications/diffusion/herald/DiffusionCommitAuthorProjectsHeraldField.php:13 — src/applications/diffusion/herald/DiffusionCommitAuthorProjectsHeraldField.php:13-26 | src/applications/diffusion/herald/DiffusionPreCommitContentAuthorProjectsHeraldField.php:13-26
  • Duplicated block (14 lines × 2) src/applications/diffusion/herald/DiffusionCommitCommitterProjectsHeraldField.php:13 — src/applications/diffusion/herald/DiffusionCommitCommitterProjectsHeraldField.php:13-26 | src/applications/diffusion/herald/DiffusionPreCommitContentCommitterProjectsHeraldField.php:13-26
  • Duplicated block (14 lines × 2) src/applications/diffusion/herald/DiffusionCommitRevisionAcceptingReviewersHeraldField.php:17 — src/applications/diffusion/herald/DiffusionCommitRevisionAcceptingReviewersHeraldField.php:17-30 | src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptingReviewersHeraldField.php:17-30
  • Duplicated block (14 lines × 2) src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:103 — src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:103-116 | src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:123-136
  • Duplicated block (14 lines × 2) src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:768 — src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:768-781 | src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:801-814
  • Duplicated block (14 lines × 2) src/applications/drydock/controller/DrydockAuthorizationListController.php:65 — src/applications/drydock/controller/DrydockAuthorizationListController.php:65-79 | src/applications/drydock/controller/DrydockResourceController.php:36-49
  • Duplicated block (14 lines × 2) src/applications/drydock/controller/DrydockBlueprintDisableController.php:36 — src/applications/drydock/controller/DrydockBlueprintDisableController.php:36-49 | src/applications/oauthserver/controller/client/PhabricatorOAuthClientDisableController.php:33-46
  • + 9 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×31
  • Duplicated block (13 lines × 2) src/applications/almanac/controller/AlmanacNamespaceViewController.php:14 — src/applications/almanac/controller/AlmanacNamespaceViewController.php:14-26 | src/applications/almanac/controller/AlmanacNetworkViewController.php:14-26
  • Duplicated block (13 lines × 2) src/applications/almanac/query/AlmanacNamespaceSearchEngine.php:76 — src/applications/almanac/query/AlmanacNamespaceSearchEngine.php:76-88 | src/applications/almanac/query/AlmanacNetworkSearchEngine.php:76-88
  • Duplicated block (13 lines × 2) src/applications/aphlict/management/PhabricatorAphlictManagementNotifyWorkflow.php:57 — src/applications/aphlict/management/PhabricatorAphlictManagementNotifyWorkflow.php:57-69 | src/applications/notification/controller/PhabricatorNotificationTestController.php:18-30
  • Duplicated block (13 lines × 2) src/applications/auth/controller/PhabricatorAuthSetPasswordController.php:79 — src/applications/auth/controller/PhabricatorAuthSetPasswordController.php:79-91 | src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php:93-105
  • Duplicated block (13 lines × 2) src/applications/auth/provider/PhabricatorLDAPAuthProvider.php:113 — src/applications/auth/provider/PhabricatorLDAPAuthProvider.php:113-125 | src/applications/auth/provider/PhabricatorPasswordAuthProvider.php:229-241
  • Duplicated block (13 lines × 2) src/applications/badges/controller/PhabricatorBadgesRecipientsController.php:11 — src/applications/badges/controller/PhabricatorBadgesRecipientsController.php:11-23 | src/applications/badges/controller/PhabricatorBadgesViewController.php:11-24
  • Duplicated block (13 lines × 2) src/applications/calendar/controller/PhabricatorCalendarImportViewController.php:237 — src/applications/calendar/controller/PhabricatorCalendarImportViewController.php:237-249 | src/applications/calendar/controller/PhabricatorCalendarImportViewController.php:277-289
  • Duplicated block (13 lines × 2) src/applications/calendar/parser/ics/__tests__/PhutilICSWriterTestCase.php:25 — src/applications/calendar/parser/ics/__tests__/PhutilICSWriterTestCase.php:25-37 | src/applications/calendar/parser/ics/__tests__/PhutilICSWriterTestCase.php:77-89
  • Duplicated block (13 lines × 2) src/applications/countdown/controller/PhabricatorCountdownViewController.php:118 — src/applications/countdown/controller/PhabricatorCountdownViewController.php:118-130 | src/applications/paste/controller/PhabricatorPasteViewController.php:161-173
  • Duplicated block (13 lines × 2) src/applications/dashboard/controller/PhabricatorDashboardQueryPanelInstallController.php:115 — src/applications/dashboard/controller/PhabricatorDashboardQueryPanelInstallController.php:115-127 | src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php:169-181
  • Duplicated block (13 lines × 2) src/applications/dashboard/controller/dashboard/PhabricatorDashboardInstallController.php:18 — src/applications/dashboard/controller/dashboard/PhabricatorDashboardInstallController.php:18-30 | src/applications/dashboard/controller/dashboard/PhabricatorDashboardViewController.php:11-23
  • Duplicated block (13 lines × 2) src/applications/dashboard/paneltype/PhabricatorDashboardChartPanelType.php:58 — src/applications/dashboard/paneltype/PhabricatorDashboardChartPanelType.php:58-70 | src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php:174-186
  • Duplicated block (13 lines × 2) src/applications/differential/controller/DifferentialRevisionViewController.php:1322 — src/applications/differential/controller/DifferentialRevisionViewController.php:1322-1336 | src/applications/differential/controller/DifferentialRevisionViewController.php:1431-1443
  • Duplicated block (13 lines × 2) src/applications/differential/customfield/DifferentialLintField.php:87 — src/applications/differential/customfield/DifferentialLintField.php:87-99 | src/applications/differential/customfield/DifferentialUnitField.php:76-88
  • Duplicated block (13 lines × 2) src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php:107 — src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php:107-119 | src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php:251-263
  • Duplicated block (13 lines × 2) src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php:175 — src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php:175-187 | src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php:214-226
  • Duplicated block (13 lines × 2) src/applications/diffusion/editor/DiffusionURIEditor.php:298 — src/applications/diffusion/editor/DiffusionURIEditor.php:298-310 | src/applications/diffusion/editor/DiffusionURIEditor.php:411-423
  • Duplicated block (13 lines × 2) src/applications/diviner/atom/DivinerAtom.php:393 — src/applications/diviner/atom/DivinerAtom.php:393-405 | src/applications/diviner/atom/DivinerAtom.php:424-436
  • Duplicated block (13 lines × 2) src/applications/drydock/controller/DrydockRepositoryOperationStatusController.php:11 — src/applications/drydock/controller/DrydockRepositoryOperationStatusController.php:11-24 | src/applications/drydock/controller/DrydockRepositoryOperationViewController.php:11-23
  • Duplicated block (13 lines × 2) src/applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php:44 — src/applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php:44-56 | src/applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php:60-72
  • Duplicated block (13 lines × 2) src/applications/files/controller/PhabricatorFileUICurtainAttachController.php:9 — src/applications/files/controller/PhabricatorFileUICurtainAttachController.php:9-21 | src/applications/files/controller/PhabricatorFileUICurtainListController.php:11-24
  • Duplicated block (13 lines × 2) src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php:11 — src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php:11-23 | src/applications/harbormaster/controller/HarbormasterBuildLogViewController.php:11-23
  • Duplicated block (13 lines × 2) src/applications/harbormaster/query/HarbormasterBuildArtifactQuery.php:53 — src/applications/harbormaster/query/HarbormasterBuildArtifactQuery.php:53-65 | src/applications/harbormaster/query/HarbormasterBuildLogQuery.php:40-52
  • Duplicated block (13 lines × 2) src/applications/harbormaster/step/HarbormasterBuildkiteBuildStepImplementation.php:153 — src/applications/harbormaster/step/HarbormasterBuildkiteBuildStepImplementation.php:153-165 | src/applications/harbormaster/step/HarbormasterCircleCIBuildStepImplementation.php:187-199
  • Duplicated block (13 lines × 2) src/applications/herald/controller/HeraldWebhookViewController.php:130 — src/applications/herald/controller/HeraldWebhookViewController.php:130-142 | src/applications/paste/controller/PhabricatorPasteViewController.php:104-116
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×31
  • Duplicated block (12 lines × 2) src/aphront/configuration/AphrontApplicationConfiguration.php:299 — src/aphront/configuration/AphrontApplicationConfiguration.php:299-310 | src/aphront/configuration/AphrontApplicationConfiguration.php:339-355
  • Duplicated block (12 lines × 2) src/applications/almanac/controller/AlmanacPropertyDeleteController.php:49 — src/applications/almanac/controller/AlmanacPropertyDeleteController.php:49-60 | src/applications/calendar/controller/PhabricatorCalendarEventJoinController.php:53-64
  • Duplicated block (12 lines × 2) src/applications/almanac/management/AlmanacManagementUntrustKeyWorkflow.php:29 — src/applications/almanac/management/AlmanacManagementUntrustKeyWorkflow.php:29-40 | src/applications/auth/management/PhabricatorAuthManagementUntrustOAuthClientWorkflow.php:34-47
  • Duplicated block (12 lines × 2) src/applications/auth/__tests__/PhabricatorAuthSSHKeyTestCase.php:13 — src/applications/auth/__tests__/PhabricatorAuthSSHKeyTestCase.php:13-24 | src/applications/auth/__tests__/PhabricatorAuthSSHKeyTestCase.php:38-49
  • Duplicated block (12 lines × 2) src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php:81 — src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php:81-92 | src/applications/auth/controller/PhabricatorAuthSSHKeyGenerateController.php:54-65
  • Duplicated block (12 lines × 2) src/applications/auth/controller/PhabricatorAuthSSHKeyViewController.php:90 — src/applications/auth/controller/PhabricatorAuthSSHKeyViewController.php:90-101 | src/applications/diffusion/controller/DiffusionRepositoryURIViewController.php:142-153
  • Duplicated block (12 lines × 2) src/applications/auth/controller/config/PhabricatorAuthProviderController.php:11 — src/applications/auth/controller/config/PhabricatorAuthProviderController.php:11-22 | src/applications/auth/controller/config/PhabricatorAuthProviderController.php:32-43
  • Duplicated block (12 lines × 2) src/applications/auth/factor/PhabricatorAuthFactor.php:323 — src/applications/auth/factor/PhabricatorAuthFactor.php:323-334 | src/applications/auth/factor/PhabricatorAuthFactor.php:355-366
  • Duplicated block (12 lines × 2) src/applications/auth/provider/PhabricatorJIRAAuthProvider.php:126 — src/applications/auth/provider/PhabricatorJIRAAuthProvider.php:126-137 | src/applications/auth/provider/PhabricatorPhabricatorAuthProvider.php:110-121
  • Duplicated block (12 lines × 2) src/applications/badges/xaction/PhabricatorBadgesBadgeAwardTransaction.php:65 — src/applications/badges/xaction/PhabricatorBadgesBadgeAwardTransaction.php:65-77 | src/applications/conpherence/xaction/ConpherenceThreadParticipantsTransaction.php:99-110
  • Duplicated block (12 lines × 2) src/applications/config/controller/services/PhabricatorConfigServicesController.php:10 — src/applications/config/controller/services/PhabricatorConfigServicesController.php:10-21 | src/applications/config/controller/services/PhabricatorConfigServicesController.php:35-46
  • Duplicated block (12 lines × 2) src/applications/config/schema/PhabricatorConfigStorageSchema.php:104 — src/applications/config/schema/PhabricatorConfigStorageSchema.php:104-115 | src/applications/config/schema/PhabricatorConfigStorageSchema.php:145-156
  • Duplicated block (12 lines × 2) src/applications/conpherence/controller/ConpherenceRoomPreferencesController.php:65 — src/applications/conpherence/controller/ConpherenceRoomPreferencesController.php:65-76 | src/applications/conpherence/controller/ConpherenceUpdateController.php:413-424
  • Duplicated block (12 lines × 2) src/applications/daemon/controller/PhabricatorDaemonConsoleController.php:220 — src/applications/daemon/controller/PhabricatorDaemonConsoleController.php:220-231 | src/applications/daemon/controller/PhabricatorDaemonLogListController.php:19-30
  • Duplicated block (12 lines × 2) src/applications/diffusion/conduit/DiffusionLastModifiedQueryConduitAPIMethod.php:25 — src/applications/diffusion/conduit/DiffusionLastModifiedQueryConduitAPIMethod.php:25-36 | src/applications/diffusion/conduit/DiffusionLastModifiedQueryConduitAPIMethod.php:78-90
  • Duplicated block (12 lines × 2) src/applications/diffusion/controller/DiffusionController.php:519 — src/applications/diffusion/controller/DiffusionController.php:519-530 | src/applications/diffusion/controller/DiffusionController.php:532-543
  • Duplicated block (12 lines × 2) src/applications/diffusion/controller/DiffusionRepositoryURIViewController.php:254 — src/applications/diffusion/controller/DiffusionRepositoryURIViewController.php:254-265 | src/applications/diffusion/controller/DiffusionRepositoryURIViewController.php:274-285
  • Duplicated block (12 lines × 2) src/applications/diffusion/xaction/DiffusionCommitAuditorsTransaction.php:108 — src/applications/diffusion/xaction/DiffusionCommitAuditorsTransaction.php:108-119 | src/applications/diffusion/xaction/DiffusionCommitAuditorsTransaction.php:142-153
  • Duplicated block (12 lines × 2) src/applications/drydock/query/DrydockLeaseQuery.php:94 — src/applications/drydock/query/DrydockLeaseQuery.php:94-105 | src/applications/drydock/query/DrydockResourceQuery.php:79-90
  • Duplicated block (12 lines × 2) src/applications/fact/controller/PhabricatorFactObjectController.php:126 — src/applications/fact/controller/PhabricatorFactObjectController.php:126-137 | src/applications/owners/controller/PhabricatorOwnersPathsController.php:96-107
  • Duplicated block (12 lines × 2) src/applications/files/document/render/PhabricatorDocumentRenderingEngine.php:62 — src/applications/files/document/render/PhabricatorDocumentRenderingEngine.php:62-73 | src/applications/files/document/render/PhabricatorDocumentRenderingEngine.php:210-221
  • Duplicated block (12 lines × 2) src/applications/harbormaster/controller/HarbormasterPlanBehaviorController.php:42 — src/applications/harbormaster/controller/HarbormasterPlanBehaviorController.php:42-53 | src/applications/harbormaster/controller/HarbormasterPlanDisableController.php:35-46
  • Duplicated block (12 lines × 2) src/applications/harbormaster/query/HarbormasterBuildMessageQuery.php:31 — src/applications/harbormaster/query/HarbormasterBuildMessageQuery.php:31-42 | src/applications/harbormaster/query/HarbormasterBuildableQuery.php:95-106
  • Duplicated block (12 lines × 2) src/applications/harbormaster/query/HarbormasterBuildQuery.php:67 — src/applications/harbormaster/query/HarbormasterBuildQuery.php:67-78 | src/applications/harbormaster/query/HarbormasterBuildableQuery.php:74-85
  • Duplicated block (12 lines × 2) src/applications/herald/controller/HeraldTestConsoleController.php:56 — src/applications/herald/controller/HeraldTestConsoleController.php:56-67 | src/applications/herald/management/HeraldTestManagementWorkflow.php:113-124
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×30
  • Duplicated block (16 lines × 2) src/applications/almanac/controller/AlmanacConsoleController.php:33 — src/applications/almanac/controller/AlmanacConsoleController.php:33-48 | src/applications/config/controller/PhabricatorConfigConsoleController.php:39-54
  • Duplicated block (16 lines × 2) src/applications/almanac/controller/AlmanacServiceViewController.php:52 — src/applications/almanac/controller/AlmanacServiceViewController.php:52-69 | src/applications/auth/controller/PhabricatorAuthSSHKeyViewController.php:54-69
  • Duplicated block (16 lines × 2) src/applications/almanac/xaction/AlmanacBindingServiceTransaction.php:20 — src/applications/almanac/xaction/AlmanacBindingServiceTransaction.php:20-35 | src/applications/almanac/xaction/AlmanacInterfaceDeviceTransaction.php:28-43
  • Duplicated block (16 lines × 2) src/applications/auth/controller/PhabricatorAuthRevokeTokenController.php:30 — src/applications/auth/controller/PhabricatorAuthRevokeTokenController.php:30-45 | src/applications/auth/controller/PhabricatorAuthTerminateSessionController.php:34-49
  • Duplicated block (16 lines × 2) src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php:111 — src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php:111-127 | src/applications/oauthserver/editor/PhabricatorOAuthServerEditor.php:96-111
  • Duplicated block (16 lines × 2) src/applications/auth/management/PhabricatorAuthManagementCachePKCS8Workflow.php:34 — src/applications/auth/management/PhabricatorAuthManagementCachePKCS8Workflow.php:34-49 | src/applications/auth/management/PhabricatorAuthManagementCachePKCS8Workflow.php:51-66
  • Duplicated block (16 lines × 2) src/applications/auth/management/PhabricatorAuthManagementTrustOAuthClientWorkflow.php:45 — src/applications/auth/management/PhabricatorAuthManagementTrustOAuthClientWorkflow.php:45-60 | src/applications/auth/management/PhabricatorAuthManagementUntrustOAuthClientWorkflow.php:45-60
  • Duplicated block (16 lines × 2) src/applications/calendar/controller/PhabricatorCalendarEventAvailabilityController.php:8 — src/applications/calendar/controller/PhabricatorCalendarEventAvailabilityController.php:8-23 | src/applications/calendar/controller/PhabricatorCalendarEventJoinController.php:8-23
  • Duplicated block (16 lines × 2) src/applications/calendar/controller/PhabricatorCalendarExportDisableController.php:10 — src/applications/calendar/controller/PhabricatorCalendarExportDisableController.php:10-25 | src/applications/calendar/controller/PhabricatorCalendarImportDisableController.php:10-25
  • Duplicated block (16 lines × 2) src/applications/calendar/controller/PhabricatorCalendarImportDisableController.php:48 — src/applications/calendar/controller/PhabricatorCalendarImportDisableController.php:48-64 | src/applications/fund/controller/FundInitiativeCloseController.php:47-62
  • Duplicated block (16 lines × 2) src/applications/calendar/controller/PhabricatorCalendarImportReloadController.php:9 — src/applications/calendar/controller/PhabricatorCalendarImportReloadController.php:9-24 | src/applications/harbormaster/controller/HarbormasterPlanDisableController.php:9-24
  • Duplicated block (16 lines × 2) src/applications/calendar/xaction/PhabricatorCalendarEventFrequencyTransaction.php:61 — src/applications/calendar/xaction/PhabricatorCalendarEventFrequencyTransaction.php:61-76 | src/applications/calendar/xaction/PhabricatorCalendarImportFrequencyTransaction.php:27-42
  • Duplicated block (16 lines × 2) src/applications/config/management/PhabricatorConfigManagementDeleteWorkflow.php:27 — src/applications/config/management/PhabricatorConfigManagementDeleteWorkflow.php:27-43 | src/applications/config/management/PhabricatorConfigManagementGetWorkflow.php:21-36
  • Duplicated block (16 lines × 2) src/applications/config/schema/PhabricatorConfigSchemaQuery.php:277 — src/applications/config/schema/PhabricatorConfigSchemaQuery.php:277-293 | src/applications/config/schema/PhabricatorConfigSchemaQuery.php:297-312
  • Duplicated block (16 lines × 2) src/applications/dashboard/controller/PhabricatorDashboardQueryPanelInstallController.php:128 — src/applications/dashboard/controller/PhabricatorDashboardQueryPanelInstallController.php:128-143 | src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php:205-220
  • Duplicated block (16 lines × 2) src/applications/dashboard/install/PhabricatorDashboardPortalInstallWorkflow.php:39 — src/applications/dashboard/install/PhabricatorDashboardPortalInstallWorkflow.php:39-54 | src/applications/dashboard/install/PhabricatorDashboardProjectInstallWorkflow.php:40-55
  • Duplicated block (16 lines × 2) src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:523 — src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:523-538 | src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:556-571
  • Duplicated block (16 lines × 2) src/applications/differential/xaction/DifferentialRevisionBuildableTransaction.php:44 — src/applications/differential/xaction/DifferentialRevisionBuildableTransaction.php:44-59 | src/applications/diffusion/xaction/DiffusionCommitBuildableTransaction.php:40-55
  • Duplicated block (16 lines × 2) src/applications/diffusion/controller/DiffusionRepositoryURICredentialController.php:16 — src/applications/diffusion/controller/DiffusionRepositoryURICredentialController.php:16-31 | src/applications/diffusion/controller/DiffusionRepositoryURIDisableController.php:16-31
  • Duplicated block (16 lines × 2) src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php:18 — src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php:18-33 | src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php:18-33
  • Duplicated block (16 lines × 2) src/applications/diviner/query/DivinerAtomQuery.php:282 — src/applications/diviner/query/DivinerAtomQuery.php:282-297 | src/applications/diviner/query/DivinerBookQuery.php:81-96
  • Duplicated block (16 lines × 2) src/applications/diviner/workflow/DivinerAtomizeWorkflow.php:45 — src/applications/diviner/workflow/DivinerAtomizeWorkflow.php:45-60 | src/applications/diviner/workflow/DivinerGenerateWorkflow.php:180-195
  • Duplicated block (16 lines × 2) src/applications/doorkeeper/bridge/DoorkeeperBridgeGitHubIssue.php:41 — src/applications/doorkeeper/bridge/DoorkeeperBridgeGitHubIssue.php:41-56 | src/applications/doorkeeper/bridge/DoorkeeperBridgeGitHubUser.php:45-60
  • Duplicated block (16 lines × 2) src/applications/drydock/controller/DrydockLeaseReleaseController.php:10 — src/applications/drydock/controller/DrydockLeaseReleaseController.php:10-25 | src/applications/drydock/controller/DrydockResourceReleaseController.php:10-25
  • Duplicated block (16 lines × 2) src/applications/herald/controller/HeraldTestConsoleController.php:131 — src/applications/herald/controller/HeraldTestConsoleController.php:131-146 | src/applications/herald/management/HeraldTestManagementWorkflow.php:48-63
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×29
  • Duplicated block (11 lines × 2) src/applications/almanac/controller/AlmanacDeviceViewController.php:125 — src/applications/almanac/controller/AlmanacDeviceViewController.php:125-135 | src/applications/almanac/controller/AlmanacServiceViewController.php:132-142
  • Duplicated block (11 lines × 2) src/applications/almanac/query/AlmanacBindingQuery.php:52 — src/applications/almanac/query/AlmanacBindingQuery.php:52-62 | src/applications/almanac/query/AlmanacInterfaceQuery.php:45-55
  • Duplicated block (11 lines × 2) src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php:237 — src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php:237-247 | src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php:74-86
  • Duplicated block (11 lines × 2) src/applications/auth/controller/contact/PhabricatorAuthContactNumberViewController.php:121 — src/applications/auth/controller/contact/PhabricatorAuthContactNumberViewController.php:121-131 | src/applications/passphrase/controller/PassphraseCredentialViewController.php:135-145
  • Duplicated block (11 lines × 2) src/applications/auth/management/PhabricatorAuthManagementRecoverWorkflow.php:29 — src/applications/auth/management/PhabricatorAuthManagementRecoverWorkflow.php:29-40 | src/applications/auth/management/PhabricatorAuthManagementVerifyWorkflow.php:25-35
  • Duplicated block (11 lines × 2) src/applications/badges/controller/PhabricatorBadgesAwardController.php:38 — src/applications/badges/controller/PhabricatorBadgesAwardController.php:38-48 | src/applications/badges/controller/PhabricatorBadgesEditRecipientsController.php:36-46
  • Duplicated block (11 lines × 2) src/applications/badges/xaction/PhabricatorBadgesBadgeAwardTransaction.php:37 — src/applications/badges/xaction/PhabricatorBadgesBadgeAwardTransaction.php:37-47 | src/applications/badges/xaction/PhabricatorBadgesBadgeRevokeTransaction.php:40-50
  • Duplicated block (11 lines × 2) src/applications/calendar/controller/PhabricatorCalendarEventViewController.php:221 — src/applications/calendar/controller/PhabricatorCalendarEventViewController.php:221-231 | src/applications/dashboard/controller/dashboard/PhabricatorDashboardViewController.php:94-104
  • Duplicated block (11 lines × 2) src/applications/conduit/controller/PhabricatorConduitAPIController.php:564 — src/applications/conduit/controller/PhabricatorConduitAPIController.php:564-574 | src/applications/files/controller/PhabricatorFileTransformListController.php:116-126
  • Duplicated block (11 lines × 2) src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php:592 — src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php:592-602 | src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php:607-617
  • Duplicated block (11 lines × 2) src/applications/conpherence/conduit/ConpherenceQueryTransactionConduitAPIMethod.php:44 — src/applications/conpherence/conduit/ConpherenceQueryTransactionConduitAPIMethod.php:44-57 | src/applications/conpherence/conduit/ConpherenceUpdateThreadConduitAPIMethod.php:55-65
  • Duplicated block (11 lines × 2) src/applications/conpherence/xaction/ConpherenceThreadTitleTransaction.php:34 — src/applications/conpherence/xaction/ConpherenceThreadTitleTransaction.php:34-44 | src/applications/paste/xaction/PhabricatorPasteTitleTransaction.php:40-50
  • Duplicated block (11 lines × 2) src/applications/differential/controller/DifferentialChangesetViewController.php:123 — src/applications/differential/controller/DifferentialChangesetViewController.php:123-133 | src/applications/differential/controller/DifferentialController.php:173-184
  • Duplicated block (11 lines × 2) src/applications/differential/editor/DifferentialRevisionEditEngine.php:262 — src/applications/differential/editor/DifferentialRevisionEditEngine.php:262-272 | src/applications/differential/editor/DifferentialRevisionEditEngine.php:275-285
  • Duplicated block (11 lines × 2) src/applications/differential/typeahead/DifferentialExactUserFunctionDatasource.php:42 — src/applications/differential/typeahead/DifferentialExactUserFunctionDatasource.php:42-52 | src/applications/owners/typeahead/PhabricatorOwnersPackageOwnerDatasource.php:43-53
  • Duplicated block (11 lines × 2) src/applications/diffusion/controller/DiffusionRepositoryEditActivateController.php:29 — src/applications/diffusion/controller/DiffusionRepositoryEditActivateController.php:29-39 | src/applications/diffusion/controller/DiffusionRepositoryEditPublishingController.php:29-39
  • Duplicated block (11 lines × 2) src/applications/diffusion/controller/DiffusionRepositoryListController.php:18 — src/applications/diffusion/controller/DiffusionRepositoryListController.php:18-28 | src/applications/feed/controller/PhabricatorFeedListController.php:11-21
  • Duplicated block (11 lines × 2) src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:498 — src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:498-515 | src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:525-535
  • Duplicated block (11 lines × 2) src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:553 — src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:553-563 | src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:584-594
  • Duplicated block (11 lines × 2) src/applications/doorkeeper/bridge/DoorkeeperBridgeGitHubIssue.php:21 — src/applications/doorkeeper/bridge/DoorkeeperBridgeGitHubIssue.php:21-31 | src/applications/doorkeeper/bridge/DoorkeeperBridgeGitHubUser.php:21-31
  • Duplicated block (11 lines × 2) src/applications/drydock/controller/DrydockAuthorizationViewController.php:31 — src/applications/drydock/controller/DrydockAuthorizationViewController.php:31-42 | src/applications/drydock/controller/DrydockRepositoryOperationViewController.php:33-43
  • Duplicated block (11 lines × 2) src/applications/drydock/management/DrydockManagementLeaseWorkflow.php:218 — src/applications/drydock/management/DrydockManagementLeaseWorkflow.php:218-228 | src/applications/drydock/view/DrydockLogListView.php:91-101
  • Duplicated block (11 lines × 2) src/applications/files/controller/PhabricatorFileViewController.php:185 — src/applications/files/controller/PhabricatorFileViewController.php:185-195 | src/applications/maniphest/controller/ManiphestTaskDetailController.php:358-368
  • Duplicated block (11 lines × 2) src/applications/fund/phortune/FundBackerProduct.php:87 — src/applications/fund/phortune/FundBackerProduct.php:87-101 | src/applications/fund/phortune/FundBackerProduct.php:125-135
  • Duplicated block (11 lines × 2) src/applications/harbormaster/query/HarbormasterBuildQuery.php:88 — src/applications/harbormaster/query/HarbormasterBuildQuery.php:88-98 | src/applications/harbormaster/query/HarbormasterBuildStepQuery.php:60-70
  • + 4 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×25
  • Duplicated block (15 lines × 2) src/applications/almanac/controller/AlmanacServiceEditController.php:91 — src/applications/almanac/controller/AlmanacServiceEditController.php:91-105 | src/applications/calendar/controller/PhabricatorCalendarImportEditController.php:71-86
  • Duplicated block (15 lines × 2) src/applications/auth/provider/PhabricatorJIRAAuthProvider.php:214 — src/applications/auth/provider/PhabricatorJIRAAuthProvider.php:214-228 | src/applications/auth/provider/PhabricatorPhabricatorAuthProvider.php:172-186
  • Duplicated block (15 lines × 2) src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoCredentialTransaction.php:35 — src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoCredentialTransaction.php:35-49 | src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoHostnameTransaction.php:34-48
  • Duplicated block (15 lines × 2) src/applications/calendar/controller/PhabricatorCalendarImportDeleteController.php:45 — src/applications/calendar/controller/PhabricatorCalendarImportDeleteController.php:45-59 | src/applications/calendar/controller/PhabricatorCalendarImportReloadController.php:33-47
  • Duplicated block (15 lines × 2) src/applications/calendar/typeahead/PhabricatorCalendarInviteeDatasource.php:31 — src/applications/calendar/typeahead/PhabricatorCalendarInviteeDatasource.php:31-45 | src/applications/differential/typeahead/DifferentialResponsibleDatasource.php:32-46
  • Duplicated block (15 lines × 2) src/applications/celerity/CeleritySpriteGenerator.php:7 — src/applications/celerity/CeleritySpriteGenerator.php:7-21 | src/applications/celerity/CeleritySpriteGenerator.php:39-53
  • Duplicated block (15 lines × 2) src/applications/config/check/PhabricatorMySQLSetupCheck.php:87 — src/applications/config/check/PhabricatorMySQLSetupCheck.php:87-101 | src/applications/config/check/PhabricatorMySQLSetupCheck.php:124-138
  • Duplicated block (15 lines × 2) src/applications/conpherence/controller/ConpherenceRoomPictureController.php:213 — src/applications/conpherence/controller/ConpherenceRoomPictureController.php:213-228 | src/applications/harbormaster/controller/HarbormasterStepAddController.php:90-104
  • Duplicated block (15 lines × 2) src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php:27 — src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php:27-41 | src/applications/drydock/controller/DrydockConsoleController.php:30-44
  • Duplicated block (15 lines × 2) src/applications/dashboard/controller/dashboard/PhabricatorDashboardViewController.php:69 — src/applications/dashboard/controller/dashboard/PhabricatorDashboardViewController.php:69-83 | src/applications/dashboard/controller/panel/PhabricatorDashboardPanelViewController.php:92-106
  • Duplicated block (15 lines × 2) src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php:157 — src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php:157-171 | src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php:118-132
  • Duplicated block (15 lines × 2) src/applications/differential/customfield/DifferentialCustomField.php:49 — src/applications/differential/customfield/DifferentialCustomField.php:49-63 | src/applications/differential/field/DifferentialCommitMessageField.php:135-149
  • Duplicated block (15 lines × 2) src/applications/differential/query/DifferentialRevisionSearchEngine.php:359 — src/applications/differential/query/DifferentialRevisionSearchEngine.php:359-373 | src/applications/maniphest/query/ManiphestTaskSearchEngine.php:527-541
  • Duplicated block (15 lines × 2) src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:39 — src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:39-53 | src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:62-76
  • Duplicated block (15 lines × 2) src/applications/differential/xaction/DifferentialRevisionBuildableTransaction.php:64 — src/applications/differential/xaction/DifferentialRevisionBuildableTransaction.php:64-78 | src/applications/diffusion/xaction/DiffusionCommitBuildableTransaction.php:60-74
  • Duplicated block (15 lines × 2) src/applications/diffusion/controller/DiffusionDocumentController.php:26 — src/applications/diffusion/controller/DiffusionDocumentController.php:26-40 | src/applications/files/controller/PhabricatorFileDocumentController.php:17-31
  • Duplicated block (15 lines × 2) src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php:230 — src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php:230-245 | src/applications/meta/controller/PhabricatorApplicationEditController.php:149-163
  • Duplicated block (15 lines × 2) src/applications/diffusion/herald/DiffusionCommitWrongBuildsHeraldField.php:26 — src/applications/diffusion/herald/DiffusionCommitWrongBuildsHeraldField.php:26-40 | src/applications/diffusion/herald/DiffusionPreCommitContentWrongBuildsHeraldField.php:26-40
  • Duplicated block (15 lines × 2) src/applications/drydock/query/DrydockBlueprintSearchEngine.php:124 — src/applications/drydock/query/DrydockBlueprintSearchEngine.php:124-138 | src/applications/fund/query/FundInitiativeSearchEngine.php:137-151
  • Duplicated block (15 lines × 2) src/applications/drydock/worker/DrydockRepositoryOperationUpdateWorker.php:115 — src/applications/drydock/worker/DrydockRepositoryOperationUpdateWorker.php:115-129 | src/applications/harbormaster/step/HarbormasterLeaseWorkingCopyBuildStepImplementation.php:52-69
  • Duplicated block (15 lines × 2) src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php:99 — src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php:99-113 | src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php:115-129
  • Duplicated block (15 lines × 2) src/applications/files/diff/PhabricatorDocumentEngineBlocks.php:102 — src/applications/files/diff/PhabricatorDocumentEngineBlocks.php:102-116 | src/applications/files/diff/PhabricatorDocumentEngineBlocks.php:117-132
  • Duplicated block (15 lines × 2) src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php:512 — src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php:512-528 | src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php:563-577
  • Duplicated block (15 lines × 2) src/applications/harbormaster/controller/HarbormasterPlanViewController.php:520 — src/applications/harbormaster/controller/HarbormasterPlanViewController.php:520-534 | src/applications/owners/controller/PhabricatorOwnersDetailController.php:386-400
  • Duplicated block (15 lines × 2) src/applications/metamta/adapter/PhabricatorMailMailgunAdapter.php:43 — src/applications/metamta/adapter/PhabricatorMailMailgunAdapter.php:43-57 | src/applications/metamta/adapter/PhabricatorMailPostmarkAdapter.php:48-62
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×20
  • Duplicated block (17 lines × 2) src/applications/almanac/controller/AlmanacBindingViewController.php:63 — src/applications/almanac/controller/AlmanacBindingViewController.php:63-79 | src/applications/meta/controller/PhabricatorApplicationDetailViewController.php:63-79
  • Duplicated block (17 lines × 2) src/applications/almanac/query/AlmanacPropertyQuery.php:71 — src/applications/almanac/query/AlmanacPropertyQuery.php:71-87 | src/applications/conduit/query/PhabricatorConduitTokenQuery.php:42-58
  • Duplicated block (17 lines × 2) src/applications/almanac/xaction/AlmanacServiceTypeTransaction.php:37 — src/applications/almanac/xaction/AlmanacServiceTypeTransaction.php:37-53 | src/applications/drydock/xaction/DrydockBlueprintTypeTransaction.php:38-54
  • Duplicated block (17 lines × 2) src/applications/audit/view/PhabricatorAuditTransactionView.php:57 — src/applications/audit/view/PhabricatorAuditTransactionView.php:57-73 | src/applications/differential/view/DifferentialTransactionView.php:89-107
  • Duplicated block (17 lines × 2) src/applications/auth/controller/config/PhabricatorAuthDisableController.php:11 — src/applications/auth/controller/config/PhabricatorAuthDisableController.php:11-27 | src/applications/auth/controller/config/PhabricatorAuthProviderViewController.php:10-26
  • Duplicated block (17 lines × 2) src/applications/auth/controller/contact/PhabricatorAuthContactNumberDisableController.php:49 — src/applications/auth/controller/contact/PhabricatorAuthContactNumberDisableController.php:49-65 | src/applications/auth/controller/contact/PhabricatorAuthContactNumberPrimaryController.php:60-76
  • Duplicated block (17 lines × 2) src/applications/auth/controller/contact/PhabricatorAuthContactNumberViewController.php:30 — src/applications/auth/controller/contact/PhabricatorAuthContactNumberViewController.php:30-46 | src/applications/auth/controller/mfa/PhabricatorAuthFactorProviderViewController.php:34-50
  • Duplicated block (17 lines × 2) src/applications/auth/provider/PhabricatorAsanaAuthProvider.php:54 — src/applications/auth/provider/PhabricatorAsanaAuthProvider.php:54-70 | src/applications/auth/provider/PhabricatorJIRAAuthProvider.php:337-353
  • Duplicated block (17 lines × 2) src/applications/badges/controller/PhabricatorBadgesArchiveController.php:7 — src/applications/badges/controller/PhabricatorBadgesArchiveController.php:7-23 | src/applications/badges/controller/PhabricatorBadgesRemoveRecipientsController.php:7-23
  • Duplicated block (17 lines × 2) src/applications/calendar/parser/data/__tests__/PhutilCalendarDateTimeTestCase.php:9 — src/applications/calendar/parser/data/__tests__/PhutilCalendarDateTimeTestCase.php:9-25 | src/applications/calendar/parser/data/__tests__/PhutilCalendarDateTimeTestCase.php:29-45
  • Duplicated block (17 lines × 2) src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php:33 — src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php:33-51 | src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php:86-102
  • Duplicated block (17 lines × 2) src/applications/calendar/xaction/PhabricatorCalendarImportICSFileTransaction.php:37 — src/applications/calendar/xaction/PhabricatorCalendarImportICSFileTransaction.php:37-53 | src/applications/calendar/xaction/PhabricatorCalendarImportICSURITransaction.php:29-45
  • Duplicated block (17 lines × 2) src/applications/conpherence/controller/ConpherenceRoomPictureController.php:91 — src/applications/conpherence/controller/ConpherenceRoomPictureController.php:91-107 | src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php:78-95
  • Duplicated block (17 lines × 2) src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php:116 — src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php:116-132 | src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php:201-217
  • Duplicated block (17 lines × 2) src/applications/dashboard/controller/dashboard/PhabricatorDashboardArchiveController.php:10 — src/applications/dashboard/controller/dashboard/PhabricatorDashboardArchiveController.php:10-26 | src/applications/paste/controller/PhabricatorPasteArchiveController.php:10-26
  • Duplicated block (17 lines × 2) src/applications/diffusion/controller/DiffusionBranchTableController.php:87 — src/applications/diffusion/controller/DiffusionBranchTableController.php:87-103 | src/applications/diffusion/controller/DiffusionBrowseController.php:79-97
  • Duplicated block (17 lines × 2) src/applications/diffusion/controller/DiffusionHistoryController.php:10 — src/applications/diffusion/controller/DiffusionHistoryController.php:10-28 | src/applications/diffusion/controller/DiffusionTagListController.php:10-26
  • Duplicated block (17 lines × 2) src/applications/doorkeeper/bridge/DoorkeeperBridgeAsana.php:82 — src/applications/doorkeeper/bridge/DoorkeeperBridgeAsana.php:82-98 | src/applications/doorkeeper/bridge/DoorkeeperBridgeJIRA.php:73-89
  • Duplicated block (17 lines × 2) src/applications/drydock/query/DrydockBlueprintSearchEngine.php:77 — src/applications/drydock/query/DrydockBlueprintSearchEngine.php:77-94 | src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php:83-99
  • Duplicated block (17 lines × 2) src/applications/files/controller/PhabricatorFileTransformListController.php:128 — src/applications/files/controller/PhabricatorFileTransformListController.php:128-144 | src/applications/macro/controller/PhabricatorMacroAudioController.php:146-162
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×12
  • Duplicated block (18 lines × 2) src/applications/auth/controller/config/PhabricatorAuthListController.php:98 — src/applications/auth/controller/config/PhabricatorAuthListController.php:98-116 | src/applications/auth/controller/mfa/PhabricatorAuthFactorProviderListController.php:60-77
  • Duplicated block (18 lines × 2) src/applications/conduit/controller/PhabricatorConduitTokenEditController.php:8 — src/applications/conduit/controller/PhabricatorConduitTokenEditController.php:8-25 | src/applications/conduit/controller/PhabricatorConduitTokenTerminateController.php:9-26
  • Duplicated block (18 lines × 2) src/applications/conpherence/controller/ConpherenceRoomPictureController.php:39 — src/applications/conpherence/controller/ConpherenceRoomPictureController.php:39-56 | src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php:40-57
  • Duplicated block (18 lines × 2) src/applications/conpherence/query/ConpherenceThreadSearchEngine.php:346 — src/applications/conpherence/query/ConpherenceThreadSearchEngine.php:346-364 | src/applications/conpherence/query/ConpherenceThreadSearchEngine.php:377-394
  • Duplicated block (18 lines × 2) src/applications/dashboard/controller/dashboard/PhabricatorDashboardViewController.php:45 — src/applications/dashboard/controller/dashboard/PhabricatorDashboardViewController.php:45-63 | src/applications/dashboard/controller/panel/PhabricatorDashboardPanelViewController.php:52-69
  • Duplicated block (18 lines × 2) src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php:60 — src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php:60-77 | src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php:81-98
  • Duplicated block (18 lines × 2) src/applications/differential/engine/DifferentialDiffExtractionEngine.php:56 — src/applications/differential/engine/DifferentialDiffExtractionEngine.php:56-73 | src/applications/diffusion/controller/DiffusionBrowseController.php:727-746
  • Duplicated block (18 lines × 2) src/applications/differential/xaction/DifferentialRevisionAbandonTransaction.php:59 — src/applications/differential/xaction/DifferentialRevisionAbandonTransaction.php:59-76 | src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php:73-90
  • Duplicated block (18 lines × 2) src/applications/files/controller/PhabricatorFileDetachController.php:14 — src/applications/files/controller/PhabricatorFileDetachController.php:14-31 | src/applications/files/controller/PhabricatorFileUICurtainAttachController.php:25-42
  • Duplicated block (18 lines × 2) src/applications/harbormaster/controller/HarbormasterPlanViewController.php:70 — src/applications/harbormaster/controller/HarbormasterPlanViewController.php:70-89 | src/applications/legalpad/controller/LegalpadDocumentManageController.php:61-78
  • Duplicated block (18 lines × 2) src/applications/herald/adapter/HeraldAdapter.php:337 — src/applications/herald/adapter/HeraldAdapter.php:337-354 | src/applications/herald/adapter/HeraldAdapter.php:726-743
  • Duplicated block (18 lines × 2) src/applications/passphrase/controller/PassphraseCredentialDestroyController.php:12 — src/applications/passphrase/controller/PassphraseCredentialDestroyController.php:12-29 | src/applications/passphrase/controller/PassphraseCredentialLockController.php:12-29
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×12
  • Duplicated block (10 lines × 2) src/applications/almanac/query/AlmanacBindingQuery.php:68 — src/applications/almanac/query/AlmanacBindingQuery.php:68-77 | src/applications/almanac/query/AlmanacInterfaceQuery.php:53-62
  • Duplicated block (10 lines × 2) src/applications/auth/engine/PhabricatorAuthInviteEngine.php:132 — src/applications/auth/engine/PhabricatorAuthInviteEngine.php:132-141 | src/applications/auth/engine/PhabricatorAuthInviteEngine.php:144-157
  • Duplicated block (10 lines × 2) src/applications/auth/factor/PhabricatorSMSAuthFactor.php:262 — src/applications/auth/factor/PhabricatorSMSAuthFactor.php:262-271 | src/applications/auth/factor/PhabricatorTOTPAuthFactor.php:188-197
  • Duplicated block (10 lines × 2) src/applications/auth/xaction/PhabricatorAuthContactNumberNumberTransaction.php:42 — src/applications/auth/xaction/PhabricatorAuthContactNumberNumberTransaction.php:42-51 | src/applications/auth/xaction/PhabricatorAuthFactorProviderNameTransaction.php:42-51
  • Duplicated block (10 lines × 2) src/applications/auth/xaction/PhabricatorAuthFactorProviderNameTransaction.php:40 — src/applications/auth/xaction/PhabricatorAuthFactorProviderNameTransaction.php:40-50 | src/applications/conpherence/xaction/ConpherenceThreadTopicTransaction.php:53-62
  • Duplicated block (10 lines × 2) src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php:75 — src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php:75-84 | src/applications/diffusion/query/DiffusionCommitRequiredActionResultBucket.php:44-53
  • Duplicated block (10 lines × 2) src/applications/diffusion/controller/DiffusionRepositoryURIViewController.php:65 — src/applications/diffusion/controller/DiffusionRepositoryURIViewController.php:65-74 | src/applications/drydock/controller/DrydockBlueprintViewController.php:22-32
  • Duplicated block (10 lines × 2) src/applications/diffusion/symbol/DiffusionPythonExternalSymbolsSource.php:19 — src/applications/diffusion/symbol/DiffusionPythonExternalSymbolsSource.php:19-28 | src/applications/diffusion/symbol/DiffusionPythonExternalSymbolsSource.php:29-38
  • Duplicated block (10 lines × 2) src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php:320 — src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php:320-329 | src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php:402-411
  • Duplicated block (10 lines × 2) src/applications/legalpad/controller/LegalpadDocumentSignatureViewController.php:56 — src/applications/legalpad/controller/LegalpadDocumentSignatureViewController.php:56-65 | src/applications/legalpad/controller/LegalpadDocumentSignatureViewController.php:69-78
  • Duplicated block (10 lines × 2) src/applications/macro/query/PhabricatorMacroQuery.php:210 — src/applications/macro/query/PhabricatorMacroQuery.php:210-219 | src/applications/paste/query/PhabricatorPasteQuery.php:197-206
  • Duplicated block (10 lines × 2) src/applications/packages/editor/PhabricatorPackagesPackageEditEngine.php:86 — src/applications/packages/editor/PhabricatorPackagesPackageEditEngine.php:86-95 | src/applications/packages/editor/PhabricatorPackagesPublisherEditEngine.php:78-87
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×9
  • Duplicated block (20 lines × 2) src/applications/almanac/query/AlmanacNamespaceQuery.php:40 — src/applications/almanac/query/AlmanacNamespaceQuery.php:40-59 | src/applications/almanac/query/AlmanacNetworkQuery.php:40-59
  • Duplicated block (20 lines × 2) src/applications/almanac/xaction/AlmanacBindingServiceTransaction.php:42 — src/applications/almanac/xaction/AlmanacBindingServiceTransaction.php:42-61 | src/applications/almanac/xaction/AlmanacInterfaceDeviceTransaction.php:52-71
  • Duplicated block (20 lines × 2) src/applications/almanac/xaction/AlmanacDeviceNameTransaction.php:57 — src/applications/almanac/xaction/AlmanacDeviceNameTransaction.php:57-76 | src/applications/almanac/xaction/AlmanacServiceNameTransaction.php:66-85
  • Duplicated block (20 lines × 2) src/applications/conduit/query/PhabricatorConduitLogQuery.php:84 — src/applications/conduit/query/PhabricatorConduitLogQuery.php:84-103 | src/applications/diffusion/query/DiffusionCommitQuery.php:671-690
  • Duplicated block (20 lines × 2) src/applications/config/option/PhabricatorCoreConfigOptions.php:281 — src/applications/config/option/PhabricatorCoreConfigOptions.php:281-300 | src/applications/config/option/PhabricatorSecurityConfigOptions.php:300-319
  • Duplicated block (20 lines × 2) src/applications/dashboard/query/PhabricatorDashboardPortalQuery.php:34 — src/applications/dashboard/query/PhabricatorDashboardPortalQuery.php:34-53 | src/applications/herald/query/HeraldWebhookQuery.php:34-53
  • Duplicated block (20 lines × 2) src/applications/differential/editor/DifferentialTransactionEditor.php:1170 — src/applications/differential/editor/DifferentialTransactionEditor.php:1170-1189 | src/applications/differential/herald/DifferentialReviewersHeraldAction.php:40-59
  • Duplicated block (20 lines × 2) src/applications/differential/parser/DifferentialChangesetParser.php:1682 — src/applications/differential/parser/DifferentialChangesetParser.php:1682-1701 | src/applications/differential/parser/DifferentialChangesetParser.php:1718-1737
  • Duplicated block (20 lines × 2) src/applications/drydock/management/DrydockManagementReleaseLeaseWorkflow.php:57 — src/applications/drydock/management/DrydockManagementReleaseLeaseWorkflow.php:57-76 | src/applications/drydock/management/DrydockManagementReleaseResourceWorkflow.php:56-75
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×9
  • Duplicated block (9 lines × 2) src/applications/audit/query/PhabricatorCommitSearchEngine.php:169 — src/applications/audit/query/PhabricatorCommitSearchEngine.php:169-177 | src/applications/maniphest/query/ManiphestTaskSearchEngine.php:290-298
  • Duplicated block (9 lines × 2) src/applications/calendar/query/PhabricatorCalendarExportSearchEngine.php:64 — src/applications/calendar/query/PhabricatorCalendarExportSearchEngine.php:64-72 | src/applications/calendar/query/PhabricatorCalendarImportSearchEngine.php:61-69
  • Duplicated block (9 lines × 2) src/applications/differential/controller/DifferentialRevisionViewController.php:702 — src/applications/differential/controller/DifferentialRevisionViewController.php:702-710 | src/applications/macro/controller/PhabricatorMacroViewController.php:127-135
  • Duplicated block (9 lines × 2) src/applications/differential/render/DifferentialChangesetRenderer.php:505 — src/applications/differential/render/DifferentialChangesetRenderer.php:505-513 | src/applications/differential/render/DifferentialChangesetRenderer.php:516-524
  • Duplicated block (9 lines × 2) src/applications/differential/render/DifferentialChangesetRenderer.php:681 — src/applications/differential/render/DifferentialChangesetRenderer.php:681-689 | src/applications/differential/render/DifferentialChangesetRenderer.php:697-705
  • Duplicated block (9 lines × 2) src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php:157 — src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php:157-165 | src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php:208-221
  • Duplicated block (9 lines × 2) src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:268 — src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:268-277 | src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:364-372
  • Duplicated block (9 lines × 2) src/applications/maniphest/query/ManiphestTaskSearchEngine.php:443 — src/applications/maniphest/query/ManiphestTaskSearchEngine.php:443-451 | src/applications/paste/query/PhabricatorPasteSearchEngine.php:211-219
  • Duplicated block (9 lines × 2) src/applications/maniphest/xaction/ManiphestTaskAttachTransaction.php:21 — src/applications/maniphest/xaction/ManiphestTaskAttachTransaction.php:21-29 | src/applications/maniphest/xaction/ManiphestTaskAttachTransaction.php:56-64
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×8
  • Duplicated block (19 lines × 2) src/applications/almanac/xaction/AlmanacDeviceStatusTransaction.php:40 — src/applications/almanac/xaction/AlmanacDeviceStatusTransaction.php:40-58 | src/applications/dashboard/xaction/dashboard/PhabricatorDashboardLayoutTransaction.php:33-51
  • Duplicated block (19 lines × 2) src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php:243 — src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php:243-261 | src/applications/auth/controller/PhabricatorAuthSetExternalController.php:12-30
  • Duplicated block (19 lines × 2) src/applications/differential/controller/DifferentialRevisionViewController.php:777 — src/applications/differential/controller/DifferentialRevisionViewController.php:777-795 | src/applications/maniphest/controller/ManiphestTaskDetailController.php:314-335
  • Duplicated block (19 lines × 2) src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php:183 — src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php:183-201 | src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php:373-391
  • Duplicated block (19 lines × 2) src/applications/drydock/controller/DrydockBlueprintViewController.php:66 — src/applications/drydock/controller/DrydockBlueprintViewController.php:66-85 | src/applications/drydock/controller/DrydockRepositoryOperationViewController.php:58-76
  • Duplicated block (19 lines × 2) src/applications/drydock/management/DrydockManagementUpdateLeaseWorkflow.php:35 — src/applications/drydock/management/DrydockManagementUpdateLeaseWorkflow.php:35-53 | src/applications/drydock/management/DrydockManagementUpdateResourceWorkflow.php:35-53
  • Duplicated block (19 lines × 2) src/applications/files/management/PhabricatorFilesManagementCycleWorkflow.php:97 — src/applications/files/management/PhabricatorFilesManagementCycleWorkflow.php:97-115 | src/applications/files/management/PhabricatorFilesManagementEncodeWorkflow.php:119-137
  • Duplicated block (19 lines × 2) src/applications/packages/controller/PhabricatorPackagesPackageViewController.php:39 — src/applications/packages/controller/PhabricatorPackagesPackageViewController.php:39-57 | src/applications/packages/controller/PhabricatorPackagesPublisherViewController.php:36-54
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×7
  • Duplicated block (21 lines × 2) src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php:91 — src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php:91-115 | src/applications/drydock/controller/DrydockController.php:39-59
  • Duplicated block (21 lines × 2) src/applications/calendar/parser/data/PhutilCalendarAbsoluteDateTime.php:80 — src/applications/calendar/parser/data/PhutilCalendarAbsoluteDateTime.php:80-103 | src/applications/calendar/parser/data/PhutilCalendarDuration.php:14-34
  • Duplicated block (21 lines × 2) src/applications/config/check/PhabricatorMySQLSetupCheck.php:157 — src/applications/config/check/PhabricatorMySQLSetupCheck.php:157-177 | src/applications/config/check/PhabricatorMySQLSetupCheck.php:205-225
  • Duplicated block (21 lines × 2) src/applications/differential/xaction/DifferentialRevisionReviewersTransaction.php:350 — src/applications/differential/xaction/DifferentialRevisionReviewersTransaction.php:350-373 | src/applications/diffusion/xaction/DiffusionCommitAuditorsTransaction.php:208-228
  • Duplicated block (21 lines × 2) src/applications/diffusion/controller/DiffusionCompareController.php:245 — src/applications/diffusion/controller/DiffusionCompareController.php:245-267 | src/applications/diffusion/controller/DiffusionLintController.php:310-330
  • Duplicated block (21 lines × 2) src/applications/files/controller/PhabricatorFileDetachController.php:77 — src/applications/files/controller/PhabricatorFileDetachController.php:77-97 | src/applications/files/controller/PhabricatorFileUICurtainAttachController.php:90-110
  • Duplicated block (21 lines × 2) src/applications/herald/controller/HeraldRuleController.php:186 — src/applications/herald/controller/HeraldRuleController.php:186-206 | src/applications/herald/controller/HeraldRuleController.php:207-228
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×7
  • Duplicated block (14 lines × 3) src/applications/almanac/typeahead/AlmanacServiceDatasource.php:36 — src/applications/almanac/typeahead/AlmanacServiceDatasource.php:36-49 | src/applications/harbormaster/controller/HarbormasterBuildViewController.php:641-654 | src/applications/metamta/typeahead/PhabricatorMetaMTAApplicationEmailDatasource.php:31-44
  • Duplicated block (14 lines × 3) src/applications/chatlog/query/PhabricatorChatLogChannelQuery.php:20 — src/applications/chatlog/query/PhabricatorChatLogChannelQuery.php:20-33 | src/applications/chatlog/query/PhabricatorChatLogQuery.php:20-33 | src/applications/legalpad/query/LegalpadDocumentSignatureQuery.php:50-63
  • Duplicated block (14 lines × 3) src/applications/dashboard/controller/dashboard/PhabricatorDashboardArchiveController.php:46 — src/applications/dashboard/controller/dashboard/PhabricatorDashboardArchiveController.php:46-59 | src/applications/owners/controller/PhabricatorOwnersArchiveController.php:46-59 | src/applications/paste/controller/PhabricatorPasteArchiveController.php:45-58
  • Duplicated block (14 lines × 3) src/applications/differential/typeahead/DifferentialBlockingReviewerDatasource.php:79 — src/applications/differential/typeahead/DifferentialBlockingReviewerDatasource.php:79-92 | src/applications/differential/typeahead/DifferentialExactUserFunctionDatasource.php:67-80 | src/applications/owners/typeahead/PhabricatorOwnersPackageOwnerDatasource.php:91-104
  • Duplicated block (14 lines × 3) src/applications/diffusion/herald/DiffusionCommitAuthorPackagesHeraldField.php:13 — src/applications/diffusion/herald/DiffusionCommitAuthorPackagesHeraldField.php:13-26 | src/applications/diffusion/herald/DiffusionCommitCommitterPackagesHeraldField.php:13-26 | src/applications/diffusion/herald/DiffusionPreCommitContentAuthorPackagesHeraldField.php:13-26
  • Duplicated block (14 lines × 3) src/applications/drydock/controller/DrydockLogController.php:98 — src/applications/drydock/controller/DrydockLogController.php:98-111 | src/applications/drydock/controller/DrydockLogController.php:112-125 | src/applications/drydock/controller/DrydockLogController.php:126-139
  • Duplicated block (14 lines × 3) src/applications/harbormaster/controller/HarbormasterPlanViewController.php:477 — src/applications/harbormaster/controller/HarbormasterPlanViewController.php:477-490 | src/applications/harbormaster/controller/HarbormasterPlanViewController.php:524-537 | src/applications/owners/controller/PhabricatorOwnersDetailController.php:390-403
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×6
  • Duplicated block (24 lines × 2) src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceTestCase.php:33 — src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceTestCase.php:33-56 | src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceTestCase.php:64-96
  • Duplicated block (24 lines × 2) src/applications/config/check/PhabricatorMySQLSetupCheck.php:201 — src/applications/config/check/PhabricatorMySQLSetupCheck.php:201-224 | src/applications/config/check/PhabricatorMySQLSetupCheck.php:267-290
  • Duplicated block (24 lines × 2) src/applications/differential/parser/__tests__/DifferentialHunkParserTestCase.php:171 — src/applications/differential/parser/__tests__/DifferentialHunkParserTestCase.php:171-194 | src/applications/differential/parser/__tests__/DifferentialHunkParserTestCase.php:200-223
  • Duplicated block (24 lines × 2) src/applications/differential/render/DifferentialChangesetOneUpRenderer.php:96 — src/applications/differential/render/DifferentialChangesetOneUpRenderer.php:96-119 | src/applications/differential/render/DifferentialChangesetOneUpRenderer.php:164-187
  • Duplicated block (24 lines × 2) src/applications/doorkeeper/bridge/DoorkeeperBridgeAsana.php:35 — src/applications/doorkeeper/bridge/DoorkeeperBridgeAsana.php:35-59 | src/applications/doorkeeper/bridge/DoorkeeperBridgeJIRA.php:30-53
  • Duplicated block (24 lines × 2) src/applications/people/conduit/UserDisableConduitAPIMethod.php:47 — src/applications/people/conduit/UserDisableConduitAPIMethod.php:47-70 | src/applications/people/conduit/UserEnableConduitAPIMethod.php:47-70
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×6
  • Duplicated block (13 lines × 3) src/applications/differential/typeahead/DifferentialBlockingReviewerDatasource.php:113 — src/applications/differential/typeahead/DifferentialBlockingReviewerDatasource.php:113-125 | src/applications/differential/typeahead/DifferentialExactUserFunctionDatasource.php:100-112 | src/applications/owners/typeahead/PhabricatorOwnersPackageOwnerDatasource.php:134-146
  • Duplicated block (13 lines × 3) src/applications/drydock/controller/DrydockBlueprintViewController.php:162 — src/applications/drydock/controller/DrydockBlueprintViewController.php:162-174 | src/applications/drydock/controller/DrydockBlueprintViewController.php:228-240 | src/applications/drydock/controller/DrydockResourceViewController.php:185-197
  • Duplicated block (13 lines × 3) src/applications/drydock/typeahead/DrydockBlueprintDatasource.php:22 — src/applications/drydock/typeahead/DrydockBlueprintDatasource.php:22-34 | src/applications/drydock/typeahead/DrydockLeaseDatasource.php:18-30 | src/applications/drydock/typeahead/DrydockResourceDatasource.php:18-30
  • Duplicated block (13 lines × 3) src/applications/fund/xaction/FundInitiativeNameTransaction.php:32 — src/applications/fund/xaction/FundInitiativeNameTransaction.php:32-44 | src/applications/legalpad/xaction/LegalpadDocumentTitleTransaction.php:36-49 | src/applications/passphrase/xaction/PassphraseCredentialNameTransaction.php:32-44
  • Duplicated block (13 lines × 3) src/applications/herald/xaction/HeraldWebhookNameTransaction.php:37 — src/applications/herald/xaction/HeraldWebhookNameTransaction.php:37-49 | src/applications/herald/xaction/HeraldWebhookURITransaction.php:37-49 | src/applications/macro/xaction/PhabricatorMacroNameTransaction.php:37-49
  • Duplicated block (13 lines × 3) src/applications/owners/xaction/PhabricatorOwnersPackageAuthorityTransaction.php:40 — src/applications/owners/xaction/PhabricatorOwnersPackageAuthorityTransaction.php:40-52 | src/applications/owners/xaction/PhabricatorOwnersPackageAutoreviewTransaction.php:40-52 | src/applications/owners/xaction/PhabricatorOwnersPackageDominionTransaction.php:40-52
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×5
  • Duplicated block (17 lines × 3) src/applications/almanac/controller/AlmanacDeviceViewController.php:60 — src/applications/almanac/controller/AlmanacDeviceViewController.php:60-81 | src/applications/almanac/controller/AlmanacNamespaceViewController.php:38-54 | src/applications/almanac/controller/AlmanacNetworkViewController.php:38-54
  • Duplicated block (17 lines × 3) src/applications/auth/controller/contact/PhabricatorAuthContactNumberDisableController.php:7 — src/applications/auth/controller/contact/PhabricatorAuthContactNumberDisableController.php:7-23 | src/applications/auth/controller/contact/PhabricatorAuthContactNumberPrimaryController.php:7-23 | src/applications/auth/controller/contact/PhabricatorAuthContactNumberTestController.php:7-23
  • Duplicated block (17 lines × 3) src/applications/files/controller/PhabricatorFileViewController.php:77 — src/applications/files/controller/PhabricatorFileViewController.php:77-93 | src/applications/harbormaster/controller/HarbormasterPlanViewController.php:70-89 | src/applications/legalpad/controller/LegalpadDocumentManageController.php:61-78
  • Duplicated block (17 lines × 3) src/applications/meta/controller/PhabricatorApplicationEditController.php:7 — src/applications/meta/controller/PhabricatorApplicationEditController.php:7-23 | src/applications/meta/controller/PhabricatorApplicationPanelController.php:11-27 | src/applications/meta/controller/PhabricatorApplicationUninstallController.php:9-26
  • Duplicated block (17 lines × 3) src/applications/owners/xaction/PhabricatorOwnersPackageAuthorityTransaction.php:16 — src/applications/owners/xaction/PhabricatorOwnersPackageAuthorityTransaction.php:16-32 | src/applications/owners/xaction/PhabricatorOwnersPackageAutoreviewTransaction.php:16-32 | src/applications/owners/xaction/PhabricatorOwnersPackageDominionTransaction.php:16-32
D35 · Change Coupling · Change coupling · ×4
  • Change coupling: PhabricatorInlineComment.php ↔ DiffInline.js src/infrastructure/diff/interface/PhabricatorInlineComment.php — `src/infrastructure/diff/interface/PhabricatorInlineComment.php` and `webroot/rsrc/js/application/diff/DiffInline.js` change together 90% of the time (9 of the 10 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
  • Change coupling: PHUIDiffInlineCommentView.php ↔ DiffInline.js src/infrastructure/diff/view/PHUIDiffInlineCommentView.php — `src/infrastructure/diff/view/PHUIDiffInlineCommentView.php` and `webroot/rsrc/js/application/diff/DiffInline.js` change together 64% of the time (9 of the 14 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
  • Change coupling: DifferentialChangesetParser.php ↔ DifferentialChangesetTestRenderer.php src/applications/differential/parser/DifferentialChangesetParser.php — `src/applications/differential/parser/DifferentialChangesetParser.php` and `src/applications/differential/render/DifferentialChangesetTestRenderer.php` change together 64% of the time (7 of the 11 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
  • Change coupling: PhabricatorInlineComment.php ↔ PHUIDiffInlineCommentEditView.php src/infrastructure/diff/interface/PhabricatorInlineComment.php — `src/infrastructure/diff/interface/PhabricatorInlineComment.php` and `src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php` change together 50% of the time (5 of the 10 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×4
  • Duplicated block (23 lines × 2) src/applications/drydock/controller/DrydockController.php:8 — src/applications/drydock/controller/DrydockController.php:8-30 | src/applications/drydock/controller/DrydockController.php:46-79
  • Duplicated block (23 lines × 2) src/applications/files/management/PhabricatorFilesManagementEncodeWorkflow.php:74 — src/applications/files/management/PhabricatorFilesManagementEncodeWorkflow.php:74-96 | src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php:134-156
  • Duplicated block (23 lines × 2) src/applications/metamta/controller/PhabricatorMetaMTAMailgunReceiveController.php:56 — src/applications/metamta/controller/PhabricatorMetaMTAMailgunReceiveController.php:56-78 | src/applications/metamta/controller/PhabricatorMetaMTASendGridReceiveController.php:35-57
  • Duplicated block (23 lines × 2) src/applications/owners/controller/PhabricatorOwnersDetailController.php:84 — src/applications/owners/controller/PhabricatorOwnersDetailController.php:84-106 | src/applications/owners/controller/PhabricatorOwnersDetailController.php:110-133
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×4
  • Duplicated block (15 lines × 3) src/applications/calendar/controller/PhabricatorCalendarExportDisableController.php:46 — src/applications/calendar/controller/PhabricatorCalendarExportDisableController.php:46-60 | src/applications/diffusion/controller/DiffusionRepositoryURIDisableController.php:65-79 | src/applications/drydock/controller/DrydockBlueprintDisableController.php:49-63
  • Duplicated block (15 lines × 3) src/applications/calendar/controller/PhabricatorCalendarExportViewController.php:107 — src/applications/calendar/controller/PhabricatorCalendarExportViewController.php:107-121 | src/applications/calendar/controller/PhabricatorCalendarImportViewController.php:121-135 | src/applications/fund/controller/FundInitiativeViewController.php:135-149
  • Duplicated block (15 lines × 3) src/applications/config/controller/services/PhabricatorConfigCacheController.php:26 — src/applications/config/controller/services/PhabricatorConfigCacheController.php:26-40 | src/applications/config/controller/services/PhabricatorConfigClusterNotificationsController.php:20-34 | src/applications/config/controller/services/PhabricatorConfigClusterSearchController.php:18-32
  • Duplicated block (15 lines × 3) src/applications/packages/controller/PhabricatorPackagesPackageViewController.php:74 — src/applications/packages/controller/PhabricatorPackagesPackageViewController.php:74-88 | src/applications/packages/controller/PhabricatorPackagesPublisherViewController.php:71-85 | src/applications/packages/controller/PhabricatorPackagesVersionViewController.php:72-86
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×4
  • Duplicated block (8 lines × 2) src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php:66 — src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php:66-73 | src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php:205-213
  • Duplicated block (8 lines × 2) src/applications/differential/parser/DifferentialHunkParser.php:643 — src/applications/differential/parser/DifferentialHunkParser.php:643-650 | src/applications/differential/parser/DifferentialHunkParser.php:652-659
  • Duplicated block (8 lines × 2) src/applications/diffusion/controller/DiffusionLintController.php:229 — src/applications/diffusion/controller/DiffusionLintController.php:229-236 | src/applications/diffusion/controller/DiffusionLintController.php:508-515
  • Duplicated block (8 lines × 2) src/applications/harbormaster/controller/HarbormasterBuildableListController.php:12 — src/applications/harbormaster/controller/HarbormasterBuildableListController.php:12-19 | src/applications/harbormaster/controller/HarbormasterBuildableListController.php:21-28
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×4
  • Duplicated block (7 lines × 2) src/applications/calendar/parser/data/PhutilCalendarAbsoluteDateTime.php:68 — src/applications/calendar/parser/data/PhutilCalendarAbsoluteDateTime.php:68-74 | src/applications/calendar/parser/data/PhutilCalendarRelativeDateTime.php:62-68
  • Duplicated block (7 lines × 2) src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php:218 — src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php:218-225 | src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php:323-329
  • Duplicated block (7 lines × 2) src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php:44 — src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php:44-51 | src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php:204-210
  • Duplicated block (7 lines × 2) src/applications/metamta/management/PhabricatorMailManagementListInboundWorkflow.php:47 — src/applications/metamta/management/PhabricatorMailManagementListInboundWorkflow.php:47-53 | src/applications/metamta/management/PhabricatorMailManagementListOutboundWorkflow.php:39-45
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×3
  • Duplicated block (22 lines × 2) src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php:97 — src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php:97-118 | src/applications/auth/provider/PhabricatorOAuth2AuthProvider.php:77-98
  • Duplicated block (22 lines × 2) src/applications/diffusion/controller/DiffusionCommitBranchesController.php:19 — src/applications/diffusion/controller/DiffusionCommitBranchesController.php:19-41 | src/applications/diffusion/controller/DiffusionCommitTagsController.php:19-40
  • Duplicated block (22 lines × 2) src/applications/packages/xaction/package/PhabricatorPackagesPackagePublisherTransaction.php:40 — src/applications/packages/xaction/package/PhabricatorPackagesPackagePublisherTransaction.php:40-61 | src/applications/packages/xaction/version/PhabricatorPackagesVersionPackageTransaction.php:39-60
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×3
  • Duplicated block (13 lines × 4) src/applications/auth/controller/contact/PhabricatorAuthContactNumberViewController.php:89 — src/applications/auth/controller/contact/PhabricatorAuthContactNumberViewController.php:89-101 | src/applications/auth/controller/mfa/PhabricatorAuthFactorProviderViewController.php:104-116 | src/applications/nuance/controller/NuanceQueueViewController.php:61-73 | src/applications/nuance/controller/NuanceSourceViewController.php:74-86
  • Duplicated block (13 lines × 4) src/applications/calendar/controller/PhabricatorCalendarEventJoinController.php:66 — src/applications/calendar/controller/PhabricatorCalendarEventJoinController.php:66-78 | src/applications/dashboard/controller/dashboard/PhabricatorDashboardArchiveController.php:49-61 | src/applications/owners/controller/PhabricatorOwnersArchiveController.php:49-61 | src/applications/paste/controller/PhabricatorPasteArchiveController.php:48-60
  • Duplicated block (13 lines × 4) src/applications/drydock/query/DrydockLogQuery.php:43 — src/applications/drydock/query/DrydockLogQuery.php:43-55 | src/applications/drydock/query/DrydockLogQuery.php:64-76 | src/applications/drydock/query/DrydockLogQuery.php:85-97 | src/applications/drydock/query/DrydockLogQuery.php:106-118
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×3
  • Duplicated block (10 lines × 5) src/applications/almanac/query/AlmanacDeviceSearchEngine.php:100 — src/applications/almanac/query/AlmanacDeviceSearchEngine.php:100-109 | src/applications/almanac/query/AlmanacServiceSearchEngine.php:93-102 | src/applications/auth/query/PhabricatorAuthSSHKeySearchEngine.php:80-89 | src/applications/nuance/query/NuanceQueueSearchEngine.php:56-65 | src/applications/nuance/query/NuanceSourceSearchEngine.php:65-74
  • Duplicated block (10 lines × 5) src/applications/auth/query/PhabricatorAuthPasswordQuery.php:83 — src/applications/auth/query/PhabricatorAuthPasswordQuery.php:83-93 | src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php:51-61 | src/applications/auth/query/PhabricatorAuthSessionQuery.php:42-52 | src/applications/conduit/query/PhabricatorConduitTokenQuery.php:90-99 | src/applications/drydock/query/DrydockCommandQuery.php:29-39
  • Duplicated block (10 lines × 5) src/applications/dashboard/controller/panel/PhabricatorDashboardPanelListController.php:56 — src/applications/dashboard/controller/panel/PhabricatorDashboardPanelListController.php:56-65 | src/applications/files/query/PhabricatorFileSearchEngine.php:200-209 | src/applications/legalpad/query/LegalpadDocumentSearchEngine.php:180-189 | src/applications/macro/query/PhabricatorMacroSearchEngine.php:197-206 | src/applications/passphrase/query/PassphraseCredentialSearchEngine.php:119-128
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×2
  • Duplicated block (44 lines × 2) src/applications/conpherence/controller/ConpherenceRoomPictureController.php:132 — src/applications/conpherence/controller/ConpherenceRoomPictureController.php:132-175 | src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php:150-193
  • Duplicated block (44 lines × 2) src/applications/files/management/PhabricatorFilesManagementIntegrityWorkflow.php:7 — src/applications/files/management/PhabricatorFilesManagementIntegrityWorkflow.php:7-50 | src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php:9-54
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×2
  • Duplicated block (28 lines × 2) src/applications/config/controller/PhabricatorConfigConsoleController.php:106 — src/applications/config/controller/PhabricatorConfigConsoleController.php:106-136 | src/applications/config/controller/PhabricatorConfigConsoleController.php:305-332
  • Duplicated block (28 lines × 2) src/applications/differential/constants/DifferentialConstantsModule.php:112 — src/applications/differential/constants/DifferentialConstantsModule.php:112-139 | src/applications/differential/constants/DifferentialConstantsModule.php:146-173
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×2
  • Duplicated block (21 lines × 3) src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php:10 — src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php:10-30 | src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php:33-54 | src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php:56-79
  • Duplicated block (21 lines × 3) src/applications/files/management/PhabricatorFilesManagementCycleWorkflow.php:34 — src/applications/files/management/PhabricatorFilesManagementCycleWorkflow.php:34-54 | src/applications/files/management/PhabricatorFilesManagementEncodeWorkflow.php:74-94 | src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php:134-154
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×2
  • Duplicated block (18 lines × 3) src/applications/dashboard/xaction/dashboard/PhabricatorDashboardNameTransaction.php:32 — src/applications/dashboard/xaction/dashboard/PhabricatorDashboardNameTransaction.php:32-49 | src/applications/dashboard/xaction/panel/PhabricatorDashboardPanelNameTransaction.php:32-49 | src/applications/dashboard/xaction/portal/PhabricatorDashboardPortalNameTransaction.php:32-49
  • Duplicated block (18 lines × 3) src/applications/diffusion/controller/DiffusionRepositoryURIDisableController.php:58 — src/applications/diffusion/controller/DiffusionRepositoryURIDisableController.php:58-75 | src/applications/drydock/controller/DrydockAuthorizationAuthorizeController.php:61-78 | src/applications/drydock/controller/DrydockBlueprintDisableController.php:42-59
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×2
  • Duplicated block (16 lines × 5) src/applications/almanac/controller/AlmanacDeviceViewController.php:85 — src/applications/almanac/controller/AlmanacDeviceViewController.php:85-100 | src/applications/almanac/controller/AlmanacNamespaceViewController.php:58-73 | src/applications/almanac/controller/AlmanacNetworkViewController.php:59-74 | src/applications/almanac/controller/AlmanacServiceViewController.php:90-105 | src/applications/diffusion/controller/DiffusionIdentityViewController.php:59-74
  • Duplicated block (16 lines × 5) src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php:49 — src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php:49-64 | src/applications/diffusion/management/DiffusionRepositoryLimitsManagementPanel.php:48-63 | src/applications/diffusion/management/DiffusionRepositoryStagingManagementPanel.php:46-61 | src/applications/diffusion/management/DiffusionRepositorySubversionManagementPanel.php:42-57 | src/applications/diffusion/management/DiffusionRepositorySymbolsManagementPanel.php:44-59
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×2
  • Duplicated block (16 lines × 4) src/applications/dashboard/controller/panel/PhabricatorDashboardPanelArchiveController.php:40 — src/applications/dashboard/controller/panel/PhabricatorDashboardPanelArchiveController.php:40-55 | src/applications/diffusion/controller/DiffusionRepositoryURIDisableController.php:61-76 | src/applications/drydock/controller/DrydockAuthorizationAuthorizeController.php:64-79 | src/applications/drydock/controller/DrydockBlueprintDisableController.php:45-60
  • Duplicated block (16 lines × 4) src/applications/passphrase/controller/PassphraseCredentialConduitController.php:7 — src/applications/passphrase/controller/PassphraseCredentialConduitController.php:7-23 | src/applications/passphrase/controller/PassphraseCredentialDestroyController.php:7-23 | src/applications/passphrase/controller/PassphraseCredentialLockController.php:7-23 | src/applications/passphrase/controller/PassphraseCredentialPublicController.php:7-22
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×2
  • Duplicated block (16 lines × 3) src/applications/calendar/controller/PhabricatorCalendarImportDeleteController.php:7 — src/applications/calendar/controller/PhabricatorCalendarImportDeleteController.php:7-22 | src/applications/calendar/controller/PhabricatorCalendarImportDisableController.php:7-22 | src/applications/calendar/controller/PhabricatorCalendarImportReloadController.php:7-22
  • Duplicated block (16 lines × 3) src/applications/harbormaster/controller/HarbormasterPlanBehaviorController.php:7 — src/applications/harbormaster/controller/HarbormasterPlanBehaviorController.php:7-22 | src/applications/harbormaster/controller/HarbormasterPlanDisableController.php:7-22 | src/applications/harbormaster/controller/HarbormasterStepAddController.php:7-22
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×2
  • Duplicated block (14 lines × 4) src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:87 — src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:87-100 | src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:111-124 | src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:138-151 | src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:165-178
  • Duplicated block (14 lines × 4) src/applications/differential/xaction/DifferentialRevisionReviewersTransaction.php:196 — src/applications/differential/xaction/DifferentialRevisionReviewersTransaction.php:196-209 | src/applications/differential/xaction/DifferentialRevisionReviewersTransaction.php:211-224 | src/applications/differential/xaction/DifferentialRevisionReviewersTransaction.php:275-288 | src/applications/differential/xaction/DifferentialRevisionReviewersTransaction.php:290-303
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×2
  • Duplicated block (12 lines × 4) src/applications/badges/controller/PhabricatorBadgesArchiveController.php:39 — src/applications/badges/controller/PhabricatorBadgesArchiveController.php:39-50 | src/applications/dashboard/controller/dashboard/PhabricatorDashboardArchiveController.php:39-50 | src/applications/owners/controller/PhabricatorOwnersArchiveController.php:39-50 | src/applications/paste/controller/PhabricatorPasteArchiveController.php:38-49
  • Duplicated block (12 lines × 4) src/applications/drydock/query/DrydockAuthorizationQuery.php:78 — src/applications/drydock/query/DrydockAuthorizationQuery.php:78-89 | src/applications/drydock/query/DrydockAuthorizationQuery.php:100-111 | src/applications/drydock/query/DrydockRepositoryOperationQuery.php:79-90 | src/applications/drydock/query/DrydockRepositoryOperationQuery.php:105-116
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) src/applications/conduit/controller/PhabricatorConduitController.php:67 — src/applications/conduit/controller/PhabricatorConduitController.php:67-78 | src/applications/drydock/controller/DrydockLeaseViewController.php:58-69 | src/applications/drydock/controller/DrydockResourceViewController.php:63-74
  • Duplicated block (12 lines × 3) src/applications/help/controller/PhabricatorHelpDocumentationController.php:11 — src/applications/help/controller/PhabricatorHelpDocumentationController.php:11-22 | src/applications/meta/controller/PhabricatorApplicationDetailViewController.php:12-23 | src/applications/meta/controller/PhabricatorApplicationEmailCommandsController.php:11-22
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×2
  • Duplicated block (10 lines × 4) src/applications/almanac/phid/AlmanacDevicePHIDType.php:32 — src/applications/almanac/phid/AlmanacDevicePHIDType.php:32-41 | src/applications/almanac/phid/AlmanacNamespacePHIDType.php:32-41 | src/applications/almanac/phid/AlmanacNetworkPHIDType.php:32-41 | src/applications/almanac/phid/AlmanacServicePHIDType.php:32-41
  • Duplicated block (10 lines × 4) src/applications/conpherence/xaction/ConpherenceThreadTitleTransaction.php:54 — src/applications/conpherence/xaction/ConpherenceThreadTitleTransaction.php:54-64 | src/applications/countdown/xaction/PhabricatorCountdownTitleTransaction.php:33-42 | src/applications/differential/xaction/DifferentialRevisionTitleTransaction.php:35-45 | src/applications/legalpad/xaction/LegalpadDocumentTitleTransaction.php:54-64
D1 · Cyclomatic Complexity · PhabricatorAuthRegisterController.handleRequest (cyclomatic 88) · ×1
  • PhabricatorAuthRegisterController.handleRequest (cyclomatic 88) src/applications/auth/controller/PhabricatorAuthRegisterController.php:10 — PhabricatorAuthRegisterController.handleRequest has cyclomatic complexity 88 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetParser.render (cyclomatic 65) · ×1
  • DifferentialChangesetParser.render (cyclomatic 65) src/applications/differential/parser/DifferentialChangesetParser.php:749 — DifferentialChangesetParser.render has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilSearchQueryCompiler.tokenizeQuery (cyclomatic 62) · ×1
  • PhutilSearchQueryCompiler.tokenizeQuery (cyclomatic 62) src/applications/search/compiler/PhutilSearchQueryCompiler.php:104 — PhutilSearchQueryCompiler.tokenizeQuery has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HarbormasterBuildLogRenderController.handleRequest (cyclomatic 60) · ×1
  • HarbormasterBuildLogRenderController.handleRequest (cyclomatic 60) src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php:10 — HarbormasterBuildLogRenderController.handleRequest has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialRevisionViewController.handleRequest (cyclomatic 57) · ×1
  • DifferentialRevisionViewController.handleRequest (cyclomatic 57) src/applications/differential/controller/DifferentialRevisionViewController.php:43 — DifferentialRevisionViewController.handleRequest has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetHTMLRenderer.renderChangeTypeHeader (cyclomatic 57) · ×1
  • DifferentialChangesetHTMLRenderer.renderChangeTypeHeader (cyclomatic 57) src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:21 — DifferentialChangesetHTMLRenderer.renderChangeTypeHeader has cyclomatic complexity 57 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PhabricatorRepositorySvnCommitChangeParserWorker.parseCommitChanges (cyclomatic 54) · ×1
  • PhabricatorRepositorySvnCommitChangeParserWorker.parseCommitChanges (cyclomatic 54) src/applications/repository/worker/commitchangeparser/PhabricatorRepositorySvnCommitChangeParserWorker.php:6 — PhabricatorRepositorySvnCommitChangeParserWorker.parseCommitChanges has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetTwoUpRenderer.renderTextChange (cyclomatic 52) · ×1
  • DifferentialChangesetTwoUpRenderer.renderTextChange (cyclomatic 52) src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php:31 — DifferentialChangesetTwoUpRenderer.renderTextChange has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorCalendarImportEngine.importEventDocument (cyclomatic 51) · ×1
  • PhabricatorCalendarImportEngine.importEventDocument (cyclomatic 51) src/applications/calendar/import/PhabricatorCalendarImportEngine.php:55 — PhabricatorCalendarImportEngine.importEventDocument has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorApplicationSearchController.processSearchRequest (cyclomatic 51) · ×1
  • PhabricatorApplicationSearchController.processSearchRequest (cyclomatic 51) src/applications/search/controller/PhabricatorApplicationSearchController.php:95 — PhabricatorApplicationSearchController.processSearchRequest has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorApplicationTransactionEditor.applyTransactions (cyclomatic 50) · ×1
  • PhabricatorApplicationTransactionEditor.applyTransactions (cyclomatic 50) src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1175 — PhabricatorApplicationTransactionEditor.applyTransactions has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryMercurialCommitChangeParserWorker.parseCommitChanges (cyclomatic 49) · ×1
  • PhabricatorRepositoryMercurialCommitChangeParserWorker.parseCommitChanges (cyclomatic 49) src/applications/repository/worker/commitchangeparser/PhabricatorRepositoryMercurialCommitChangeParserWorker.php:6 — PhabricatorRepositoryMercurialCommitChangeParserWorker.parseCommitChanges has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionCommitQuery.buildWhereClauseParts (cyclomatic 48) · ×1
  • DiffusionCommitQuery.buildWhereClauseParts (cyclomatic 48) src/applications/diffusion/query/DiffusionCommitQuery.php:534 — DiffusionCommitQuery.buildWhereClauseParts has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionCommitController.handleRequest (cyclomatic 47) · ×1
  • DiffusionCommitController.handleRequest (cyclomatic 47) src/applications/diffusion/controller/DiffusionCommitController.php:17 — DiffusionCommitController.handleRequest has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProfileMenuEngine.buildResponse (cyclomatic 47) · ×1
  • PhabricatorProfileMenuEngine.buildResponse (cyclomatic 47) src/applications/search/engine/PhabricatorProfileMenuEngine.php:102 — PhabricatorProfileMenuEngine.buildResponse has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIDiffInlineCommentDetailView.render (cyclomatic 46) · ×1
  • PHUIDiffInlineCommentDetailView.render (cyclomatic 46) src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php:78 — PHUIDiffInlineCommentDetailView.render has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIObjectItemView.getTagContent (cyclomatic 46) · ×1
  • PHUIObjectItemView.getTagContent (cyclomatic 46) src/view/phui/PHUIObjectItemView.php:383 — PHUIObjectItemView.getTagContent has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeraldAdapter.doesConditionMatch (cyclomatic 43) · ×1
  • HeraldAdapter.doesConditionMatch (cyclomatic 43) src/applications/herald/adapter/HeraldAdapter.php:444 — HeraldAdapter.doesConditionMatch has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorConfigSchemaSpec.getDetailsForDataType (cyclomatic 42) · ×1
  • PhabricatorConfigSchemaSpec.getDetailsForDataType (cyclomatic 42) src/applications/config/schema/PhabricatorConfigSchemaSpec.php:269 — PhabricatorConfigSchemaSpec.getDetailsForDataType has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PhabricatorInlineCommentAdjustmentEngine.execute (cyclomatic 42) · ×1
  • PhabricatorInlineCommentAdjustmentEngine.execute (cyclomatic 42) src/infrastructure/diff/engine/PhabricatorInlineCommentAdjustmentEngine.php:60 — PhabricatorInlineCommentAdjustmentEngine.execute has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionServeController.serveRequest (cyclomatic 41) · ×1
  • DiffusionServeController.serveRequest (cyclomatic 41) src/applications/diffusion/controller/DiffusionServeController.php:176 — DiffusionServeController.serveRequest has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AphrontTableView.render (cyclomatic 41) · ×1
  • AphrontTableView.render (cyclomatic 41) src/view/control/AphrontTableView.php:131 — AphrontTableView.render has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionURIEditor.validateTransaction (cyclomatic 40) · ×1
  • DiffusionURIEditor.validateTransaction (cyclomatic 40) src/applications/diffusion/editor/DiffusionURIEditor.php:156 — DiffusionURIEditor.validateTransaction has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorManiphestTaskFactEngine.newDatapointsForObject (cyclomatic 39) · ×1
  • PhabricatorManiphestTaskFactEngine.newDatapointsForObject (cyclomatic 39) src/applications/fact/engine/PhabricatorManiphestTaskFactEngine.php:86 — PhabricatorManiphestTaskFactEngine.newDatapointsForObject has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryManagementReparseWorkflow.execute (cyclomatic 39) · ×1
  • PhabricatorRepositoryManagementReparseWorkflow.execute (cyclomatic 39) src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php:81 — PhabricatorRepositoryManagementReparseWorkflow.execute has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorEditEngine.buildEditResponse (cyclomatic 39) · ×1
  • PhabricatorEditEngine.buildEditResponse (cyclomatic 39) src/applications/transactions/editengine/PhabricatorEditEngine.php:1033 — PhabricatorEditEngine.buildEditResponse has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorWorkerManagementWorkflow.loadTasks (cyclomatic 39) · ×1
  • PhabricatorWorkerManagementWorkflow.loadTasks (cyclomatic 39) src/infrastructure/daemon/workers/management/PhabricatorWorkerManagementWorkflow.php:69 — PhabricatorWorkerManagementWorkflow.loadTasks has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetViewController.handleRequest (cyclomatic 38) · ×1
  • DifferentialChangesetViewController.handleRequest (cyclomatic 38) src/applications/differential/controller/DifferentialChangesetViewController.php:9 — DifferentialChangesetViewController.handleRequest has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionRepositoryBasicsManagementPanel.buildRepositoryStatus (cyclomatic 38) · ×1
  • DiffusionRepositoryBasicsManagementPanel.buildRepositoryStatus (cyclomatic 38) src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:336 — DiffusionRepositoryBasicsManagementPanel.buildRepositoryStatus has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorFilesManagementIntegrityWorkflow.execute (cyclomatic 38) · ×1
  • PhabricatorFilesManagementIntegrityWorkflow.execute (cyclomatic 38) src/applications/files/management/PhabricatorFilesManagementIntegrityWorkflow.php:53 — PhabricatorFilesManagementIntegrityWorkflow.execute has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorSearchManagementIndexWorkflow.execute (cyclomatic 38) · ×1
  • PhabricatorSearchManagementIndexWorkflow.execute (cyclomatic 38) src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php:74 — PhabricatorSearchManagementIndexWorkflow.execute has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorController.willBeginExecution (cyclomatic 37) · ×1
  • PhabricatorController.willBeginExecution (cyclomatic 37) src/applications/base/controller/PhabricatorController.php:64 — PhabricatorController.willBeginExecution has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilCalendarRecurrenceRule.newDaysSet (cyclomatic 35) · ×1
  • PhutilCalendarRecurrenceRule.newDaysSet (cyclomatic 35) src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php:1178 — PhutilCalendarRecurrenceRule.newDaysSet has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorEditEngineConfigurationQuery.loadPage (cyclomatic 35) · ×1
  • PhabricatorEditEngineConfigurationQuery.loadPage (cyclomatic 35) src/applications/transactions/query/PhabricatorEditEngineConfigurationQuery.php:71 — PhabricatorEditEngineConfigurationQuery.loadPage has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorConduitAPIController.authenticateUser (cyclomatic 34) · ×1
  • PhabricatorConduitAPIController.authenticateUser (cyclomatic 34) src/applications/conduit/controller/PhabricatorConduitAPIController.php:167 — PhabricatorConduitAPIController.authenticateUser has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetOneUpRenderer.renderDocumentEngineBlocks (cyclomatic 34) · ×1
  • DifferentialChangesetOneUpRenderer.renderDocumentEngineBlocks (cyclomatic 34) src/applications/differential/render/DifferentialChangesetOneUpRenderer.php:270 — DifferentialChangesetOneUpRenderer.renderDocumentEngineBlocks has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConpherenceThreadSearchEngine.loadContextMessages (cyclomatic 33) · ×1
  • ConpherenceThreadSearchEngine.loadContextMessages (cyclomatic 33) src/applications/conpherence/query/ConpherenceThreadSearchEngine.php:233 — ConpherenceThreadSearchEngine.loadContextMessages has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorFactObjectController.handleRequest (cyclomatic 33) · ×1
  • PhabricatorFactObjectController.handleRequest (cyclomatic 33) src/applications/fact/controller/PhabricatorFactObjectController.php:6 — PhabricatorFactObjectController.handleRequest has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorInlineCommentController.processRequest (cyclomatic 33) · ×1
  • PhabricatorInlineCommentController.processRequest (cyclomatic 33) src/infrastructure/diff/PhabricatorInlineCommentController.php:93 — PhabricatorInlineCommentController.processRequest has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConpherenceUpdateController.handleRequest (cyclomatic 32) · ×1
  • ConpherenceUpdateController.handleRequest (cyclomatic 32) src/applications/conpherence/controller/ConpherenceUpdateController.php:6 — ConpherenceUpdateController.handleRequest has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhortunePaymentMethodCreateController.handleRequest (cyclomatic 32) · ×1
  • PhortunePaymentMethodCreateController.handleRequest (cyclomatic 32) src/applications/phortune/controller/paymentmethod/PhortunePaymentMethodCreateController.php:6 — PhortunePaymentMethodCreateController.handleRequest has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProjectBoardViewController.handleRequest (cyclomatic 32) · ×1
  • PhabricatorProjectBoardViewController.handleRequest (cyclomatic 32) src/applications/project/controller/PhabricatorProjectBoardViewController.php:10 — PhabricatorProjectBoardViewController.handleRequest has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProjectColumnBulkMoveController.handleRequest (cyclomatic 32) · ×1
  • PhabricatorProjectColumnBulkMoveController.handleRequest (cyclomatic 32) src/applications/project/controller/PhabricatorProjectColumnBulkMoveController.php:6 — PhabricatorProjectColumnBulkMoveController.handleRequest has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryManagementThawWorkflow.execute (cyclomatic 32) · ×1
  • PhabricatorRepositoryManagementThawWorkflow.execute (cyclomatic 32) src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php:49 — PhabricatorRepositoryManagementThawWorkflow.execute has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorEditEngine.buildResponse (cyclomatic 32) · ×1
  • PhabricatorEditEngine.buildResponse (cyclomatic 32) src/applications/transactions/editengine/PhabricatorEditEngine.php:882 — PhabricatorEditEngine.buildResponse has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorEditEngine.buildCommentResponse (cyclomatic 32) · ×1
  • PhabricatorEditEngine.buildCommentResponse (cyclomatic 32) src/applications/transactions/editengine/PhabricatorEditEngine.php:1875 — PhabricatorEditEngine.buildCommentResponse has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorAuthManagementStripWorkflow.execute (cyclomatic 31) · ×1
  • PhabricatorAuthManagementStripWorkflow.execute (cyclomatic 31) src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php:54 — PhabricatorAuthManagementStripWorkflow.execute has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryQuery.willFilterPage (cyclomatic 31) · ×1
  • PhabricatorRepositoryQuery.willFilterPage (cyclomatic 31) src/applications/repository/query/PhabricatorRepositoryQuery.php:236 — PhabricatorRepositoryQuery.willFilterPage has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorAphlictManagementWorkflow.parseLaunchArguments (cyclomatic 30) · ×1
  • PhabricatorAphlictManagementWorkflow.parseLaunchArguments (cyclomatic 30) src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php:27 — PhabricatorAphlictManagementWorkflow.parseLaunchArguments has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorAuthSessionEngine.newHighSecurityToken (cyclomatic 30) · ×1
  • PhabricatorAuthSessionEngine.newHighSecurityToken (cyclomatic 30) src/applications/auth/engine/PhabricatorAuthSessionEngine.php:446 — PhabricatorAuthSessionEngine.newHighSecurityToken has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetEngine.detectCopiedCode (cyclomatic 30) · ×1
  • DifferentialChangesetEngine.detectCopiedCode (cyclomatic 30) src/applications/differential/engine/DifferentialChangesetEngine.php:162 — DifferentialChangesetEngine.detectCopiedCode has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionCommitHookEngine.findMercurialChangegroupRefUpdates (cyclomatic 30) · ×1
  • DiffusionCommitHookEngine.findMercurialChangegroupRefUpdates (cyclomatic 30) src/applications/diffusion/engine/DiffusionCommitHookEngine.php:743 — DiffusionCommitHookEngine.findMercurialChangegroupRefUpdates has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeraldAdapter.willSaveCondition (cyclomatic 30) · ×1
  • HeraldAdapter.willSaveCondition (cyclomatic 30) src/applications/herald/adapter/HeraldAdapter.php:613 — HeraldAdapter.willSaveCondition has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · LegalpadDocumentSignController.handleRequest (cyclomatic 30) · ×1
  • LegalpadDocumentSignController.handleRequest (cyclomatic 30) src/applications/legalpad/controller/LegalpadDocumentSignController.php:24 — LegalpadDocumentSignController.handleRequest has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManiphestReportController.renderBurn (cyclomatic 30) · ×1
  • ManiphestReportController.renderBurn (cyclomatic 30) src/applications/maniphest/controller/ManiphestReportController.php:74 — ManiphestReportController.renderBurn has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManiphestReportController.renderOpenTasks (cyclomatic 30) · ×1
  • ManiphestReportController.renderOpenTasks (cyclomatic 30) src/applications/maniphest/controller/ManiphestReportController.php:487 — ManiphestReportController.renderOpenTasks has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManiphestTransactionEditor.buildMoveTransaction (cyclomatic 30) · ×1
  • ManiphestTransactionEditor.buildMoveTransaction (cyclomatic 30) src/applications/maniphest/editor/ManiphestTransactionEditor.php:438 — ManiphestTransactionEditor.buildMoveTransaction has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorApplicationQuery.loadPage (cyclomatic 30) · ×1
  • PhabricatorApplicationQuery.loadPage (cyclomatic 30) src/applications/meta/query/PhabricatorApplicationQuery.php:71 — PhabricatorApplicationQuery.loadPage has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhortunePayPalPaymentProvider.processControllerRequest (cyclomatic 30) · ×1
  • PhortunePayPalPaymentProvider.processControllerRequest (cyclomatic 30) src/applications/phortune/provider/PhortunePayPalPaymentProvider.php:287 — PhortunePayPalPaymentProvider.processControllerRequest has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildFerretWhereClause (cyclomatic 30) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildFerretWhereClause (cyclomatic 30) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:2208 — PhabricatorCursorPagedPolicyAwareQuery.buildFerretWhereClause has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIHeaderView.getTagContent (cyclomatic 30) · ×1
  • PHUIHeaderView.getTagContent (cyclomatic 30) src/view/phui/PHUIHeaderView.php:190 — PHUIHeaderView.getTagContent has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _update (cyclomatic 30) · ×1
  • _update (cyclomatic 30) webroot/rsrc/js/phuix/PHUIXAutocomplete.js:428 — _update has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PhabricatorCalendarEventQuery.willFilterPage (cyclomatic 29) · ×1
  • PhabricatorCalendarEventQuery.willFilterPage (cyclomatic 29) src/applications/calendar/query/PhabricatorCalendarEventQuery.php:515 — PhabricatorCalendarEventQuery.willFilterPage has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionBrowseQueryConduitAPIMethod.getGitResult (cyclomatic 29) · ×1
  • DiffusionBrowseQueryConduitAPIMethod.getGitResult (cyclomatic 29) src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:35 — DiffusionBrowseQueryConduitAPIMethod.getGitResult has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PassphraseCredentialEditController.handleRequest (cyclomatic 29) · ×1
  • PassphraseCredentialEditController.handleRequest (cyclomatic 29) src/applications/passphrase/controller/PassphraseCredentialEditController.php:5 — PassphraseCredentialEditController.handleRequest has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProjectQuery.buildWhereClauseParts (cyclomatic 29) · ×1
  • PhabricatorProjectQuery.buildWhereClauseParts (cyclomatic 29) src/applications/project/query/PhabricatorProjectQuery.php:457 — PhabricatorProjectQuery.buildWhereClauseParts has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorApplicationTransactionView.renderEvent (cyclomatic 29) · ×1
  • PhabricatorApplicationTransactionView.renderEvent (cyclomatic 29) src/applications/transactions/view/PhabricatorApplicationTransactionView.php:422 — PhabricatorApplicationTransactionView.renderEvent has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorTypeaheadModularDatasourceController.handleRequest (cyclomatic 29) · ×1
  • PhabricatorTypeaheadModularDatasourceController.handleRequest (cyclomatic 29) src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php:10 — PhabricatorTypeaheadModularDatasourceController.handleRequest has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · assist (cyclomatic 29) · ×1
  • assist (cyclomatic 29) webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js:188 — assist has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PhutilSpriteSheet.generate (cyclomatic 28) · ×1
  • PhutilSpriteSheet.generate (cyclomatic 28) src/aphront/sprite/PhutilSpriteSheet.php:57 — PhutilSpriteSheet.generate has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorCalendarNotificationEngine.sendNotifications (cyclomatic 28) · ×1
  • PhabricatorCalendarNotificationEngine.sendNotifications (cyclomatic 28) src/applications/calendar/notifications/PhabricatorCalendarNotificationEngine.php:73 — PhabricatorCalendarNotificationEngine.sendNotifications has cyclomatic complexity 28 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · DoorkeeperAsanaFeedWorker.publishFeedStory (cyclomatic 28) · ×1
  • DoorkeeperAsanaFeedWorker.publishFeedStory (cyclomatic 28) src/applications/doorkeeper/worker/DoorkeeperAsanaFeedWorker.php:27 — DoorkeeperAsanaFeedWorker.publishFeedStory has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorMailManagementShowOutboundWorkflow.execute (cyclomatic 28) · ×1
  • PhabricatorMailManagementShowOutboundWorkflow.execute (cyclomatic 28) src/applications/metamta/management/PhabricatorMailManagementShowOutboundWorkflow.php:29 — PhabricatorMailManagementShowOutboundWorkflow.execute has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPeopleNewController.handleRequest (cyclomatic 28) · ×1
  • PhabricatorPeopleNewController.handleRequest (cyclomatic 28) src/applications/people/controller/PhabricatorPeopleNewController.php:6 — PhabricatorPeopleNewController.handleRequest has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhrictionDocumentController.handleRequest (cyclomatic 28) · ×1
  • PhrictionDocumentController.handleRequest (cyclomatic 28) src/applications/phriction/controller/PhrictionDocumentController.php:13 — PhrictionDocumentController.handleRequest has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorBoardLayoutEngine.layoutBoard (cyclomatic 28) · ×1
  • PhabricatorBoardLayoutEngine.layoutBoard (cyclomatic 28) src/applications/project/engine/PhabricatorBoardLayoutEngine.php:419 — PhabricatorBoardLayoutEngine.layoutBoard has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilRemarkupListBlockRule.renderTree (cyclomatic 28) · ×1
  • PhutilRemarkupListBlockRule.renderTree (cyclomatic 28) src/infrastructure/markup/blockrule/PhutilRemarkupListBlockRule.php:428 — PhutilRemarkupListBlockRule.renderTree has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPolicyAwareQuery.execute (cyclomatic 28) · ×1
  • PhabricatorPolicyAwareQuery.execute (cyclomatic 28) src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:204 — PhabricatorPolicyAwareQuery.execute has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUITimelineEventView.render (cyclomatic 28) · ×1
  • PHUITimelineEventView.render (cyclomatic 28) src/view/phui/PHUITimelineEventView.php:318 — PHUITimelineEventView.render has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorAuditManagementDeleteWorkflow.execute (cyclomatic 27) · ×1
  • PhabricatorAuditManagementDeleteWorkflow.execute (cyclomatic 27) src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php:62 — PhabricatorAuditManagementDeleteWorkflow.execute has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorAuthStartController.handleRequest (cyclomatic 27) · ×1
  • PhabricatorAuthStartController.handleRequest (cyclomatic 27) src/applications/auth/controller/PhabricatorAuthStartController.php:10 — PhabricatorAuthStartController.handleRequest has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorAuthEditController.handleRequest (cyclomatic 27) · ×1
  • PhabricatorAuthEditController.handleRequest (cyclomatic 27) src/applications/auth/controller/config/PhabricatorAuthEditController.php:6 — PhabricatorAuthEditController.handleRequest has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorWebServerSetupCheck.executeChecks (cyclomatic 27) · ×1
  • PhabricatorWebServerSetupCheck.executeChecks (cyclomatic 27) src/applications/config/check/PhabricatorWebServerSetupCheck.php:9 — PhabricatorWebServerSetupCheck.executeChecks has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetOneUpRenderer.renderPrimitives (cyclomatic 27) · ×1
  • DifferentialChangesetOneUpRenderer.renderPrimitives (cyclomatic 27) src/applications/differential/render/DifferentialChangesetOneUpRenderer.php:47 — DifferentialChangesetOneUpRenderer.renderPrimitives has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HarbormasterBuildEngine.updateBuildSteps (cyclomatic 27) · ×1
  • HarbormasterBuildEngine.updateBuildSteps (cyclomatic 27) src/applications/harbormaster/engine/HarbormasterBuildEngine.php:165 — HarbormasterBuildEngine.updateBuildSteps has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilXHPASTSyntaxHighlighterFuture.applyXHPHighlight (cyclomatic 27) · ×1
  • PhutilXHPASTSyntaxHighlighterFuture.applyXHPHighlight (cyclomatic 27) src/infrastructure/markup/syntax/highlighter/xhpast/PhutilXHPASTSyntaxHighlighterFuture.php:31 — PhutilXHPASTSyntaxHighlighterFuture.applyXHPHighlight has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorCalendarEventQuery.loadPage (cyclomatic 26) · ×1
  • PhabricatorCalendarEventQuery.loadPage (cyclomatic 26) src/applications/calendar/query/PhabricatorCalendarEventQuery.php:161 — PhabricatorCalendarEventQuery.loadPage has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialHunkParser.parseHunksForHighlightMasks (cyclomatic 26) · ×1
  • DifferentialHunkParser.parseHunksForHighlightMasks (cyclomatic 26) src/applications/differential/parser/DifferentialHunkParser.php:566 — DifferentialHunkParser.parseHunksForHighlightMasks has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialReviewersView.render (cyclomatic 26) · ×1
  • DifferentialReviewersView.render (cyclomatic 26) src/applications/differential/view/DifferentialReviewersView.php:26 — DifferentialReviewersView.render has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionCommitController.buildPropertyListView (cyclomatic 26) · ×1
  • DiffusionCommitController.buildPropertyListView (cyclomatic 26) src/applications/diffusion/controller/DiffusionCommitController.php:524 — DiffusionCommitController.buildPropertyListView has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DivinerAtomController.handleRequest (cyclomatic 26) · ×1
  • DivinerAtomController.handleRequest (cyclomatic 26) src/applications/diviner/controller/DivinerAtomController.php:9 — DivinerAtomController.handleRequest has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultimeterSampleController.handleRequest (cyclomatic 26) · ×1
  • MultimeterSampleController.handleRequest (cyclomatic 26) src/applications/multimeter/controller/MultimeterSampleController.php:9 — MultimeterSampleController.handleRequest has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorObjectListQuery.execute (cyclomatic 26) · ×1
  • PhabricatorObjectListQuery.execute (cyclomatic 26) src/applications/phid/query/PhabricatorObjectListQuery.php:56 — PhabricatorObjectListQuery.execute has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorApplicationTransactionEditor.getTransactionOldValue (cyclomatic 26) · ×1
  • PhabricatorApplicationTransactionEditor.getTransactionOldValue (cyclomatic 26) src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:490 — PhabricatorApplicationTransactionEditor.getTransactionOldValue has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorDifferenceEngine.applyIntralineDiff (cyclomatic 26) · ×1
  • PhabricatorDifferenceEngine.applyIntralineDiff (cyclomatic 26) src/infrastructure/diff/PhabricatorDifferenceEngine.php:172 — PhabricatorDifferenceEngine.applyIntralineDiff has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIDiffTableOfContentsListView.render (cyclomatic 26) · ×1
  • PHUIDiffTableOfContentsListView.render (cyclomatic 26) src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php:53 — PHUIDiffTableOfContentsListView.render has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildSpacesWhereClause (cyclomatic 26) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildSpacesWhereClause (cyclomatic 26) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:3139 — PhabricatorCursorPagedPolicyAwareQuery.buildSpacesWhereClause has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · updateCard (cyclomatic 26) · ×1
  • updateCard (cyclomatic 26) webroot/rsrc/js/application/projects/WorkboardBoard.js:601 — updateCard has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Text_Figlet.loadFont (cyclomatic 25) · ×1
  • Text_Figlet.loadFont (cyclomatic 25) externals/pear-figlet/Text/Figlet.php:111 — Text_Figlet.loadFont has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorAuthManagementRevokeWorkflow.execute (cyclomatic 25) · ×1
  • PhabricatorAuthManagementRevokeWorkflow.execute (cyclomatic 25) src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php:50 — PhabricatorAuthManagementRevokeWorkflow.execute has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilCalendarRecurrenceSet.getEventsBetween (cyclomatic 25) · ×1
  • PhutilCalendarRecurrenceSet.getEventsBetween (cyclomatic 25) src/applications/calendar/parser/data/PhutilCalendarRecurrenceSet.php:23 — PhutilCalendarRecurrenceSet.getEventsBetween has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialHunkParser.makeContextDiff (cyclomatic 25) · ×1
  • DifferentialHunkParser.makeContextDiff (cyclomatic 25) src/applications/differential/parser/DifferentialHunkParser.php:665 — DifferentialHunkParser.makeContextDiff has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DivinerAtomQuery.willFilterPage (cyclomatic 25) · ×1
  • DivinerAtomQuery.willFilterPage (cyclomatic 25) src/applications/diviner/query/DivinerAtomQuery.php:139 — DivinerAtomQuery.willFilterPage has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorFeedStory.loadAllFromRows (cyclomatic 25) · ×1
  • PhabricatorFeedStory.loadAllFromRows (cyclomatic 25) src/applications/feed/story/PhabricatorFeedStory.php:41 — PhabricatorFeedStory.loadAllFromRows has cyclomatic complexity 25 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · PholioMockEditController.handleRequest (cyclomatic 25) · ×1
  • PholioMockEditController.handleRequest (cyclomatic 25) src/applications/pholio/controller/PholioMockEditController.php:5 — PholioMockEditController.handleRequest has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhrictionRemarkupRule.didMarkupText (cyclomatic 25) · ×1
  • PhrictionRemarkupRule.didMarkupText (cyclomatic 25) src/applications/phriction/markup/PhrictionRemarkupRule.php:86 — PhrictionRemarkupRule.didMarkupText has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPolicyEditController.handleRequest (cyclomatic 25) · ×1
  • PhabricatorPolicyEditController.handleRequest (cyclomatic 25) src/applications/policy/controller/PhabricatorPolicyEditController.php:6 — PhabricatorPolicyEditController.handleRequest has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPolicyFilter.apply (cyclomatic 25) · ×1
  • PhabricatorPolicyFilter.apply (cyclomatic 25) src/applications/policy/filter/PhabricatorPolicyFilter.php:156 — PhabricatorPolicyFilter.apply has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryQuery.buildWhereClauseParts (cyclomatic 25) · ×1
  • PhabricatorRepositoryQuery.buildWhereClauseParts (cyclomatic 25) src/applications/repository/query/PhabricatorRepositoryQuery.php:533 — PhabricatorRepositoryQuery.buildWhereClauseParts has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorFerretFulltextEngineExtension.indexFulltextObject (cyclomatic 25) · ×1
  • PhabricatorFerretFulltextEngineExtension.indexFulltextObject (cyclomatic 25) src/applications/search/engineextension/PhabricatorFerretFulltextEngineExtension.php:19 — PhabricatorFerretFulltextEngineExtension.indexFulltextObject has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIDiffGraphView.renderRawGraph (cyclomatic 25) · ×1
  • PHUIDiffGraphView.renderRawGraph (cyclomatic 25) src/infrastructure/diff/view/PHUIDiffGraphView.php:36 — PHUIDiffGraphView.renderRawGraph has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildFerretJoinClause (cyclomatic 25) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildFerretJoinClause (cyclomatic 25) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:1995 — PhabricatorCursorPagedPolicyAwareQuery.buildFerretJoinClause has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorActionView.render (cyclomatic 25) · ×1
  • PhabricatorActionView.render (cyclomatic 25) src/view/layout/PhabricatorActionView.php:198 — PhabricatorActionView.render has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialQueryConduitAPIMethod.execute (cyclomatic 24) · ×1
  • DifferentialQueryConduitAPIMethod.execute (cyclomatic 24) src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php:65 — DifferentialQueryConduitAPIMethod.execute has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionBrowseQueryConduitAPIMethod.getSVNResult (cyclomatic 24) · ×1
  • DiffusionBrowseQueryConduitAPIMethod.getSVNResult (cyclomatic 24) src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:363 — DiffusionBrowseQueryConduitAPIMethod.getSVNResult has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionCommitQuery.didFilterPage (cyclomatic 24) · ×1
  • DiffusionCommitQuery.didFilterPage (cyclomatic 24) src/applications/diffusion/query/DiffusionCommitQuery.php:361 — DiffusionCommitQuery.didFilterPage has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HarbormasterBuildViewController.handleRequest (cyclomatic 24) · ×1
  • HarbormasterBuildViewController.handleRequest (cyclomatic 24) src/applications/harbormaster/controller/HarbormasterBuildViewController.php:10 — HarbormasterBuildViewController.handleRequest has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeraldEngine.getRuleMatchResult (cyclomatic 24) · ×1
  • HeraldEngine.getRuleMatchResult (cyclomatic 24) src/applications/herald/engine/HeraldEngine.php:379 — HeraldEngine.getRuleMatchResult has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManiphestTaskQuery.buildWhereClauseParts (cyclomatic 24) · ×1
  • ManiphestTaskQuery.buildWhereClauseParts (cyclomatic 24) src/applications/maniphest/query/ManiphestTaskQuery.php:354 — ManiphestTaskQuery.buildWhereClauseParts has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManiphestTaskSearchEngine.buildQueryFromParameters (cyclomatic 24) · ×1
  • ManiphestTaskSearchEngine.buildQueryFromParameters (cyclomatic 24) src/applications/maniphest/query/ManiphestTaskSearchEngine.php:190 — ManiphestTaskSearchEngine.buildQueryFromParameters has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorMetaMTAMailViewController.buildDeliveryProperties (cyclomatic 24) · ×1
  • PhabricatorMetaMTAMailViewController.buildDeliveryProperties (cyclomatic 24) src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php:216 — PhabricatorMetaMTAMailViewController.buildDeliveryProperties has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorMailEmailEngine.newMessage (cyclomatic 24) · ×1
  • PhabricatorMailEmailEngine.newMessage (cyclomatic 24) src/applications/metamta/engine/PhabricatorMailEmailEngine.php:6 — PhabricatorMailEmailEngine.newMessage has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PassphraseQueryConduitAPIMethod.execute (cyclomatic 24) · ×1
  • PassphraseQueryConduitAPIMethod.execute (cyclomatic 24) src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php:31 — PassphraseQueryConduitAPIMethod.execute has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhrictionEditController.handleRequest (cyclomatic 24) · ×1
  • PhrictionEditController.handleRequest (cyclomatic 24) src/applications/phriction/controller/PhrictionEditController.php:6 — PhrictionEditController.handleRequest has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPolicyFilter.checkCapability (cyclomatic 24) · ×1
  • PhabricatorPolicyFilter.checkCapability (cyclomatic 24) src/applications/policy/filter/PhabricatorPolicyFilter.php:499 — PhabricatorPolicyFilter.checkCapability has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProjectQuery.willFilterPage (cyclomatic 24) · ×1
  • PhabricatorProjectQuery.willFilterPage (cyclomatic 24) src/applications/project/query/PhabricatorProjectQuery.php:239 — PhabricatorProjectQuery.willFilterPage has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProjectSearchEngine.buildQueryFromParameters (cyclomatic 24) · ×1
  • PhabricatorProjectSearchEngine.buildQueryFromParameters (cyclomatic 24) src/applications/project/query/PhabricatorProjectSearchEngine.php:130 — PhabricatorProjectSearchEngine.buildQueryFromParameters has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryPullLocalDaemon.run (cyclomatic 24) · ×1
  • PhabricatorRepositoryPullLocalDaemon.run (cyclomatic 24) src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:38 — PhabricatorRepositoryPullLocalDaemon.run has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorDatabaseRefParser.newRefs (cyclomatic 24) · ×1
  • PhabricatorDatabaseRefParser.newRefs (cyclomatic 24) src/infrastructure/cluster/PhabricatorDatabaseRefParser.php:37 — PhabricatorDatabaseRefParser.newRefs has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _onjumpkey (cyclomatic 24) · ×1
  • _onjumpkey (cyclomatic 24) webroot/rsrc/js/application/diff/DiffChangesetList.js:650 — _onjumpkey has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AphrontMultipartParser.continueParse (cyclomatic 23) · ×1
  • AphrontMultipartParser.continueParse (cyclomatic 23) src/aphront/multipartparser/AphrontMultipartParser.php:62 — AphrontMultipartParser.continueParse has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilICSParser.unescapeFieldValue (cyclomatic 23) · ×1
  • PhutilICSParser.unescapeFieldValue (cyclomatic 23) src/applications/calendar/parser/ics/PhutilICSParser.php:386 — PhutilICSParser.unescapeFieldValue has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DifferentialTransactionEditor.didApplyHeraldRules (cyclomatic 23) · ×1
  • DifferentialTransactionEditor.didApplyHeraldRules (cyclomatic 23) src/applications/differential/editor/DifferentialTransactionEditor.php:1034 — DifferentialTransactionEditor.didApplyHeraldRules has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetTwoUpRenderer.renderDocumentEngineBlocks (cyclomatic 23) · ×1
  • DifferentialChangesetTwoUpRenderer.renderDocumentEngineBlocks (cyclomatic 23) src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php:367 — DifferentialChangesetTwoUpRenderer.renderDocumentEngineBlocks has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionLowLevelResolveRefsQuery.resolveGitRefs (cyclomatic 23) · ×1
  • DiffusionLowLevelResolveRefsQuery.resolveGitRefs (cyclomatic 23) src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php:60 — DiffusionLowLevelResolveRefsQuery.resolveGitRefs has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DivinerAtomController.renderFullSignature (cyclomatic 23) · ×1
  • DivinerAtomController.renderFullSignature (cyclomatic 23) src/applications/diviner/controller/DivinerAtomController.php:472 — DivinerAtomController.renderFullSignature has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PhabricatorFileViewController.buildPropertyViews (cyclomatic 23) · ×1
  • PhabricatorFileViewController.buildPropertyViews (cyclomatic 23) src/applications/files/controller/PhabricatorFileViewController.php:218 — PhabricatorFileViewController.buildPropertyViews has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorEmbedFileRemarkupRule.renderImageFile (cyclomatic 23) · ×1
  • PhabricatorEmbedFileRemarkupRule.renderImageFile (cyclomatic 23) src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php:129 — PhabricatorEmbedFileRemarkupRule.renderImageFile has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeraldRuleQuery.willFilterPage (cyclomatic 23) · ×1
  • HeraldRuleQuery.willFilterPage (cyclomatic 23) src/applications/herald/query/HeraldRuleQuery.php:89 — HeraldRuleQuery.willFilterPage has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManiphestTaskDetailController.newChangesView (cyclomatic 23) · ×1
  • ManiphestTaskDetailController.newChangesView (cyclomatic 23) src/applications/maniphest/controller/ManiphestTaskDetailController.php:545 — ManiphestTaskDetailController.newChangesView has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPeopleProfilePictureController.handleRequest (cyclomatic 23) · ×1
  • PhabricatorPeopleProfilePictureController.handleRequest (cyclomatic 23) src/applications/people/controller/PhabricatorPeopleProfilePictureController.php:6 — PhabricatorPeopleProfilePictureController.handleRequest has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProjectDatasource.loadResults (cyclomatic 23) · ×1
  • PhabricatorProjectDatasource.loadResults (cyclomatic 23) src/applications/project/typeahead/PhabricatorProjectDatasource.php:18 — PhabricatorProjectDatasource.loadResults has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryGitCommitChangeParserWorker.parseCommitChanges (cyclomatic 23) · ×1
  • PhabricatorRepositoryGitCommitChangeParserWorker.parseCommitChanges (cyclomatic 23) src/applications/repository/worker/commitchangeparser/PhabricatorRepositoryGitCommitChangeParserWorker.php:6 — PhabricatorRepositoryGitCommitChangeParserWorker.parseCommitChanges has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TransactionSearchConduitAPIMethod.execute (cyclomatic 23) · ×1
  • TransactionSearchConduitAPIMethod.execute (cyclomatic 23) src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php:102 — TransactionSearchConduitAPIMethod.execute has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilRemarkupCodeBlockRule.markupText (cyclomatic 23) · ×1
  • PhutilRemarkupCodeBlockRule.markupText (cyclomatic 23) src/infrastructure/markup/blockrule/PhutilRemarkupCodeBlockRule.php:46 — PhutilRemarkupCodeBlockRule.markupText has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AphrontDialogView.render (cyclomatic 23) · ×1
  • AphrontDialogView.render (cyclomatic 23) src/view/AphrontDialogView.php:255 — AphrontDialogView.render has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 23) · ×1
  • (anonymous) (cyclomatic 23) webroot/rsrc/js/application/diffusion/behavior-commit-graph.js:8 — (anonymous) has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Porter.step2 (cyclomatic 22) · ×1
  • Porter.step2 (cyclomatic 22) externals/porter-stemmer/src/Porter.php:146 — Porter.step2 has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · xhprof_lib.xhprof_aggregate_runs (cyclomatic 22) · ×1
  • xhprof_lib.xhprof_aggregate_runs (cyclomatic 22) externals/xhprof/xhprof_lib.php:244 — xhprof_lib.xhprof_aggregate_runs has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CelerityResourceController.serveResource (cyclomatic 22) · ×1
  • CelerityResourceController.serveResource (cyclomatic 22) src/applications/celerity/controller/CelerityResourceController.php:27 — CelerityResourceController.serveResource has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorConfigEditController.handleRequest (cyclomatic 22) · ×1
  • PhabricatorConfigEditController.handleRequest (cyclomatic 22) src/applications/config/controller/settings/PhabricatorConfigEditController.php:6 — PhabricatorConfigEditController.handleRequest has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetParser.replaceTabsWithSpaces (cyclomatic 22) · ×1
  • DifferentialChangesetParser.replaceTabsWithSpaces (cyclomatic 22) src/applications/differential/parser/DifferentialChangesetParser.php:1615 — DifferentialChangesetParser.replaceTabsWithSpaces has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialRevisionQuery.buildWhereClause (cyclomatic 22) · ×1
  • DifferentialRevisionQuery.buildWhereClause (cyclomatic 22) src/applications/differential/query/DifferentialRevisionQuery.php:630 — DifferentialRevisionQuery.buildWhereClause has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialRevisionReviewersTransaction.renderReviewerEditTitle (cyclomatic 22) · ×1
  • DifferentialRevisionReviewersTransaction.renderReviewerEditTitle (cyclomatic 22) src/applications/differential/xaction/DifferentialRevisionReviewersTransaction.php:165 — DifferentialRevisionReviewersTransaction.renderReviewerEditTitle has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DivinerAtomQuery.buildWhereClause (cyclomatic 22) · ×1
  • DivinerAtomQuery.buildWhereClause (cyclomatic 22) src/applications/diviner/query/DivinerAtomQuery.php:302 — DivinerAtomQuery.buildWhereClause has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManiphestConduitAPIMethod.applyRequest (cyclomatic 22) · ×1
  • ManiphestConduitAPIMethod.applyRequest (cyclomatic 22) src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php:53 — ManiphestConduitAPIMethod.applyRequest has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorMailManagementSendTestWorkflow.execute (cyclomatic 22) · ×1
  • PhabricatorMailManagementSendTestWorkflow.execute (cyclomatic 22) src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php:72 — PhabricatorMailManagementSendTestWorkflow.execute has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPeopleInviteSendController.handleRequest (cyclomatic 22) · ×1
  • PhabricatorPeopleInviteSendController.handleRequest (cyclomatic 22) src/applications/people/controller/PhabricatorPeopleInviteSendController.php:6 — PhabricatorPeopleInviteSendController.handleRequest has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorApplicationSearchEngine.buildConduitResponse (cyclomatic 22) · ×1
  • PhabricatorApplicationSearchEngine.buildConduitResponse (cyclomatic 22) src/applications/search/engine/PhabricatorApplicationSearchEngine.php:1134 — PhabricatorApplicationSearchEngine.buildConduitResponse has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorSlowvoteEditController.handleRequest (cyclomatic 22) · ×1
  • PhabricatorSlowvoteEditController.handleRequest (cyclomatic 22) src/applications/slowvote/controller/PhabricatorSlowvoteEditController.php:6 — PhabricatorSlowvoteEditController.handleRequest has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorApplicationTransactionEditor.getTransactionNewValue (cyclomatic 22) · ×1
  • PhabricatorApplicationTransactionEditor.getTransactionNewValue (cyclomatic 22) src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:588 — PhabricatorApplicationTransactionEditor.getTransactionNewValue has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PhutilRemarkupListBlockRule.markupText (cyclomatic 22) · ×1
  • PhutilRemarkupListBlockRule.markupText (cyclomatic 22) src/infrastructure/markup/blockrule/PhutilRemarkupListBlockRule.php:88 — PhutilRemarkupListBlockRule.markupText has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Porter.step4 (cyclomatic 21) · ×1
  • Porter.step4 (cyclomatic 21) externals/porter-stemmer/src/Porter.php:240 — Porter.step4 has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PhutilCalendarRecurrenceRule.newYearMap (cyclomatic 21) · ×1
  • PhutilCalendarRecurrenceRule.newYearMap (cyclomatic 21) src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php:1349 — PhutilCalendarRecurrenceRule.newYearMap has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorConfigClusterRepositoriesController.buildClusterRepositoryStatus (cyclomatic 21) · ×1
  • PhabricatorConfigClusterRepositoriesController.buildClusterRepositoryStatus (cyclomatic 21) src/applications/config/controller/services/PhabricatorConfigClusterRepositoriesController.php:46 — PhabricatorConfigClusterRepositoriesController.buildClusterRepositoryStatus has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorDashboardPanelTabsController.handleRequest (cyclomatic 21) · ×1
  • PhabricatorDashboardPanelTabsController.handleRequest (cyclomatic 21) src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php:17 — PhabricatorDashboardPanelTabsController.handleRequest has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorDashboardTabsPanelType.renderPanelContent (cyclomatic 21) · ×1
  • PhabricatorDashboardTabsPanelType.renderPanelContent (cyclomatic 21) src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:46 — PhabricatorDashboardTabsPanelType.renderPanelContent has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialTransactionEditor.expandTransaction (cyclomatic 21) · ×1
  • DifferentialTransactionEditor.expandTransaction (cyclomatic 21) src/applications/differential/editor/DifferentialTransactionEditor.php:152 — DifferentialTransactionEditor.expandTransaction has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialTransactionEditor.updateReviewStatus (cyclomatic 21) · ×1
  • DifferentialTransactionEditor.updateReviewStatus (cyclomatic 21) src/applications/differential/editor/DifferentialTransactionEditor.php:403 — DifferentialTransactionEditor.updateReviewStatus has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionSymbolController.handleRequest (cyclomatic 21) · ×1
  • DiffusionSymbolController.handleRequest (cyclomatic 21) src/applications/diffusion/controller/DiffusionSymbolController.php:5 — DiffusionSymbolController.handleRequest has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionGitUploadPackWireProtocol.willReadBytes (cyclomatic 21) · ×1
  • DiffusionGitUploadPackWireProtocol.willReadBytes (cyclomatic 21) src/applications/diffusion/protocol/DiffusionGitUploadPackWireProtocol.php:16 — DiffusionGitUploadPackWireProtocol.willReadBytes has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionMercurialWireClientSSHProtocolChannel.decodeStream (cyclomatic 21) · ×1
  • DiffusionMercurialWireClientSSHProtocolChannel.decodeStream (cyclomatic 21) src/applications/diffusion/ssh/DiffusionMercurialWireClientSSHProtocolChannel.php:79 — DiffusionMercurialWireClientSSHProtocolChannel.decodeStream has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorFileQuery.buildWhereClauseParts (cyclomatic 21) · ×1
  • PhabricatorFileQuery.buildWhereClauseParts (cyclomatic 21) src/applications/files/query/PhabricatorFileQuery.php:396 — PhabricatorFileQuery.buildWhereClauseParts has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeraldAction.loadStandardTargets (cyclomatic 21) · ×1
  • HeraldAction.loadStandardTargets (cyclomatic 21) src/applications/herald/action/HeraldAction.php:206 — HeraldAction.loadStandardTargets has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorMentionRemarkupRule.didMarkupText (cyclomatic 21) · ×1
  • PhabricatorMentionRemarkupRule.didMarkupText (cyclomatic 21) src/applications/people/markup/PhabricatorMentionRemarkupRule.php:57 — PhabricatorMentionRemarkupRule.didMarkupText has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhrictionDocumentQuery.buildWhereClauseParts (cyclomatic 21) · ×1
  • PhrictionDocumentQuery.buildWhereClauseParts (cyclomatic 21) src/applications/phriction/query/PhrictionDocumentQuery.php:199 — PhrictionDocumentQuery.buildWhereClauseParts has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryPullEngine.pullRepositoryWithLock (cyclomatic 21) · ×1
  • PhabricatorRepositoryPullEngine.pullRepositoryWithLock (cyclomatic 21) src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:51 — PhabricatorRepositoryPullEngine.pullRepositoryWithLock has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorSearchHovercardController.handleRequest (cyclomatic 21) · ×1
  • PhabricatorSearchHovercardController.handleRequest (cyclomatic 21) src/applications/search/controller/PhabricatorSearchHovercardController.php:10 — PhabricatorSearchHovercardController.handleRequest has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProfileMenuEngine.buildItemConfigureContent (cyclomatic 21) · ×1
  • PhabricatorProfileMenuEngine.buildItemConfigureContent (cyclomatic 21) src/applications/search/engine/PhabricatorProfileMenuEngine.php:683 — PhabricatorProfileMenuEngine.buildItemConfigureContent has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorSearchResultView.emboldenQuery (cyclomatic 21) · ×1
  • PhabricatorSearchResultView.emboldenQuery (cyclomatic 21) src/applications/search/view/PhabricatorSearchResultView.php:59 — PhabricatorSearchResultView.emboldenQuery has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorSubscriptionsHeraldAction.applySubscribe (cyclomatic 21) · ×1
  • PhabricatorSubscriptionsHeraldAction.applySubscribe (cyclomatic 21) src/applications/subscriptions/herald/PhabricatorSubscriptionsHeraldAction.php:19 — PhabricatorSubscriptionsHeraldAction.applySubscribe has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIDiffTableOfContentsListView.newComponentView (cyclomatic 21) · ×1
  • PHUIDiffTableOfContentsListView.newComponentView (cyclomatic 21) src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php:387 — PHUIDiffTableOfContentsListView.newComponentView has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildPagingClauseFromMultipleColumns (cyclomatic 21) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildPagingClauseFromMultipleColumns (cyclomatic 21) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:727 — PhabricatorCursorPagedPolicyAwareQuery.buildPagingClauseFromMultipleColumns has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorStandardPageView.willRenderPage (cyclomatic 21) · ×1
  • PhabricatorStandardPageView.willRenderPage (cyclomatic 21) src/view/page/PhabricatorStandardPageView.php:199 — PhabricatorStandardPageView.willRenderPage has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redraw (cyclomatic 21) · ×1
  • redraw (cyclomatic 21) webroot/rsrc/js/application/diff/DiffTreeView.js:87 — redraw has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Text_Figlet.lineEcho (cyclomatic 20) · ×1
  • Text_Figlet.lineEcho (cyclomatic 20) externals/pear-figlet/Text/Figlet.php:269 — Text_Figlet.lineEcho has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Text_Figlet._rep (cyclomatic 20) · ×1
  • Text_Figlet._rep (cyclomatic 20) externals/pear-figlet/Text/Figlet.php:390 — Text_Figlet._rep has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHPMailerLite.WrapText (cyclomatic 20) · ×1
  • PHPMailerLite.WrapText (cyclomatic 20) externals/phpmailer/class.phpmailer-lite.php:785 — PHPMailerLite.WrapText has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHPMailer.WrapText (cyclomatic 20) · ×1
  • PHPMailer.WrapText (cyclomatic 20) externals/phpmailer/class.phpmailer.php:916 — PHPMailer.WrapText has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Porter.step1ab (cyclomatic 20) · ×1
  • Porter.step1ab (cyclomatic 20) externals/porter-stemmer/src/Porter.php:83 — Porter.step1ab has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PhabricatorAuthOneTimeLoginController.handleRequest (cyclomatic 20) · ×1
  • PhabricatorAuthOneTimeLoginController.handleRequest (cyclomatic 20) src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php:10 — PhabricatorAuthOneTimeLoginController.handleRequest has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorEmailLoginController.handleRequest (cyclomatic 20) · ×1
  • PhabricatorEmailLoginController.handleRequest (cyclomatic 20) src/applications/auth/controller/PhabricatorEmailLoginController.php:10 — PhabricatorEmailLoginController.handleRequest has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorAuthInviteAction.newActionListFromAddresses (cyclomatic 20) · ×1
  • PhabricatorAuthInviteAction.newActionListFromAddresses (cyclomatic 20) src/applications/auth/data/PhabricatorAuthInviteAction.php:94 — PhabricatorAuthInviteAction.newActionListFromAddresses has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorAuthPasswordEngine.checkNewPassword (cyclomatic 20) · ×1
  • PhabricatorAuthPasswordEngine.checkNewPassword (cyclomatic 20) src/applications/auth/engine/PhabricatorAuthPasswordEngine.php:57 — PhabricatorAuthPasswordEngine.checkNewPassword has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorCalendarEventCancelController.handleRequest (cyclomatic 20) · ×1
  • PhabricatorCalendarEventCancelController.handleRequest (cyclomatic 20) src/applications/calendar/controller/PhabricatorCalendarEventCancelController.php:6 — PhabricatorCalendarEventCancelController.handleRequest has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilCalendarRecurrenceRule.advanceCursorState (cyclomatic 20) · ×1
  • PhutilCalendarRecurrenceRule.advanceCursorState (cyclomatic 20) src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php:1685 — PhutilCalendarRecurrenceRule.advanceCursorState has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PhabricatorCalendarEventQuery.buildWhereClauseParts (cyclomatic 20) · ×1
  • PhabricatorCalendarEventQuery.buildWhereClauseParts (cyclomatic 20) src/applications/calendar/query/PhabricatorCalendarEventQuery.php:357 — PhabricatorCalendarEventQuery.buildWhereClauseParts has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorConduitAPIController.handleRequest (cyclomatic 20) · ×1
  • PhabricatorConduitAPIController.handleRequest (cyclomatic 20) src/applications/conduit/controller/PhabricatorConduitAPIController.php:10 — PhabricatorConduitAPIController.handleRequest has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DarkConsoleServicesPlugin.generateData (cyclomatic 20) · ×1
  • DarkConsoleServicesPlugin.generateData (cyclomatic 20) src/applications/console/plugin/DarkConsoleServicesPlugin.php:47 — DarkConsoleServicesPlugin.generateData has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialGetCommitMessageConduitAPIMethod.execute (cyclomatic 20) · ×1
  • DifferentialGetCommitMessageConduitAPIMethod.execute (cyclomatic 20) src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php:34 — DifferentialGetCommitMessageConduitAPIMethod.execute has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialTransactionEditor.buildMailBody (cyclomatic 20) · ×1
  • DifferentialTransactionEditor.buildMailBody (cyclomatic 20) src/applications/differential/editor/DifferentialTransactionEditor.php:662 — DifferentialTransactionEditor.buildMailBody has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionController.buildCrumbList (cyclomatic 20) · ×1
  • DiffusionController.buildCrumbList (cyclomatic 20) src/applications/diffusion/controller/DiffusionController.php:128 — DiffusionController.buildCrumbList has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionLowLevelResolveRefsQuery.resolveMercurialRefs (cyclomatic 20) · ×1
  • DiffusionLowLevelResolveRefsQuery.resolveMercurialRefs (cyclomatic 20) src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php:243 — DiffusionLowLevelResolveRefsQuery.resolveMercurialRefs has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HarbormasterBuildEngine.updateBuildable (cyclomatic 20) · ×1
  • HarbormasterBuildEngine.updateBuildable (cyclomatic 20) src/applications/harbormaster/engine/HarbormasterBuildEngine.php:442 — HarbormasterBuildEngine.updateBuildable has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManiphestTaskStatus.validateConfiguration (cyclomatic 20) · ×1
  • ManiphestTaskStatus.validateConfiguration (cyclomatic 20) src/applications/maniphest/constants/ManiphestTaskStatus.php:261 — ManiphestTaskStatus.validateConfiguration has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPeopleTestDataGenerator.generateUsername (cyclomatic 20) · ×1
  • PhabricatorPeopleTestDataGenerator.generateUsername (cyclomatic 20) src/applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php:44 — PhabricatorPeopleTestDataGenerator.generateUsername has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhortuneCartCheckoutController.handleCartRequest (cyclomatic 20) · ×1
  • PhortuneCartCheckoutController.handleCartRequest (cyclomatic 20) src/applications/phortune/controller/cart/PhortuneCartCheckoutController.php:14 — PhortuneCartCheckoutController.handleCartRequest has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PhabricatorBulkManagementExportWorkflow.newQueries (cyclomatic 20) · ×1
  • PhabricatorBulkManagementExportWorkflow.newQueries (cyclomatic 20) src/applications/transactions/bulk/management/PhabricatorBulkManagementExportWorkflow.php:152 — PhabricatorBulkManagementExportWorkflow.newQueries has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIObjectBoxView.getTagContent (cyclomatic 20) · ×1
  • PHUIObjectBoxView.getTagContent (cyclomatic 20) src/view/phui/PHUIObjectBoxView.php:181 — PHUIObjectBoxView.getTagContent has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIObjectItemView.getTagAttributes (cyclomatic 20) · ×1
  • PHUIObjectItemView.getTagAttributes (cyclomatic 20) src/view/phui/PHUIObjectItemView.php:287 — PHUIObjectItemView.getTagAttributes has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SMTP.Data (cyclomatic 19) · ×1
  • SMTP.Data (cyclomatic 19) externals/phpmailer/class.smtp.php:326 — SMTP.Data has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AphrontHTTPHeaderParser.getHeaderContentAsPairs (cyclomatic 19) · ×1
  • AphrontHTTPHeaderParser.getHeaderContentAsPairs (cyclomatic 19) src/aphront/headerparser/AphrontHTTPHeaderParser.php:34 — AphrontHTTPHeaderParser.getHeaderContentAsPairs has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilCalendarRecurrenceRule.resetSource (cyclomatic 19) · ×1
  • PhutilCalendarRecurrenceRule.resetSource (cyclomatic 19) src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php:566 — PhutilCalendarRecurrenceRule.resetSource has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PhabricatorBinariesSetupCheck.executeChecks (cyclomatic 19) · ×1
  • PhabricatorBinariesSetupCheck.executeChecks (cyclomatic 19) src/applications/config/check/PhabricatorBinariesSetupCheck.php:9 — PhabricatorBinariesSetupCheck.executeChecks has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorExtraConfigSetupCheck.executeChecks (cyclomatic 19) · ×1
  • PhabricatorExtraConfigSetupCheck.executeChecks (cyclomatic 19) src/applications/config/check/PhabricatorExtraConfigSetupCheck.php:9 — PhabricatorExtraConfigSetupCheck.executeChecks has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetRenderer.buildPrimitives (cyclomatic 19) · ×1
  • DifferentialChangesetRenderer.buildPrimitives (cyclomatic 19) src/applications/differential/render/DifferentialChangesetRenderer.php:453 — DifferentialChangesetRenderer.buildPrimitives has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialLocalCommitsView.render (cyclomatic 19) · ×1
  • DifferentialLocalCommitsView.render (cyclomatic 19) src/applications/differential/view/DifferentialLocalCommitsView.php:19 — DifferentialLocalCommitsView.render has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionRepositoryStorageManagementPanel.buildClusterStatusPanel (cyclomatic 19) · ×1
  • DiffusionRepositoryStorageManagementPanel.buildClusterStatusPanel (cyclomatic 19) src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php:79 — DiffusionRepositoryStorageManagementPanel.buildClusterStatusPanel has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorFilesManagementMigrateWorkflow.execute (cyclomatic 19) · ×1
  • PhabricatorFilesManagementMigrateWorkflow.execute (cyclomatic 19) src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php:57 — PhabricatorFilesManagementMigrateWorkflow.execute has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorOAuthServerTokenController.handleRequest (cyclomatic 19) · ×1
  • PhabricatorOAuthServerTokenController.handleRequest (cyclomatic 19) src/applications/oauthserver/controller/PhabricatorOAuthServerTokenController.php:17 — PhabricatorOAuthServerTokenController.handleRequest has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorOwnersPackageQuery.getControllingPackagesForPath (cyclomatic 19) · ×1
  • PhabricatorOwnersPackageQuery.getControllingPackagesForPath (cyclomatic 19) src/applications/owners/query/PhabricatorOwnersPackageQuery.php:369 — PhabricatorOwnersPackageQuery.getControllingPackagesForPath has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPeopleQuery.fillUserCaches (cyclomatic 19) · ×1
  • PhabricatorPeopleQuery.fillUserCaches (cyclomatic 19) src/applications/people/query/PhabricatorPeopleQuery.php:514 — PhabricatorPeopleQuery.fillUserCaches has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhortuneCartCancelController.handleCartRequest (cyclomatic 19) · ×1
  • PhortuneCartCancelController.handleCartRequest (cyclomatic 19) src/applications/phortune/controller/cart/PhortuneCartCancelController.php:14 — PhortuneCartCancelController.handleCartRequest has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPhortuneManagementInvoiceWorkflow.execute (cyclomatic 19) · ×1
  • PhabricatorPhortuneManagementInvoiceWorkflow.execute (cyclomatic 19) src/applications/phortune/management/PhabricatorPhortuneManagementInvoiceWorkflow.php:49 — PhabricatorPhortuneManagementInvoiceWorkflow.execute has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhortunePayPalPaymentProvider.updateCharge (cyclomatic 19) · ×1
  • PhortunePayPalPaymentProvider.updateCharge (cyclomatic 19) src/applications/phortune/provider/PhortunePayPalPaymentProvider.php:194 — PhortunePayPalPaymentProvider.updateCharge has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PhrictionDocumentQuery.willFilterPage (cyclomatic 19) · ×1
  • PhrictionDocumentQuery.willFilterPage (cyclomatic 19) src/applications/phriction/query/PhrictionDocumentQuery.php:69 — PhrictionDocumentQuery.willFilterPage has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · PhabricatorProjectIconSet.validateConfiguration (cyclomatic 19) · ×1
  • PhabricatorProjectIconSet.validateConfiguration (cyclomatic 19) src/applications/project/icon/PhabricatorProjectIconSet.php:195 — PhabricatorProjectIconSet.validateConfiguration has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryManagementParentsWorkflow.rebuildRepository (cyclomatic 19) · ×1
  • PhabricatorRepositoryManagementParentsWorkflow.rebuildRepository (cyclomatic 19) src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php:49 — PhabricatorRepositoryManagementParentsWorkflow.rebuildRepository has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.execute (cyclomatic 19) · ×1
  • PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.execute (cyclomatic 19) src/applications/repository/management/PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.php:63 — PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.execute has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorSearchRelationshipController.handleRequest (cyclomatic 19) · ×1
  • PhabricatorSearchRelationshipController.handleRequest (cyclomatic 19) src/applications/search/controller/PhabricatorSearchRelationshipController.php:6 — PhabricatorSearchRelationshipController.handleRequest has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorApplicationTransactionEditor.addHeadersAndCommentsToMailBody (cyclomatic 19) · ×1
  • PhabricatorApplicationTransactionEditor.addHeadersAndCommentsToMailBody (cyclomatic 19) src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3859 — PhabricatorApplicationTransactionEditor.addHeadersAndCommentsToMailBody has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilProseDifferenceEngine.buildDiff (cyclomatic 19) · ×1
  • PhutilProseDifferenceEngine.buildDiff (cyclomatic 19) src/infrastructure/diff/prose/PhutilProseDifferenceEngine.php:9 — PhutilProseDifferenceEngine.buildDiff has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorDiffInlineCommentQuery.willFilterPage (cyclomatic 19) · ×1
  • PhabricatorDiffInlineCommentQuery.willFilterPage (cyclomatic 19) src/infrastructure/diff/query/PhabricatorDiffInlineCommentQuery.php:144 — PhabricatorDiffInlineCommentQuery.willFilterPage has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorJavelinLinter.lintPath (cyclomatic 19) · ×1
  • PhabricatorJavelinLinter.lintPath (cyclomatic 19) src/infrastructure/lint/linter/PhabricatorJavelinLinter.php:104 — PhabricatorJavelinLinter.lintPath has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorManagementWorkflow.loadUsersFromArguments (cyclomatic 19) · ×1
  • PhabricatorManagementWorkflow.loadUsersFromArguments (cyclomatic 19) src/infrastructure/management/PhabricatorManagementWorkflow.php:70 — PhabricatorManagementWorkflow.loadUsersFromArguments has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildEdgeLogicJoinClause (cyclomatic 19) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildEdgeLogicJoinClause (cyclomatic 19) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:2694 — PhabricatorCursorPagedPolicyAwareQuery.buildEdgeLogicJoinClause has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · PhabricatorRemarkupControl.renderInput (cyclomatic 19) · ×1
  • PhabricatorRemarkupControl.renderInput (cyclomatic 19) src/view/form/control/PhabricatorRemarkupControl.php:52 — PhabricatorRemarkupControl.renderInput has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorMainMenuView.render (cyclomatic 19) · ×1
  • PhabricatorMainMenuView.render (cyclomatic 19) src/view/page/menu/PhabricatorMainMenuView.php:51 — PhabricatorMainMenuView.render has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIPagerView.render (cyclomatic 19) · ×1
  • PHUIPagerView.render (cyclomatic 19) src/view/phui/PHUIPagerView.php:119 — PHUIPagerView.render has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _getFragmentLocation (cyclomatic 19) · ×1
  • _getFragmentLocation (cyclomatic 19) webroot/rsrc/js/application/diff/DiffChangesetList.js:2643 — _getFragmentLocation has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PhabricatorDuoAuthFactor.processAddFactorForm (cyclomatic 18) · ×1
  • PhabricatorDuoAuthFactor.processAddFactorForm (cyclomatic 18) src/applications/auth/factor/PhabricatorDuoAuthFactor.php:155 — PhabricatorDuoAuthFactor.processAddFactorForm has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorConfigConsoleController.loadVersions (cyclomatic 18) · ×1
  • PhabricatorConfigConsoleController.loadVersions (cyclomatic 18) src/applications/config/controller/PhabricatorConfigConsoleController.php:139 — PhabricatorConfigConsoleController.loadVersions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorDashboardObjectInstallWorkflow.handleRequest (cyclomatic 18) · ×1
  • PhabricatorDashboardObjectInstallWorkflow.handleRequest (cyclomatic 18) src/applications/dashboard/install/PhabricatorDashboardObjectInstallWorkflow.php:10 — PhabricatorDashboardObjectInstallWorkflow.handleRequest has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialTransactionEditor.didApplyTransactions (cyclomatic 18) · ×1
  • DifferentialTransactionEditor.didApplyTransactions (cyclomatic 18) src/applications/differential/editor/DifferentialTransactionEditor.php:1529 — DifferentialTransactionEditor.didApplyTransactions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialCommitMessageParser.parseCorpus (cyclomatic 18) · ×1
  • DifferentialCommitMessageParser.parseCorpus (cyclomatic 18) src/applications/differential/parser/DifferentialCommitMessageParser.php:136 — DifferentialCommitMessageParser.parseCorpus has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialRevisionListView.render (cyclomatic 18) · ×1
  • DifferentialRevisionListView.render (cyclomatic 18) src/applications/differential/view/DifferentialRevisionListView.php:50 — DifferentialRevisionListView.render has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionLintSaveRunner.run (cyclomatic 18) · ×1
  • DiffusionLintSaveRunner.run (cyclomatic 18) src/applications/diffusion/DiffusionLintSaveRunner.php:45 — DiffusionLintSaveRunner.run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionRefTableController.handleRequest (cyclomatic 18) · ×1
  • DiffusionRefTableController.handleRequest (cyclomatic 18) src/applications/diffusion/controller/DiffusionRefTableController.php:9 — DiffusionRefTableController.handleRequest has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionRepositoryProfilePictureController.handleRequest (cyclomatic 18) · ×1
  • DiffusionRepositoryProfilePictureController.handleRequest (cyclomatic 18) src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php:6 — DiffusionRepositoryProfilePictureController.handleRequest has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionSubversionWireProtocol.writeData (cyclomatic 18) · ×1
  • DiffusionSubversionWireProtocol.writeData (cyclomatic 18) src/applications/diffusion/protocol/DiffusionSubversionWireProtocol.php:31 — DiffusionSubversionWireProtocol.writeData has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionCommitGraphView.newObjectItemViews (cyclomatic 18) · ×1
  • DiffusionCommitGraphView.newObjectItemViews (cyclomatic 18) src/applications/diffusion/view/DiffusionCommitGraphView.php:105 — DiffusionCommitGraphView.newObjectItemViews has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorChartStackedAreaDataset.newChartDisplayData (cyclomatic 18) · ×1
  • PhabricatorChartStackedAreaDataset.newChartDisplayData (cyclomatic 18) src/applications/fact/chart/PhabricatorChartStackedAreaDataset.php:19 — PhabricatorChartStackedAreaDataset.newChartDisplayData has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorChartRenderingEngine.newTabularView (cyclomatic 18) · ×1
  • PhabricatorChartRenderingEngine.newTabularView (cyclomatic 18) src/applications/fact/engine/PhabricatorChartRenderingEngine.php:112 — PhabricatorChartRenderingEngine.newTabularView has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · PhabricatorFileDataController.handleRequest (cyclomatic 18) · ×1
  • PhabricatorFileDataController.handleRequest (cyclomatic 18) src/applications/files/controller/PhabricatorFileDataController.php:17 — PhabricatorFileDataController.handleRequest has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorFileQuery.loadPage (cyclomatic 18) · ×1
  • PhabricatorFileQuery.loadPage (cyclomatic 18) src/applications/files/query/PhabricatorFileQuery.php:166 — PhabricatorFileQuery.loadPage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HarbormasterUIEventListener.handlePropertyEvent (cyclomatic 18) · ×1
  • HarbormasterUIEventListener.handlePropertyEvent (cyclomatic 18) src/applications/harbormaster/event/HarbormasterUIEventListener.php:18 — HarbormasterUIEventListener.handlePropertyEvent has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeraldRuleController.saveRule (cyclomatic 18) · ×1
  • HeraldRuleController.saveRule (cyclomatic 18) src/applications/herald/controller/HeraldRuleController.php:263 — HeraldRuleController.saveRule has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeraldEngine.applyRules (cyclomatic 18) · ×1
  • HeraldEngine.applyRules (cyclomatic 18) src/applications/herald/engine/HeraldEngine.php:126 — HeraldEngine.applyRules has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeraldEngine.applyEffects (cyclomatic 18) · ×1
  • HeraldEngine.applyEffects (cyclomatic 18) src/applications/herald/engine/HeraldEngine.php:258 — HeraldEngine.applyEffects has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorMacroQuery.buildWhereClauseParts (cyclomatic 18) · ×1
  • PhabricatorMacroQuery.buildWhereClauseParts (cyclomatic 18) src/applications/macro/query/PhabricatorMacroQuery.php:103 — PhabricatorMacroQuery.buildWhereClauseParts has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorMailSMTPAdapter.sendMessage (cyclomatic 18) · ×1
  • PhabricatorMailSMTPAdapter.sendMessage (cyclomatic 18) src/applications/metamta/adapter/PhabricatorMailSMTPAdapter.php:47 — PhabricatorMailSMTPAdapter.sendMessage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorNotificationServersConfigType.validateStoredValue (cyclomatic 18) · ×1
  • PhabricatorNotificationServersConfigType.validateStoredValue (cyclomatic 18) src/applications/notification/config/PhabricatorNotificationServersConfigType.php:8 — PhabricatorNotificationServersConfigType.validateStoredValue has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NuanceGitHubImportCursor.pullDataFromSource (cyclomatic 18) · ×1
  • NuanceGitHubImportCursor.pullDataFromSource (cyclomatic 18) src/applications/nuance/cursor/NuanceGitHubImportCursor.php:56 — NuanceGitHubImportCursor.pullDataFromSource has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorOAuthServerAuthController.handleRequest (cyclomatic 18) · ×1
  • PhabricatorOAuthServerAuthController.handleRequest (cyclomatic 18) src/applications/oauthserver/controller/PhabricatorOAuthServerAuthController.php:12 — PhabricatorOAuthServerAuthController.handleRequest has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPolicyFilter.applyExtendedPolicyChecks (cyclomatic 18) · ×1
  • PhabricatorPolicyFilter.applyExtendedPolicyChecks (cyclomatic 18) src/applications/policy/filter/PhabricatorPolicyFilter.php:299 — PhabricatorPolicyFilter.applyExtendedPolicyChecks has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryGraphCache.loadLastModifiedCommitID (cyclomatic 18) · ×1
  • PhabricatorRepositoryGraphCache.loadLastModifiedCommitID (cyclomatic 18) src/applications/repository/graphcache/PhabricatorRepositoryGraphCache.php:75 — PhabricatorRepositoryGraphCache.loadLastModifiedCommitID has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProfileMenuItemView.newListItemView (cyclomatic 18) · ×1
  • PhabricatorProfileMenuItemView.newListItemView (cyclomatic 18) src/applications/search/engine/PhabricatorProfileMenuItemView.php:138 — PhabricatorProfileMenuItemView.newListItemView has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorSSHPassthruCommand.execute (cyclomatic 18) · ×1
  • PhabricatorSSHPassthruCommand.execute (cyclomatic 18) src/infrastructure/ssh/PhabricatorSSHPassthruCommand.php:87 — PhabricatorSSHPassthruCommand.execute has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIListItemView.getTagContent (cyclomatic 18) · ×1
  • PHUIListItemView.getTagContent (cyclomatic 18) src/view/phui/PHUIListItemView.php:286 — PHUIListItemView.getTagContent has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUITimelineView.buildEvents (cyclomatic 18) · ×1
  • PHUITimelineView.buildEvents (cyclomatic 18) src/view/phui/PHUITimelineView.php:101 — PHUITimelineView.buildEvents has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · getSelectableItems (cyclomatic 18) · ×1
  • getSelectableItems (cyclomatic 18) webroot/rsrc/js/application/diff/DiffChangeset.js:435 — getSelectableItems has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PHPMailer.CreateHeader (cyclomatic 17) · ×1
  • PHPMailer.CreateHeader (cyclomatic 17) externals/phpmailer/class.phpmailer.php:1057 — PHPMailer.CreateHeader has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorConfigClusterDatabasesController.buildClusterDatabaseStatus (cyclomatic 17) · ×1
  • PhabricatorConfigClusterDatabasesController.buildClusterDatabaseStatus (cyclomatic 17) src/applications/config/controller/services/PhabricatorConfigClusterDatabasesController.php:36 — PhabricatorConfigClusterDatabasesController.buildClusterDatabaseStatus has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConpherenceViewController.handleRequest (cyclomatic 17) · ×1
  • ConpherenceViewController.handleRequest (cyclomatic 17) src/applications/conpherence/controller/ConpherenceViewController.php:12 — ConpherenceViewController.handleRequest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConpherenceThreadSearchEngine.renderResultList (cyclomatic 17) · ×1
  • ConpherenceThreadSearchEngine.renderResultList (cyclomatic 17) src/applications/conpherence/query/ConpherenceThreadSearchEngine.php:94 — ConpherenceThreadSearchEngine.renderResultList has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetParser.newDocumentEngine (cyclomatic 17) · ×1
  • DifferentialChangesetParser.newDocumentEngine (cyclomatic 17) src/applications/differential/parser/DifferentialChangesetParser.php:1746 — DifferentialChangesetParser.newDocumentEngine has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialChangesetOneUpMailRenderer.renderPrimitives (cyclomatic 17) · ×1
  • DifferentialChangesetOneUpMailRenderer.renderPrimitives (cyclomatic 17) src/applications/differential/render/DifferentialChangesetOneUpMailRenderer.php:43 — DifferentialChangesetOneUpMailRenderer.renderPrimitives has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialRevisionUpdateHistoryView.render (cyclomatic 17) · ×1
  • DifferentialRevisionUpdateHistoryView.render (cyclomatic 17) src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php:38 — DifferentialRevisionUpdateHistoryView.render has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionCompareController.handleRequest (cyclomatic 17) · ×1
  • DiffusionCompareController.handleRequest (cyclomatic 17) src/applications/diffusion/controller/DiffusionCompareController.php:9 — DiffusionCompareController.handleRequest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffusionSourceLinkRemarkupRule.didMarkupText (cyclomatic 17) · ×1
  • DiffusionSourceLinkRemarkupRule.didMarkupText (cyclomatic 17) src/applications/diffusion/remarkup/DiffusionSourceLinkRemarkupRule.php:46 — DiffusionSourceLinkRemarkupRule.didMarkupText has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DivinerPHPAtomizer.executeAtomize (cyclomatic 17) · ×1
  • DivinerPHPAtomizer.executeAtomize (cyclomatic 17) src/applications/diviner/atomizer/DivinerPHPAtomizer.php:9 — DivinerPHPAtomizer.executeAtomize has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · PhabricatorJupyterDocumentEngine.newCells (cyclomatic 17) · ×1
  • PhabricatorJupyterDocumentEngine.newCells (cyclomatic 17) src/applications/files/document/PhabricatorJupyterDocumentEngine.php:307 — PhabricatorJupyterDocumentEngine.newCells has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeraldRuleController.setupEditorBehavior (cyclomatic 17) · ×1
  • HeraldRuleController.setupEditorBehavior (cyclomatic 17) src/applications/herald/controller/HeraldRuleController.php:400 — HeraldRuleController.setupEditorBehavior has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPeopleQuery.buildWhereClauseParts (cyclomatic 17) · ×1
  • PhabricatorPeopleQuery.buildWhereClauseParts (cyclomatic 17) src/applications/people/query/PhabricatorPeopleQuery.php:242 — PhabricatorPeopleQuery.buildWhereClauseParts has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPeopleQuery.rebuildAvailabilityCache (cyclomatic 17) · ×1
  • PhabricatorPeopleQuery.rebuildAvailabilityCache (cyclomatic 17) src/applications/people/query/PhabricatorPeopleQuery.php:385 — PhabricatorPeopleQuery.rebuildAvailabilityCache has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhameLiveController.setupLiveEnvironment (cyclomatic 17) · ×1
  • PhameLiveController.setupLiveEnvironment (cyclomatic 17) src/applications/phame/controller/PhameLiveController.php:30 — PhameLiveController.setupLiveEnvironment has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhluxEditController.handleRequest (cyclomatic 17) · ×1
  • PhluxEditController.handleRequest (cyclomatic 17) src/applications/phlux/controller/PhluxEditController.php:5 — PhluxEditController.handleRequest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhortuneMerchantProviderEditController.handleMerchantRequest (cyclomatic 17) · ×1
  • PhortuneMerchantProviderEditController.handleMerchantRequest (cyclomatic 17) src/applications/phortune/controller/merchant/PhortuneMerchantProviderEditController.php:10 — PhortuneMerchantProviderEditController.handleMerchantRequest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhortuneOrderSummaryView.newMessagesView (cyclomatic 17) · ×1
  • PhortuneOrderSummaryView.newMessagesView (cyclomatic 17) src/applications/phortune/view/PhortuneOrderSummaryView.php:49 — PhortuneOrderSummaryView.newMessagesView has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProjectBoardReorderController.handleRequest (cyclomatic 17) · ×1
  • PhabricatorProjectBoardReorderController.handleRequest (cyclomatic 17) src/applications/project/controller/PhabricatorProjectBoardReorderController.php:6 — PhabricatorProjectBoardReorderController.handleRequest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProjectEditPictureController.handleRequest (cyclomatic 17) · ×1
  • PhabricatorProjectEditPictureController.handleRequest (cyclomatic 17) src/applications/project/controller/PhabricatorProjectEditPictureController.php:6 — PhabricatorProjectEditPictureController.handleRequest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProjectUserListView.render (cyclomatic 17) · ×1
  • PhabricatorProjectUserListView.render (cyclomatic 17) src/applications/project/view/PhabricatorProjectUserListView.php:55 — PhabricatorProjectUserListView.render has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositorySvnCommitChangeParserWorker.parseRecursiveListFileData (cyclomatic 17) · ×1
  • PhabricatorRepositorySvnCommitChangeParserWorker.parseRecursiveListFileData (cyclomatic 17) src/applications/repository/worker/commitchangeparser/PhabricatorRepositorySvnCommitChangeParserWorker.php:676 — PhabricatorRepositorySvnCommitChangeParserWorker.parseRecursiveListFileData has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorApplicationTransactionEditor.filterTransactions (cyclomatic 17) · ×1
  • PhabricatorApplicationTransactionEditor.filterTransactions (cyclomatic 17) src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2772 — PhabricatorApplicationTransactionEditor.filterTransactions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilDaemonHandle.update (cyclomatic 17) · ×1
  • PhutilDaemonHandle.update (cyclomatic 17) src/infrastructure/daemon/PhutilDaemonHandle.php:136 — PhutilDaemonHandle.update has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilDefaultSyntaxHighlighterEngine.getHighlightFuture (cyclomatic 17) · ×1
  • PhutilDefaultSyntaxHighlighterEngine.getHighlightFuture (cyclomatic 17) src/infrastructure/markup/syntax/engine/PhutilDefaultSyntaxHighlighterEngine.php:42 — PhutilDefaultSyntaxHighlighterEngine.getHighlightFuture has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilXHPASTSyntaxHighlighterFuture.findInterestingSymbols (cyclomatic 17) · ×1
  • PhutilXHPASTSyntaxHighlighterFuture.findInterestingSymbols (cyclomatic 17) src/infrastructure/markup/syntax/highlighter/xhpast/PhutilXHPASTSyntaxHighlighterFuture.php:164 — PhutilXHPASTSyntaxHighlighterFuture.findInterestingSymbols has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · PHUICalendarMonthView.render (cyclomatic 17) · ×1
  • PHUICalendarMonthView.render (cyclomatic 17) src/view/phui/calendar/PHUICalendarMonthView.php:53 — PHUICalendarMonthView.render has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _getInlinesByType (cyclomatic 17) · ×1
  • _getInlinesByType (cyclomatic 17) webroot/rsrc/js/application/diff/DiffChangesetList.js:1968 — _getInlinesByType has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PHPMailerLite.newFromMessage (cyclomatic 16) · ×1
  • PHPMailerLite.newFromMessage (cyclomatic 16) externals/phpmailer/class.phpmailer-lite.php:45 — PHPMailerLite.newFromMessage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHPMailerLite.MailSend (cyclomatic 16) · ×1
  • PHPMailerLite.MailSend (cyclomatic 16) externals/phpmailer/class.phpmailer-lite.php:649 — PHPMailerLite.MailSend has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHPMailer.MailSend (cyclomatic 16) · ×1
  • PHPMailer.MailSend (cyclomatic 16) externals/phpmailer/class.phpmailer.php:628 — PHPMailer.MailSend has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhutilICSParser.parseICSProperty (cyclomatic 16) · ×1
  • PhutilICSParser.parseICSProperty (cyclomatic 16) src/applications/calendar/parser/ics/PhutilICSParser.php:191 — PhutilICSParser.parseICSProperty has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorConduitMethodQuery.filterMethods (cyclomatic 16) · ×1
  • PhabricatorConduitMethodQuery.filterMethods (cyclomatic 16) src/applications/conduit/query/PhabricatorConduitMethodQuery.php:57 — PhabricatorConduitMethodQuery.filterMethods has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorPathSetupCheck.executeChecks (cyclomatic 16) · ×1
  • PhabricatorPathSetupCheck.executeChecks (cyclomatic 16) src/applications/config/check/PhabricatorPathSetupCheck.php:9 — PhabricatorPathSetupCheck.executeChecks has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConpherenceTransactionRenderer.renderTransactions (cyclomatic 16) · ×1
  • ConpherenceTransactionRenderer.renderTransactions (cyclomatic 16) src/applications/conpherence/ConpherenceTransactionRenderer.php:5 — ConpherenceTransactionRenderer.renderTransactions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConpherenceRoomPictureController.handleRequest (cyclomatic 16) · ×1
  • ConpherenceRoomPictureController.handleRequest (cyclomatic 16) src/applications/conpherence/controller/ConpherenceRoomPictureController.php:6 — ConpherenceRoomPictureController.handleRequest has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialDiffCreateController.handleRequest (cyclomatic 16) · ×1
  • DifferentialDiffCreateController.handleRequest (cyclomatic 16) src/applications/differential/controller/DifferentialDiffCreateController.php:5 — DifferentialDiffCreateController.handleRequest has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialTransactionEditor.expandCustomRemarkupBlockTransactions (cyclomatic 16) · ×1
  • DifferentialTransactionEditor.expandCustomRemarkupBlockTransactions (cyclomatic 16) src/applications/differential/editor/DifferentialTransactionEditor.php:807 — DifferentialTransactionEditor.expandCustomRemarkupBlockTransactions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialDiffExtractionEngine.isDiffChangedBeforeCommit (cyclomatic 16) · ×1
  • DifferentialDiffExtractionEngine.isDiffChangedBeforeCommit (cyclomatic 16) src/applications/differential/engine/DifferentialDiffExtractionEngine.php:119 — DifferentialDiffExtractionEngine.isDiffChangedBeforeCommit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DifferentialRevisionReviewTransaction.applyReviewerEffect (cyclomatic 16) · ×1
  • DifferentialRevisionReviewTransaction.applyReviewerEffect (cyclomatic 16) src/applications/differential/xaction/DifferentialRevisionReviewTransaction.php:163 — DifferentialRevisionReviewTransaction.applyReviewerEffect has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DrydockManagementLeaseWorkflow.execute (cyclomatic 16) · ×1
  • DrydockManagementLeaseWorkflow.execute (cyclomatic 16) src/applications/drydock/management/DrydockManagementLeaseWorkflow.php:44 — DrydockManagementLeaseWorkflow.execute has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorTransactionFactEngine.groupTransactions (cyclomatic 16) · ×1
  • PhabricatorTransactionFactEngine.groupTransactions (cyclomatic 16) src/applications/fact/engine/PhabricatorTransactionFactEngine.php:21 — PhabricatorTransactionFactEngine.groupTransactions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorFeedTransactionQuery.loadPage (cyclomatic 16) · ×1
  • PhabricatorFeedTransactionQuery.loadPage (cyclomatic 16) src/applications/feed/query/PhabricatorFeedTransactionQuery.php:41 — PhabricatorFeedTransactionQuery.loadPage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FileAllocateConduitAPIMethod.execute (cyclomatic 16) · ×1
  • FileAllocateConduitAPIMethod.execute (cyclomatic 16) src/applications/files/conduit/FileAllocateConduitAPIMethod.php:28 — FileAllocateConduitAPIMethod.execute has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeraldRuleController.handleRequest (cyclomatic 16) · ×1
  • HeraldRuleController.handleRequest (cyclomatic 16) src/applications/herald/controller/HeraldRuleController.php:5 — HeraldRuleController.handleRequest has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorMetaMTAMemberQuery.execute (cyclomatic 16) · ×1
  • PhabricatorMetaMTAMemberQuery.execute (cyclomatic 16) src/applications/metamta/query/PhabricatorMetaMTAMemberQuery.php:26 — PhabricatorMetaMTAMemberQuery.execute has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · PhabricatorPeopleSearchEngine.renderResultList (cyclomatic 16) · ×1
  • PhabricatorPeopleSearchEngine.renderResultList (cyclomatic 16) src/applications/people/query/PhabricatorPeopleSearchEngine.php:233 — PhabricatorPeopleSearchEngine.renderResultList has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhameBlogProfilePictureController.handleRequest (cyclomatic 16) · ×1
  • PhameBlogProfilePictureController.handleRequest (cyclomatic 16) src/applications/phame/controller/blog/PhameBlogProfilePictureController.php:6 — PhameBlogProfilePictureController.handleRequest has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorProjectColumnQuery.didFilterPage (cyclomatic 16) · ×1
  • PhabricatorProjectColumnQuery.didFilterPage (cyclomatic 16) src/applications/project/query/PhabricatorProjectColumnQuery.php:88 — PhabricatorProjectColumnQuery.didFilterPage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryPullEngine.executeGitUpdate (cyclomatic 16) · ×1
  • PhabricatorRepositoryPullEngine.executeGitUpdate (cyclomatic 16) src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:275 — PhabricatorRepositoryPullEngine.executeGitUpdate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorRepositoryRefEngine.updateCursors (cyclomatic 16) · ×1
  • PhabricatorRepositoryRefEngine.updateCursors (cyclomatic 16) src/applications/repository/engine/PhabricatorRepositoryRefEngine.php:258 — PhabricatorRepositoryRefEngine.updateCursors has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorElasticFulltextStorageEngine.buildSpec (cyclomatic 16) · ×1
  • PhabricatorElasticFulltextStorageEngine.buildSpec (cyclomatic 16) src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php:108 — PhabricatorElasticFulltextStorageEngine.buildSpec has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorEmailAddressesSettingsPanel.returnNewAddressResponse (cyclomatic 16) · ×1
  • PhabricatorEmailAddressesSettingsPanel.returnNewAddressResponse (cyclomatic 16) src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php:158 — PhabricatorEmailAddressesSettingsPanel.returnNewAddressResponse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhabricatorInternationalizationManagementExtractWorkflow.extractFiles (cyclomatic 16) · ×1
  • PhabricatorInternationalizationManagementExtractWorkflow.extractFiles (cyclomatic 16) src/infrastructure/internationalization/management/PhabricatorInternationalizationManagementExtractWorkflow.php:127 — PhabricatorInternationalizationManagementExtractWorkflow.extractFiles has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PhutilRemarkupListBlockRule.getMatchingLineCount (cyclomatic 16) · ×1
  • PhutilRemarkupListBlockRule.getMatchingLineCount (cyclomatic 16) src/infrastructure/markup/blockrule/PhutilRemarkupListBlockRule.php:13 — PhutilRemarkupListBlockRule.getMatchingLineCount has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PHUIButtonView.getTagAttributes (cyclomatic 16) · ×1
  • PHUIButtonView.getTagAttributes (cyclomatic 16) src/view/phui/PHUIButtonView.php:172 — PHUIButtonView.getTagAttributes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _onresults (cyclomatic 16) · ×1
  • _onresults (cyclomatic 16) webroot/rsrc/js/phuix/PHUIXAutocomplete.js:230 — _onresults has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · seek_anchor (cyclomatic 16) · ×1
  • seek_anchor (cyclomatic 16) webroot/rsrc/js/core/behavior-watch-anchor.js:34 — seek_anchor has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · getNewValue (cyclomatic 16) · ×1
  • getNewValue (cyclomatic 16) webroot/rsrc/js/core/behavior-time-typeahead.js:82 — getNewValue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _newHoverMap (cyclomatic 16) · ×1
  • _newHoverMap (cyclomatic 16) webroot/rsrc/js/application/diff/DiffChangesetList.js:1539 — _newHoverMap has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D16 · Bus Factor · dormant codebase · ×1
  • dormant codebase — no living knowledge left to concentrate — All 650 significant source file(s) were last meaningfully changed so long ago that no living knowledge remains — nothing since has been substantial enough to re-establish ownership (a broad, mechanical sweep that touches many files shallowly does not count, and neither does no activity at all). There is no concentration to measure, so the bus factor is not scored. This is not a clean bill: nobody currently holds working knowledge of this code (see D34 Knowledge Freshness).
D19 · Documentation Quality · LLM evaluation failed · ×1
  • LLM evaluation failed — JSON parse error: Expected end of string, but instead reached end of data. Path: $.findings[1].issue | LineNumber: 0 | BytePositionInLine: 1155.
D2 · Cognitive Complexity · PhabricatorAuthRegisterController.handleRequest (cognitive 208) · ×1
  • PhabricatorAuthRegisterController.handleRequest (cognitive 208) src/applications/auth/controller/PhabricatorAuthRegisterController.php:10 — PhabricatorAuthRegisterController.handleRequest has cognitive complexity 208 (threshold 15). Drivers by points: if/else 187, boolean chains 10, error handling 6, ternaries 5 (nesting depth added 101). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetTwoUpRenderer.renderTextChange (cognitive 173) · ×1
  • DifferentialChangesetTwoUpRenderer.renderTextChange (cognitive 173) src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php:31 — DifferentialChangesetTwoUpRenderer.renderTextChange has cognitive complexity 173 (threshold 15). Drivers by points: if/else 132, ternaries 16, loops 14, boolean chains 11 (nesting depth added 108). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilSearchQueryCompiler.tokenizeQuery (cognitive 154) · ×1
  • PhutilSearchQueryCompiler.tokenizeQuery (cognitive 154) src/applications/search/compiler/PhutilSearchQueryCompiler.php:104 — PhutilSearchQueryCompiler.tokenizeQuery has cognitive complexity 154 (threshold 15). Drivers by points: if/else 130, loops 10, match/switch 8, boolean chains 6 (nesting depth added 89). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionCommitController.handleRequest (cognitive 152) · ×1
  • DiffusionCommitController.handleRequest (cognitive 152) src/applications/diffusion/controller/DiffusionCommitController.php:17 — DiffusionCommitController.handleRequest has cognitive complexity 152 (threshold 15). Drivers by points: if/else 114, loops 25, match/switch 7, boolean chains 6 (nesting depth added 97). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetParser.render (cognitive 150) · ×1
  • DifferentialChangesetParser.render (cognitive 150) src/applications/differential/parser/DifferentialChangesetParser.php:749 — DifferentialChangesetParser.render has cognitive complexity 150 (threshold 15). Drivers by points: if/else 120, loops 21, boolean chains 8, match/switch 1 (nesting depth added 73). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositorySvnCommitChangeParserWorker.parseCommitChanges (cognitive 149) · ×1
  • PhabricatorRepositorySvnCommitChangeParserWorker.parseCommitChanges (cognitive 149) src/applications/repository/worker/commitchangeparser/PhabricatorRepositorySvnCommitChangeParserWorker.php:6 — PhabricatorRepositorySvnCommitChangeParserWorker.parseCommitChanges has cognitive complexity 149 (threshold 15). Drivers by points: if/else 113, loops 28, match/switch 5, boolean chains 3 (nesting depth added 91). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryMercurialCommitChangeParserWorker.parseCommitChanges (cognitive 123) · ×1
  • PhabricatorRepositoryMercurialCommitChangeParserWorker.parseCommitChanges (cognitive 123) src/applications/repository/worker/commitchangeparser/PhabricatorRepositoryMercurialCommitChangeParserWorker.php:6 — PhabricatorRepositoryMercurialCommitChangeParserWorker.parseCommitChanges has cognitive complexity 123 (threshold 15). Drivers by points: if/else 97, loops 18, ternaries 6, boolean chains 2 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HarbormasterBuildLogRenderController.handleRequest (cognitive 117) · ×1
  • HarbormasterBuildLogRenderController.handleRequest (cognitive 117) src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php:10 — HarbormasterBuildLogRenderController.handleRequest has cognitive complexity 117 (threshold 15). Drivers by points: if/else 89, loops 23, boolean chains 5 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetEngine.detectCopiedCode (cognitive 115) · ×1
  • DifferentialChangesetEngine.detectCopiedCode (cognitive 115) src/applications/differential/engine/DifferentialChangesetEngine.php:162 — DifferentialChangesetEngine.detectCopiedCode has cognitive complexity 115 (threshold 15). Drivers by points: if/else 71, loops 35, ternaries 9 (nesting depth added 86). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationSearchController.processSearchRequest (cognitive 112) · ×1
  • PhabricatorApplicationSearchController.processSearchRequest (cognitive 112) src/applications/search/controller/PhabricatorApplicationSearchController.php:95 — PhabricatorApplicationSearchController.processSearchRequest has cognitive complexity 112 (threshold 15). Drivers by points: if/else 78, loops 16, boolean chains 8, error handling 8, ternaries 2 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionCommitQuery.buildWhereClauseParts (cognitive 111) · ×1
  • DiffusionCommitQuery.buildWhereClauseParts (cognitive 111) src/applications/diffusion/query/DiffusionCommitQuery.php:534 — DiffusionCommitQuery.buildWhereClauseParts has cognitive complexity 111 (threshold 15). Drivers by points: if/else 96, loops 12, error handling 3 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionMercurialWireClientSSHProtocolChannel.decodeStream (cognitive 111) · ×1
  • DiffusionMercurialWireClientSSHProtocolChannel.decodeStream (cognitive 111) src/applications/diffusion/ssh/DiffusionMercurialWireClientSSHProtocolChannel.php:79 — DiffusionMercurialWireClientSSHProtocolChannel.decodeStream has cognitive complexity 111 (threshold 15). Drivers by points: if/else 109, boolean chains 1, loops 1 (nesting depth added 79). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionURIEditor.validateTransaction (cognitive 105) · ×1
  • DiffusionURIEditor.validateTransaction (cognitive 105) src/applications/diffusion/editor/DiffusionURIEditor.php:156 — DiffusionURIEditor.validateTransaction has cognitive complexity 105 (threshold 15). Drivers by points: if/else 81, loops 16, match/switch 4, error handling 3, boolean chains 1 (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AphrontTableView.render (cognitive 105) · ×1
  • AphrontTableView.render (cognitive 105) src/view/control/AphrontTableView.php:131 — AphrontTableView.render has cognitive complexity 105 (threshold 15). Drivers by points: if/else 76, loops 26, boolean chains 3 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeraldEngine.getRuleMatchResult (cognitive 100) · ×1
  • HeraldEngine.getRuleMatchResult (cognitive 100) src/applications/herald/engine/HeraldEngine.php:379 — HeraldEngine.getRuleMatchResult has cognitive complexity 100 (threshold 15). Drivers by points: if/else 63, error handling 28, loops 6, boolean chains 3 (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorManiphestTaskFactEngine.newDatapointsForObject (cognitive 99) · ×1
  • PhabricatorManiphestTaskFactEngine.newDatapointsForObject (cognitive 99) src/applications/fact/engine/PhabricatorManiphestTaskFactEngine.php:86 — PhabricatorManiphestTaskFactEngine.newDatapointsForObject has cognitive complexity 99 (threshold 15). Drivers by points: if/else 68, loops 20, match/switch 7, boolean chains 4 (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCalendarImportEngine.importEventDocument (cognitive 97) · ×1
  • PhabricatorCalendarImportEngine.importEventDocument (cognitive 97) src/applications/calendar/import/PhabricatorCalendarImportEngine.php:55 — PhabricatorCalendarImportEngine.importEventDocument has cognitive complexity 97 (threshold 15). Drivers by points: if/else 61, loops 28, error handling 3, match/switch 3, boolean chains 2 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationTransactionEditor.applyTransactions (cognitive 97) · ×1
  • PhabricatorApplicationTransactionEditor.applyTransactions (cognitive 97) src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1175 — PhabricatorApplicationTransactionEditor.applyTransactions has cognitive complexity 97 (threshold 15). Drivers by points: if/else 73, loops 21, error handling 2, boolean chains 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorInlineCommentAdjustmentEngine.execute (cognitive 97) · ×1
  • PhabricatorInlineCommentAdjustmentEngine.execute (cognitive 97) src/infrastructure/diff/engine/PhabricatorInlineCommentAdjustmentEngine.php:60 — PhabricatorInlineCommentAdjustmentEngine.execute has cognitive complexity 97 (threshold 15). Drivers by points: if/else 77, loops 17, ternaries 3 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionCommitHookEngine.findMercurialChangegroupRefUpdates (cognitive 92) · ×1
  • DiffusionCommitHookEngine.findMercurialChangegroupRefUpdates (cognitive 92) src/applications/diffusion/engine/DiffusionCommitHookEngine.php:743 — DiffusionCommitHookEngine.findMercurialChangegroupRefUpdates has cognitive complexity 92 (threshold 15). Drivers by points: if/else 60, loops 28, boolean chains 4 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorEditEngine.buildEditResponse (cognitive 92) · ×1
  • PhabricatorEditEngine.buildEditResponse (cognitive 92) src/applications/transactions/editengine/PhabricatorEditEngine.php:1033 — PhabricatorEditEngine.buildEditResponse has cognitive complexity 92 (threshold 15). Drivers by points: if/else 63, loops 23, boolean chains 4, error handling 2 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionSubversionWireProtocol.writeData (cognitive 89) · ×1
  • DiffusionSubversionWireProtocol.writeData (cognitive 89) src/applications/diffusion/protocol/DiffusionSubversionWireProtocol.php:31 — DiffusionSubversionWireProtocol.writeData has cognitive complexity 89 (threshold 15). Drivers by points: if/else 88, loops 1 (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilCalendarRecurrenceRule.newDaysSet (cognitive 88) · ×1
  • PhutilCalendarRecurrenceRule.newDaysSet (cognitive 88) src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php:1178 — PhutilCalendarRecurrenceRule.newDaysSet has cognitive complexity 88 (threshold 15). Drivers by points: if/else 76, loops 7, boolean chains 5 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetOneUpRenderer.renderDocumentEngineBlocks (cognitive 87) · ×1
  • DifferentialChangesetOneUpRenderer.renderDocumentEngineBlocks (cognitive 87) src/applications/differential/render/DifferentialChangesetOneUpRenderer.php:270 — DifferentialChangesetOneUpRenderer.renderDocumentEngineBlocks has cognitive complexity 87 (threshold 15). Drivers by points: if/else 69, loops 15, boolean chains 3 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialRevisionViewController.handleRequest (cognitive 86) · ×1
  • DifferentialRevisionViewController.handleRequest (cognitive 86) src/applications/differential/controller/DifferentialRevisionViewController.php:43 — DifferentialRevisionViewController.handleRequest has cognitive complexity 86 (threshold 15). Drivers by points: if/else 57, loops 24, boolean chains 4, ternaries 1 (nesting depth added 20). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PhrictionDocumentController.handleRequest (cognitive 86) · ×1
  • PhrictionDocumentController.handleRequest (cognitive 86) src/applications/phriction/controller/PhrictionDocumentController.php:13 — PhrictionDocumentController.handleRequest has cognitive complexity 86 (threshold 15). Drivers by points: if/else 84, boolean chains 1, loops 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorFilesManagementIntegrityWorkflow.execute (cognitive 85) · ×1
  • PhabricatorFilesManagementIntegrityWorkflow.execute (cognitive 85) src/applications/files/management/PhabricatorFilesManagementIntegrityWorkflow.php:53 — PhabricatorFilesManagementIntegrityWorkflow.execute has cognitive complexity 85 (threshold 15). Drivers by points: if/else 74, boolean chains 7, error handling 3, loops 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUIDiffGraphView.renderRawGraph (cognitive 85) · ×1
  • PHUIDiffGraphView.renderRawGraph (cognitive 85) src/infrastructure/diff/view/PHUIDiffGraphView.php:36 — PHUIDiffGraphView.renderRawGraph has cognitive complexity 85 (threshold 15). Drivers by points: if/else 58, loops 26, boolean chains 1 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialHunkParser.makeContextDiff (cognitive 84) · ×1
  • DifferentialHunkParser.makeContextDiff (cognitive 84) src/applications/differential/parser/DifferentialHunkParser.php:665 — DifferentialHunkParser.makeContextDiff has cognitive complexity 84 (threshold 15). Drivers by points: if/else 73, boolean chains 7, loops 4 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhortunePaymentMethodCreateController.handleRequest (cognitive 84) · ×1
  • PhortunePaymentMethodCreateController.handleRequest (cognitive 84) src/applications/phortune/controller/paymentmethod/PhortunePaymentMethodCreateController.php:6 — PhortunePaymentMethodCreateController.handleRequest has cognitive complexity 84 (threshold 15). Drivers by points: if/else 69, error handling 11, boolean chains 2, loops 2 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetOneUpRenderer.renderPrimitives (cognitive 83) · ×1
  • DifferentialChangesetOneUpRenderer.renderPrimitives (cognitive 83) src/applications/differential/render/DifferentialChangesetOneUpRenderer.php:47 — DifferentialChangesetOneUpRenderer.renderPrimitives has cognitive complexity 83 (threshold 15). Drivers by points: if/else 79, match/switch 2, boolean chains 1, loops 1 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectColumnBulkMoveController.handleRequest (cognitive 83) · ×1
  • PhabricatorProjectColumnBulkMoveController.handleRequest (cognitive 83) src/applications/project/controller/PhabricatorProjectColumnBulkMoveController.php:6 — PhabricatorProjectColumnBulkMoveController.handleRequest has cognitive complexity 83 (threshold 15). Drivers by points: if/else 75, loops 8 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryManagementReparseWorkflow.execute (cognitive 82) · ×1
  • PhabricatorRepositoryManagementReparseWorkflow.execute (cognitive 82) src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php:81 — PhabricatorRepositoryManagementReparseWorkflow.execute has cognitive complexity 82 (threshold 15). Drivers by points: if/else 68, boolean chains 6, error handling 3, loops 3, match/switch 2 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilRemarkupListBlockRule.renderTree (cognitive 81) · ×1
  • PhutilRemarkupListBlockRule.renderTree (cognitive 81) src/infrastructure/markup/blockrule/PhutilRemarkupListBlockRule.php:428 — PhutilRemarkupListBlockRule.renderTree has cognitive complexity 81 (threshold 15). Drivers by points: if/else 54, loops 12, match/switch 9, ternaries 5, boolean chains 1 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorFactObjectController.handleRequest (cognitive 80) · ×1
  • PhabricatorFactObjectController.handleRequest (cognitive 80) src/applications/fact/controller/PhabricatorFactObjectController.php:6 — PhabricatorFactObjectController.handleRequest has cognitive complexity 80 (threshold 15). Drivers by points: if/else 41, loops 39 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorTypeaheadModularDatasourceController.handleRequest (cognitive 77) · ×1
  • PhabricatorTypeaheadModularDatasourceController.handleRequest (cognitive 77) src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php:10 — PhabricatorTypeaheadModularDatasourceController.handleRequest has cognitive complexity 77 (threshold 15). Drivers by points: if/else 62, loops 5, ternaries 4, error handling 3, match/switch 3 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConpherenceThreadSearchEngine.loadContextMessages (cognitive 76) · ×1
  • ConpherenceThreadSearchEngine.loadContextMessages (cognitive 76) src/applications/conpherence/query/ConpherenceThreadSearchEngine.php:233 — ConpherenceThreadSearchEngine.loadContextMessages has cognitive complexity 76 (threshold 15). Drivers by points: if/else 42, loops 34 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionServeController.serveRequest (cognitive 76) · ×1
  • DiffusionServeController.serveRequest (cognitive 76) src/applications/diffusion/controller/DiffusionServeController.php:176 — DiffusionServeController.serveRequest has cognitive complexity 76 (threshold 15). Drivers by points: if/else 58, boolean chains 7, error handling 7, match/switch 4 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionRepositoryBasicsManagementPanel.buildRepositoryStatus (cognitive 76) · ×1
  • DiffusionRepositoryBasicsManagementPanel.buildRepositoryStatus (cognitive 76) src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php:336 — DiffusionRepositoryBasicsManagementPanel.buildRepositoryStatus has cognitive complexity 76 (threshold 15). Drivers by points: if/else 56, match/switch 13, loops 6, boolean chains 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPeopleTestDataGenerator.generateUsername (cognitive 73) · ×1
  • PhabricatorPeopleTestDataGenerator.generateUsername (cognitive 73) src/applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php:44 — PhabricatorPeopleTestDataGenerator.generateUsername has cognitive complexity 73 (threshold 15). Drivers by points: if/else 50, loops 20, boolean chains 3 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAuthSessionEngine.newHighSecurityToken (cognitive 71) · ×1
  • PhabricatorAuthSessionEngine.newHighSecurityToken (cognitive 71) src/applications/auth/engine/PhabricatorAuthSessionEngine.php:446 — PhabricatorAuthSessionEngine.newHighSecurityToken has cognitive complexity 71 (threshold 15). Drivers by points: if/else 55, loops 15, boolean chains 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProfileMenuEngine.buildResponse (cognitive 71) · ×1
  • PhabricatorProfileMenuEngine.buildResponse (cognitive 71) src/applications/search/engine/PhabricatorProfileMenuEngine.php:102 — PhabricatorProfileMenuEngine.buildResponse has cognitive complexity 71 (threshold 15). Drivers by points: if/else 58, match/switch 6, error handling 3, boolean chains 2, loops 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildFerretWhereClause (cognitive 71) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildFerretWhereClause (cognitive 71) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:2208 — PhabricatorCursorPagedPolicyAwareQuery.buildFerretWhereClause has cognitive complexity 71 (threshold 15). Drivers by points: if/else 68, boolean chains 2, loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorMetaMTAMailViewController.buildDeliveryProperties (cognitive 69) · ×1
  • PhabricatorMetaMTAMailViewController.buildDeliveryProperties (cognitive 69) src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php:216 — PhabricatorMetaMTAMailViewController.buildDeliveryProperties has cognitive complexity 69 (threshold 15). Drivers by points: if/else 54, loops 12, match/switch 3 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorMailManagementShowOutboundWorkflow.execute (cognitive 68) · ×1
  • PhabricatorMailManagementShowOutboundWorkflow.execute (cognitive 68) src/applications/metamta/management/PhabricatorMailManagementShowOutboundWorkflow.php:29 — PhabricatorMailManagementShowOutboundWorkflow.execute has cognitive complexity 68 (threshold 15). Drivers by points: if/else 50, loops 18 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorConduitAPIController.authenticateUser (cognitive 67) · ×1
  • PhabricatorConduitAPIController.authenticateUser (cognitive 67) src/applications/conduit/controller/PhabricatorConduitAPIController.php:167 — PhabricatorConduitAPIController.authenticateUser has cognitive complexity 67 (threshold 15). Drivers by points: if/else 64, error handling 2, boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorConfigClusterRepositoriesController.buildClusterRepositoryStatus (cognitive 67) · ×1
  • PhabricatorConfigClusterRepositoriesController.buildClusterRepositoryStatus (cognitive 67) src/applications/config/controller/services/PhabricatorConfigClusterRepositoriesController.php:46 — PhabricatorConfigClusterRepositoriesController.buildClusterRepositoryStatus has cognitive complexity 67 (threshold 15). Drivers by points: if/else 55, loops 9, boolean chains 3 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorMentionRemarkupRule.didMarkupText (cognitive 67) · ×1
  • PhabricatorMentionRemarkupRule.didMarkupText (cognitive 67) src/applications/people/markup/PhabricatorMentionRemarkupRule.php:57 — PhabricatorMentionRemarkupRule.didMarkupText has cognitive complexity 67 (threshold 15). Drivers by points: if/else 57, loops 10 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorBoardLayoutEngine.layoutBoard (cognitive 67) · ×1
  • PhabricatorBoardLayoutEngine.layoutBoard (cognitive 67) src/applications/project/engine/PhabricatorBoardLayoutEngine.php:419 — PhabricatorBoardLayoutEngine.layoutBoard has cognitive complexity 67 (threshold 15). Drivers by points: if/else 36, loops 29, boolean chains 2 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialReviewersView.render (cognitive 66) · ×1
  • DifferentialReviewersView.render (cognitive 66) src/applications/differential/view/DifferentialReviewersView.php:26 — DifferentialReviewersView.render has cognitive complexity 66 (threshold 15). Drivers by points: if/else 59, boolean chains 3, loops 2, match/switch 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionBrowseQueryConduitAPIMethod.getGitResult (cognitive 66) · ×1
  • DiffusionBrowseQueryConduitAPIMethod.getGitResult (cognitive 66) src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:35 — DiffusionBrowseQueryConduitAPIMethod.getGitResult has cognitive complexity 66 (threshold 15). Drivers by points: if/else 53, loops 7, boolean chains 3, error handling 2, ternaries 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryPullLocalDaemon.run (cognitive 66) · ×1
  • PhabricatorRepositoryPullLocalDaemon.run (cognitive 66) src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:38 — PhabricatorRepositoryPullLocalDaemon.run has cognitive complexity 66 (threshold 15). Drivers by points: if/else 45, loops 20, boolean chains 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryManagementThawWorkflow.execute (cognitive 66) · ×1
  • PhabricatorRepositoryManagementThawWorkflow.execute (cognitive 66) src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php:49 — PhabricatorRepositoryManagementThawWorkflow.execute has cognitive complexity 66 (threshold 15). Drivers by points: if/else 50, loops 8, boolean chains 5, error handling 3 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorEditEngineConfigurationQuery.loadPage (cognitive 66) · ×1
  • PhabricatorEditEngineConfigurationQuery.loadPage (cognitive 66) src/applications/transactions/query/PhabricatorEditEngineConfigurationQuery.php:71 — PhabricatorEditEngineConfigurationQuery.loadPage has cognitive complexity 66 (threshold 15). Drivers by points: if/else 44, loops 22 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorDatabaseRefParser.newRefs (cognitive 66) · ×1
  • PhabricatorDatabaseRefParser.newRefs (cognitive 66) src/infrastructure/cluster/PhabricatorDatabaseRefParser.php:37 — PhabricatorDatabaseRefParser.newRefs has cognitive complexity 66 (threshold 15). Drivers by points: if/else 56, loops 10 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUIDiffInlineCommentDetailView.render (cognitive 66) · ×1
  • PHUIDiffInlineCommentDetailView.render (cognitive 66) src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php:78 — PHUIDiffInlineCommentDetailView.render has cognitive complexity 66 (threshold 15). Drivers by points: if/else 50, boolean chains 9, ternaries 3, loops 2, match/switch 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPolicyAwareQuery.execute (cognitive 66) · ×1
  • PhabricatorPolicyAwareQuery.execute (cognitive 66) src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:204 — PhabricatorPolicyAwareQuery.execute has cognitive complexity 66 (threshold 15). Drivers by points: if/else 52, loops 8, boolean chains 3, error handling 3 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorController.willBeginExecution (cognitive 65) · ×1
  • PhabricatorController.willBeginExecution (cognitive 65) src/applications/base/controller/PhabricatorController.php:64 — PhabricatorController.willBeginExecution has cognitive complexity 65 (threshold 15). Drivers by points: if/else 56, boolean chains 8, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCalendarEventQuery.willFilterPage (cognitive 65) · ×1
  • PhabricatorCalendarEventQuery.willFilterPage (cognitive 65) src/applications/calendar/query/PhabricatorCalendarEventQuery.php:515 — PhabricatorCalendarEventQuery.willFilterPage has cognitive complexity 65 (threshold 15). Drivers by points: if/else 33, loops 32 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DivinerAtomQuery.willFilterPage (cognitive 65) · ×1
  • DivinerAtomQuery.willFilterPage (cognitive 65) src/applications/diviner/query/DivinerAtomQuery.php:139 — DivinerAtomQuery.willFilterPage has cognitive complexity 65 (threshold 15). Drivers by points: if/else 46, loops 19 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUIObjectItemView.getTagContent (cognitive 65) · ×1
  • PHUIObjectItemView.getTagContent (cognitive 65) src/view/phui/PHUIObjectItemView.php:383 — PHUIObjectItemView.getTagContent has cognitive complexity 65 (threshold 15). Drivers by points: if/else 41, loops 12, ternaries 7, boolean chains 5 (nesting depth added 17). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PhabricatorPeopleNewController.handleRequest (cognitive 64) · ×1
  • PhabricatorPeopleNewController.handleRequest (cognitive 64) src/applications/people/controller/PhabricatorPeopleNewController.php:6 — PhabricatorPeopleNewController.handleRequest has cognitive complexity 64 (threshold 15). Drivers by points: if/else 56, boolean chains 3, error handling 3, match/switch 1, ternaries 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectBoardViewController.handleRequest (cognitive 64) · ×1
  • PhabricatorProjectBoardViewController.handleRequest (cognitive 64) src/applications/project/controller/PhabricatorProjectBoardViewController.php:10 — PhabricatorProjectBoardViewController.handleRequest has cognitive complexity 64 (threshold 15). Drivers by points: if/else 48, loops 14, boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultimeterSampleController.handleRequest (cognitive 63) · ×1
  • MultimeterSampleController.handleRequest (cognitive 63) src/applications/multimeter/controller/MultimeterSampleController.php:9 — MultimeterSampleController.handleRequest has cognitive complexity 63 (threshold 15). Drivers by points: if/else 57, loops 4, ternaries 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PholioMockEditController.handleRequest (cognitive 62) · ×1
  • PholioMockEditController.handleRequest (cognitive 62) src/applications/pholio/controller/PholioMockEditController.php:5 — PholioMockEditController.handleRequest has cognitive complexity 62 (threshold 15). Drivers by points: if/else 44, ternaries 10, loops 7, boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HarbormasterBuildEngine.updateBuildSteps (cognitive 61) · ×1
  • HarbormasterBuildEngine.updateBuildSteps (cognitive 61) src/applications/harbormaster/engine/HarbormasterBuildEngine.php:165 — HarbormasterBuildEngine.updateBuildSteps has cognitive complexity 61 (threshold 15). Drivers by points: if/else 41, loops 18, boolean chains 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Text_Figlet.lineEcho (cognitive 60) · ×1
  • Text_Figlet.lineEcho (cognitive 60) externals/pear-figlet/Text/Figlet.php:269 — Text_Figlet.lineEcho has cognitive complexity 60 (threshold 15). Drivers by points: if/else 43, loops 16, boolean chains 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xhprof_lib.xhprof_aggregate_runs (cognitive 60) · ×1
  • xhprof_lib.xhprof_aggregate_runs (cognitive 60) externals/xhprof/xhprof_lib.php:244 — xhprof_lib.xhprof_aggregate_runs has cognitive complexity 60 (threshold 15). Drivers by points: if/else 38, loops 18, boolean chains 2, ternaries 2 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialHunkParser.parseHunksForHighlightMasks (cognitive 60) · ×1
  • DifferentialHunkParser.parseHunksForHighlightMasks (cognitive 60) src/applications/differential/parser/DifferentialHunkParser.php:566 — DifferentialHunkParser.parseHunksForHighlightMasks has cognitive complexity 60 (threshold 15). Drivers by points: if/else 47, boolean chains 9, loops 4 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PassphraseCredentialEditController.handleRequest (cognitive 60) · ×1
  • PassphraseCredentialEditController.handleRequest (cognitive 60) src/applications/passphrase/controller/PassphraseCredentialEditController.php:5 — PassphraseCredentialEditController.handleRequest has cognitive complexity 60 (threshold 15). Drivers by points: if/else 49, error handling 8, boolean chains 2, ternaries 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhrictionRemarkupRule.didMarkupText (cognitive 60) · ×1
  • PhrictionRemarkupRule.didMarkupText (cognitive 60) src/applications/phriction/markup/PhrictionRemarkupRule.php:86 — PhrictionRemarkupRule.didMarkupText has cognitive complexity 60 (threshold 15). Drivers by points: if/else 46, loops 13, boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAuthEditController.handleRequest (cognitive 58) · ×1
  • PhabricatorAuthEditController.handleRequest (cognitive 58) src/applications/auth/controller/config/PhabricatorAuthEditController.php:6 — PhabricatorAuthEditController.handleRequest has cognitive complexity 58 (threshold 15). Drivers by points: if/else 49, loops 5, error handling 3, boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetTwoUpRenderer.renderDocumentEngineBlocks (cognitive 58) · ×1
  • DifferentialChangesetTwoUpRenderer.renderDocumentEngineBlocks (cognitive 58) src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php:367 — DifferentialChangesetTwoUpRenderer.renderDocumentEngineBlocks has cognitive complexity 58 (threshold 15). Drivers by points: if/else 50, loops 7, boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionRepositoryStorageManagementPanel.buildClusterStatusPanel (cognitive 58) · ×1
  • DiffusionRepositoryStorageManagementPanel.buildClusterStatusPanel (cognitive 58) src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php:79 — DiffusionRepositoryStorageManagementPanel.buildClusterStatusPanel has cognitive complexity 58 (threshold 15). Drivers by points: if/else 48, error handling 5, loops 4, boolean chains 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorSearchManagementIndexWorkflow.execute (cognitive 58) · ×1
  • PhabricatorSearchManagementIndexWorkflow.execute (cognitive 58) src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php:74 — PhabricatorSearchManagementIndexWorkflow.execute has cognitive complexity 58 (threshold 15). Drivers by points: if/else 38, boolean chains 11, loops 7, error handling 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAuthManagementStripWorkflow.execute (cognitive 57) · ×1
  • PhabricatorAuthManagementStripWorkflow.execute (cognitive 57) src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php:54 — PhabricatorAuthManagementStripWorkflow.execute has cognitive complexity 57 (threshold 15). Drivers by points: if/else 41, loops 10, boolean chains 6 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DivinerAtomController.handleRequest (cognitive 57) · ×1
  • DivinerAtomController.handleRequest (cognitive 57) src/applications/diviner/controller/DivinerAtomController.php:9 — DivinerAtomController.handleRequest has cognitive complexity 57 (threshold 15). Drivers by points: if/else 32, loops 18, ternaries 7 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryQuery.willFilterPage (cognitive 57) · ×1
  • PhabricatorRepositoryQuery.willFilterPage (cognitive 57) src/applications/repository/query/PhabricatorRepositoryQuery.php:236 — PhabricatorRepositoryQuery.willFilterPage has cognitive complexity 57 (threshold 15). Drivers by points: if/else 35, loops 18, match/switch 4 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPeopleInviteSendController.handleRequest (cognitive 56) · ×1
  • PhabricatorPeopleInviteSendController.handleRequest (cognitive 56) src/applications/people/controller/PhabricatorPeopleInviteSendController.php:6 — PhabricatorPeopleInviteSendController.handleRequest has cognitive complexity 56 (threshold 15). Drivers by points: if/else 44, loops 9, ternaries 2, boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AphrontMultipartParser.continueParse (cognitive 55) · ×1
  • AphrontMultipartParser.continueParse (cognitive 55) src/aphront/multipartparser/AphrontMultipartParser.php:62 — AphrontMultipartParser.continueParse has cognitive complexity 55 (threshold 15). Drivers by points: if/else 52, match/switch 2, loops 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationQuery.loadPage (cognitive 55) · ×1
  • PhabricatorApplicationQuery.loadPage (cognitive 55) src/applications/meta/query/PhabricatorApplicationQuery.php:71 — PhabricatorApplicationQuery.loadPage has cognitive complexity 55 (threshold 15). Drivers by points: if/else 36, loops 18, match/switch 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorWorkerManagementWorkflow.loadTasks (cognitive 55) · ×1
  • PhabricatorWorkerManagementWorkflow.loadTasks (cognitive 55) src/infrastructure/daemon/workers/management/PhabricatorWorkerManagementWorkflow.php:69 — PhabricatorWorkerManagementWorkflow.loadTasks has cognitive complexity 55 (threshold 15). Drivers by points: if/else 45, boolean chains 7, loops 3 (nesting depth added 12). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PHUIDiffTableOfContentsListView.render (cognitive 55) · ×1
  • PHUIDiffTableOfContentsListView.render (cognitive 55) src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php:53 — PHUIDiffTableOfContentsListView.render has cognitive complexity 55 (threshold 15). Drivers by points: if/else 51, loops 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HarbormasterBuildViewController.handleRequest (cognitive 54) · ×1
  • HarbormasterBuildViewController.handleRequest (cognitive 54) src/applications/harbormaster/controller/HarbormasterBuildViewController.php:10 — HarbormasterBuildViewController.handleRequest has cognitive complexity 54 (threshold 15). Drivers by points: if/else 48, loops 5, boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LegalpadDocumentSignController.handleRequest (cognitive 54) · ×1
  • LegalpadDocumentSignController.handleRequest (cognitive 54) src/applications/legalpad/controller/LegalpadDocumentSignController.php:24 — LegalpadDocumentSignController.handleRequest has cognitive complexity 54 (threshold 15). Drivers by points: if/else 47, boolean chains 4, match/switch 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManiphestReportController.renderOpenTasks (cognitive 54) · ×1
  • ManiphestReportController.renderOpenTasks (cognitive 54) src/applications/maniphest/controller/ManiphestReportController.php:487 — ManiphestReportController.renderOpenTasks has cognitive complexity 54 (threshold 15). Drivers by points: if/else 27, loops 19, match/switch 4, ternaries 3, boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManiphestTransactionEditor.buildMoveTransaction (cognitive 54) · ×1
  • ManiphestTransactionEditor.buildMoveTransaction (cognitive 54) src/applications/maniphest/editor/ManiphestTransactionEditor.php:438 — ManiphestTransactionEditor.buildMoveTransaction has cognitive complexity 54 (threshold 15). Drivers by points: if/else 42, loops 10, boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorObjectListQuery.execute (cognitive 54) · ×1
  • PhabricatorObjectListQuery.execute (cognitive 54) src/applications/phid/query/PhabricatorObjectListQuery.php:56 — PhabricatorObjectListQuery.execute has cognitive complexity 54 (threshold 15). Drivers by points: if/else 32, loops 21, boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorEditEngine.buildCommentResponse (cognitive 54) · ×1
  • PhabricatorEditEngine.buildCommentResponse (cognitive 54) src/applications/transactions/editengine/PhabricatorEditEngine.php:1875 — PhabricatorEditEngine.buildCommentResponse has cognitive complexity 54 (threshold 15). Drivers by points: if/else 38, loops 8, error handling 5, boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilCalendarRecurrenceSet.getEventsBetween (cognitive 53) · ×1
  • PhutilCalendarRecurrenceSet.getEventsBetween (cognitive 53) src/applications/calendar/parser/data/PhutilCalendarRecurrenceSet.php:23 — PhutilCalendarRecurrenceSet.getEventsBetween has cognitive complexity 53 (threshold 15). Drivers by points: if/else 41, loops 8, boolean chains 4 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialRevisionReviewersTransaction.renderReviewerEditTitle (cognitive 53) · ×1
  • DifferentialRevisionReviewersTransaction.renderReviewerEditTitle (cognitive 53) src/applications/differential/xaction/DifferentialRevisionReviewersTransaction.php:165 — DifferentialRevisionReviewersTransaction.renderReviewerEditTitle has cognitive complexity 53 (threshold 15). Drivers by points: if/else 48, boolean chains 4, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProfileMenuEngine.buildItemConfigureContent (cognitive 53) · ×1
  • PhabricatorProfileMenuEngine.buildItemConfigureContent (cognitive 53) src/applications/search/engine/PhabricatorProfileMenuEngine.php:683 — PhabricatorProfileMenuEngine.buildItemConfigureContent has cognitive complexity 53 (threshold 15). Drivers by points: if/else 49, loops 3, boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationTransactionView.renderEvent (cognitive 53) · ×1
  • PhabricatorApplicationTransactionView.renderEvent (cognitive 53) src/applications/transactions/view/PhabricatorApplicationTransactionView.php:422 — PhabricatorApplicationTransactionView.renderEvent has cognitive complexity 53 (threshold 15). Drivers by points: if/else 44, boolean chains 9 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUIHeaderView.getTagContent (cognitive 53) · ×1
  • PHUIHeaderView.getTagContent (cognitive 53) src/view/phui/PHUIHeaderView.php:190 — PHUIHeaderView.getTagContent has cognitive complexity 53 (threshold 15). Drivers by points: if/else 40, loops 7, boolean chains 3, match/switch 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetViewController.handleRequest (cognitive 52) · ×1
  • DifferentialChangesetViewController.handleRequest (cognitive 52) src/applications/differential/controller/DifferentialChangesetViewController.php:9 — DifferentialChangesetViewController.handleRequest has cognitive complexity 52 (threshold 15). Drivers by points: if/else 42, boolean chains 4, loops 4, match/switch 2 (nesting depth added 11). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PhabricatorPolicyFilter.checkCapability (cognitive 52) · ×1
  • PhabricatorPolicyFilter.checkCapability (cognitive 52) src/applications/policy/filter/PhabricatorPolicyFilter.php:499 — PhabricatorPolicyFilter.checkCapability has cognitive complexity 52 (threshold 15). Drivers by points: if/else 50, boolean chains 1, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Text_Figlet.loadFont (cognitive 51) · ×1
  • Text_Figlet.loadFont (cognitive 51) externals/pear-figlet/Text/Figlet.php:111 — Text_Figlet.loadFont has cognitive complexity 51 (threshold 15). Drivers by points: if/else 45, loops 4, boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionGitUploadPackWireProtocol.willReadBytes (cognitive 51) · ×1
  • DiffusionGitUploadPackWireProtocol.willReadBytes (cognitive 51) src/applications/diffusion/protocol/DiffusionGitUploadPackWireProtocol.php:16 — DiffusionGitUploadPackWireProtocol.willReadBytes has cognitive complexity 51 (threshold 15). Drivers by points: if/else 40, loops 6, match/switch 4, boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionCommitQuery.didFilterPage (cognitive 51) · ×1
  • DiffusionCommitQuery.didFilterPage (cognitive 51) src/applications/diffusion/query/DiffusionCommitQuery.php:361 — DiffusionCommitQuery.didFilterPage has cognitive complexity 51 (threshold 15). Drivers by points: if/else 24, loops 24, error handling 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUIDiffTableOfContentsListView.newComponentView (cognitive 51) · ×1
  • PHUIDiffTableOfContentsListView.newComponentView (cognitive 51) src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php:387 — PHUIDiffTableOfContentsListView.newComponentView has cognitive complexity 51 (threshold 15). Drivers by points: if/else 45, boolean chains 3, loops 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildSpacesWhereClause (cognitive 51) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildSpacesWhereClause (cognitive 51) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:3139 — PhabricatorCursorPagedPolicyAwareQuery.buildSpacesWhereClause has cognitive complexity 51 (threshold 15). Drivers by points: if/else 43, boolean chains 4, loops 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · updateCard (cognitive 51) · ×1
  • updateCard (cognitive 51) webroot/rsrc/js/application/projects/WorkboardBoard.js:601 — updateCard has cognitive complexity 51 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHPMailerLite.WrapText (cognitive 50) · ×1
  • PHPMailerLite.WrapText (cognitive 50) externals/phpmailer/class.phpmailer-lite.php:785 — PHPMailerLite.WrapText has cognitive complexity 50 (threshold 15). Drivers by points: if/else 36, loops 7, ternaries 5, boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHPMailer.WrapText (cognitive 50) · ×1
  • PHPMailer.WrapText (cognitive 50) externals/phpmailer/class.phpmailer.php:916 — PHPMailer.WrapText has cognitive complexity 50 (threshold 15). Drivers by points: if/else 36, loops 7, ternaries 5, boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilSpriteSheet.generate (cognitive 50) · ×1
  • PhutilSpriteSheet.generate (cognitive 50) src/aphront/sprite/PhutilSpriteSheet.php:57 — PhutilSpriteSheet.generate has cognitive complexity 50 (threshold 15). Drivers by points: if/else 30, loops 17, boolean chains 2, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAuthManagementRevokeWorkflow.execute (cognitive 50) · ×1
  • PhabricatorAuthManagementRevokeWorkflow.execute (cognitive 50) src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php:50 — PhabricatorAuthManagementRevokeWorkflow.execute has cognitive complexity 50 (threshold 15). Drivers by points: if/else 41, boolean chains 6, loops 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionBrowseQueryConduitAPIMethod.getSVNResult (cognitive 50) · ×1
  • DiffusionBrowseQueryConduitAPIMethod.getSVNResult (cognitive 50) src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:363 — DiffusionBrowseQueryConduitAPIMethod.getSVNResult has cognitive complexity 50 (threshold 15). Drivers by points: if/else 45, loops 3, boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhortuneCartCancelController.handleCartRequest (cognitive 50) · ×1
  • PhortuneCartCancelController.handleCartRequest (cognitive 50) src/applications/phortune/controller/cart/PhortuneCartCancelController.php:14 — PhortuneCartCancelController.handleCartRequest has cognitive complexity 50 (threshold 15). Drivers by points: if/else 38, error handling 8, loops 3, match/switch 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilProseDifferenceEngine.buildDiff (cognitive 50) · ×1
  • PhutilProseDifferenceEngine.buildDiff (cognitive 50) src/infrastructure/diff/prose/PhutilProseDifferenceEngine.php:9 — PhutilProseDifferenceEngine.buildDiff has cognitive complexity 50 (threshold 15). Drivers by points: if/else 38, loops 9, match/switch 2, boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCalendarNotificationEngine.sendNotifications (cognitive 49) · ×1
  • PhabricatorCalendarNotificationEngine.sendNotifications (cognitive 49) src/applications/calendar/notifications/PhabricatorCalendarNotificationEngine.php:73 — PhabricatorCalendarNotificationEngine.sendNotifications has cognitive complexity 49 (threshold 15). Drivers by points: loops 26, if/else 20, error handling 2, boolean chains 1 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PhabricatorConfigClusterDatabasesController.buildClusterDatabaseStatus (cognitive 49) · ×1
  • PhabricatorConfigClusterDatabasesController.buildClusterDatabaseStatus (cognitive 49) src/applications/config/controller/services/PhabricatorConfigClusterDatabasesController.php:36 — PhabricatorConfigClusterDatabasesController.buildClusterDatabaseStatus has cognitive complexity 49 (threshold 15). Drivers by points: if/else 44, match/switch 4, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConpherenceThreadSearchEngine.renderResultList (cognitive 49) · ×1
  • ConpherenceThreadSearchEngine.renderResultList (cognitive 49) src/applications/conpherence/query/ConpherenceThreadSearchEngine.php:94 — ConpherenceThreadSearchEngine.renderResultList has cognitive complexity 49 (threshold 15). Drivers by points: if/else 27, loops 19, boolean chains 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetRenderer.processPrimitivesForOneUp (cognitive 49) · ×1
  • DifferentialChangesetRenderer.processPrimitivesForOneUp (cognitive 49) src/applications/differential/render/DifferentialChangesetRenderer.php:567 — DifferentialChangesetRenderer.processPrimitivesForOneUp has cognitive complexity 49 (threshold 15). Drivers by points: if/else 47, boolean chains 1, loops 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorSlowvoteEditController.handleRequest (cognitive 49) · ×1
  • PhabricatorSlowvoteEditController.handleRequest (cognitive 49) src/applications/slowvote/controller/PhabricatorSlowvoteEditController.php:6 — PhabricatorSlowvoteEditController.handleRequest has cognitive complexity 49 (threshold 15). Drivers by points: if/else 40, loops 9 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorEditEngine.buildResponse (cognitive 49) · ×1
  • PhabricatorEditEngine.buildResponse (cognitive 49) src/applications/transactions/editengine/PhabricatorEditEngine.php:882 — PhabricatorEditEngine.buildResponse has cognitive complexity 49 (threshold 15). Drivers by points: if/else 43, boolean chains 4, match/switch 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorEmailLoginController.handleRequest (cognitive 48) · ×1
  • PhabricatorEmailLoginController.handleRequest (cognitive 48) src/applications/auth/controller/PhabricatorEmailLoginController.php:10 — PhabricatorEmailLoginController.handleRequest has cognitive complexity 48 (threshold 15). Drivers by points: if/else 43, error handling 4, boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DarkConsoleServicesPlugin.generateData (cognitive 48) · ×1
  • DarkConsoleServicesPlugin.generateData (cognitive 48) src/applications/console/plugin/DarkConsoleServicesPlugin.php:47 — DarkConsoleServicesPlugin.generateData has cognitive complexity 48 (threshold 15). Drivers by points: if/else 36, loops 4, match/switch 4, error handling 3, boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DoorkeeperAsanaFeedWorker.publishFeedStory (cognitive 48) · ×1
  • DoorkeeperAsanaFeedWorker.publishFeedStory (cognitive 48) src/applications/doorkeeper/worker/DoorkeeperAsanaFeedWorker.php:27 — DoorkeeperAsanaFeedWorker.publishFeedStory has cognitive complexity 48 (threshold 15). Drivers by points: if/else 37, loops 8, boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhrictionEditController.handleRequest (cognitive 48) · ×1
  • PhrictionEditController.handleRequest (cognitive 48) src/applications/phriction/controller/PhrictionEditController.php:6 — PhrictionEditController.handleRequest has cognitive complexity 48 (threshold 15). Drivers by points: if/else 42, boolean chains 4, error handling 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetParser.replaceTabsWithSpaces (cognitive 47) · ×1
  • DifferentialChangesetParser.replaceTabsWithSpaces (cognitive 47) src/applications/differential/parser/DifferentialChangesetParser.php:1615 — DifferentialChangesetParser.replaceTabsWithSpaces has cognitive complexity 47 (threshold 15). Drivers by points: if/else 37, loops 10 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionLowLevelResolveRefsQuery.resolveGitRefs (cognitive 47) · ×1
  • DiffusionLowLevelResolveRefsQuery.resolveGitRefs (cognitive 47) src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php:60 — DiffusionLowLevelResolveRefsQuery.resolveGitRefs has cognitive complexity 47 (threshold 15). Drivers by points: if/else 35, loops 10, match/switch 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorChartRenderingEngine.newTabularView (cognitive 47) · ×1
  • PhabricatorChartRenderingEngine.newTabularView (cognitive 47) src/applications/fact/engine/PhabricatorChartRenderingEngine.php:112 — PhabricatorChartRenderingEngine.newTabularView has cognitive complexity 47 (threshold 15). Drivers by points: loops 32, if/else 15 (nesting depth added 29). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · HeraldNewController.handleRequest (cognitive 47) · ×1
  • HeraldNewController.handleRequest (cognitive 47) src/applications/herald/controller/HeraldNewController.php:5 — HeraldNewController.handleRequest has cognitive complexity 47 (threshold 15). Drivers by points: if/else 47 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorDifferenceEngine.applyIntralineDiff (cognitive 47) · ×1
  • PhabricatorDifferenceEngine.applyIntralineDiff (cognitive 47) src/infrastructure/diff/PhabricatorDifferenceEngine.php:172 — PhabricatorDifferenceEngine.applyIntralineDiff has cognitive complexity 47 (threshold 15). Drivers by points: if/else 33, boolean chains 7, loops 4, match/switch 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildFerretJoinClause (cognitive 47) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildFerretJoinClause (cognitive 47) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:1995 — PhabricatorCursorPagedPolicyAwareQuery.buildFerretJoinClause has cognitive complexity 47 (threshold 15). Drivers by points: if/else 38, loops 8, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCalendarEventQuery.loadPage (cognitive 46) · ×1
  • PhabricatorCalendarEventQuery.loadPage (cognitive 46) src/applications/calendar/query/PhabricatorCalendarEventQuery.php:161 — PhabricatorCalendarEventQuery.loadPage has cognitive complexity 46 (threshold 15). Drivers by points: if/else 34, loops 10, boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeraldAdapter.doesConditionMatch (cognitive 46) · ×1
  • HeraldAdapter.doesConditionMatch (cognitive 46) src/applications/herald/adapter/HeraldAdapter.php:444 — HeraldAdapter.doesConditionMatch has cognitive complexity 46 (threshold 15). Drivers by points: if/else 34, loops 6, error handling 5, match/switch 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManiphestReportController.renderBurn (cognitive 46) · ×1
  • ManiphestReportController.renderBurn (cognitive 46) src/applications/maniphest/controller/ManiphestReportController.php:74 — ManiphestReportController.renderBurn has cognitive complexity 46 (threshold 15). Drivers by points: if/else 35, loops 4, boolean chains 3, match/switch 2, ternaries 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPeopleQuery.rebuildAvailabilityCache (cognitive 46) · ×1
  • PhabricatorPeopleQuery.rebuildAvailabilityCache (cognitive 46) src/applications/people/query/PhabricatorPeopleQuery.php:385 — PhabricatorPeopleQuery.rebuildAvailabilityCache has cognitive complexity 46 (threshold 15). Drivers by points: if/else 29, loops 16, boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorBoardLayoutEngine.queueAddPosition (cognitive 46) · ×1
  • PhabricatorBoardLayoutEngine.queueAddPosition (cognitive 46) src/applications/project/engine/PhabricatorBoardLayoutEngine.php:138 — PhabricatorBoardLayoutEngine.queueAddPosition has cognitive complexity 46 (threshold 15). Drivers by points: if/else 37, loops 9 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorDiffInlineCommentQuery.willFilterPage (cognitive 46) · ×1
  • PhabricatorDiffInlineCommentQuery.willFilterPage (cognitive 46) src/infrastructure/diff/query/PhabricatorDiffInlineCommentQuery.php:144 — PhabricatorDiffInlineCommentQuery.willFilterPage has cognitive complexity 46 (threshold 15). Drivers by points: if/else 35, loops 10, boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _update (cognitive 46) · ×1
  • _update (cognitive 46) webroot/rsrc/js/phuix/PHUIXAutocomplete.js:428 — _update has cognitive complexity 46 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPeopleProfilePictureController.handleRequest (cognitive 45) · ×1
  • PhabricatorPeopleProfilePictureController.handleRequest (cognitive 45) src/applications/people/controller/PhabricatorPeopleProfilePictureController.php:6 — PhabricatorPeopleProfilePictureController.handleRequest has cognitive complexity 45 (threshold 15). Drivers by points: if/else 41, loops 3, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPolicyFilter.apply (cognitive 45) · ×1
  • PhabricatorPolicyFilter.apply (cognitive 45) src/applications/policy/filter/PhabricatorPolicyFilter.php:156 — PhabricatorPolicyFilter.apply has cognitive complexity 45 (threshold 15). Drivers by points: if/else 33, loops 11, boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilRemarkupListBlockRule.markupText (cognitive 45) · ×1
  • PhutilRemarkupListBlockRule.markupText (cognitive 45) src/infrastructure/markup/blockrule/PhutilRemarkupListBlockRule.php:88 — PhutilRemarkupListBlockRule.markupText has cognitive complexity 45 (threshold 15). Drivers by points: if/else 39, loops 5, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilICSParser.parseICSProperty (cognitive 44) · ×1
  • PhutilICSParser.parseICSProperty (cognitive 44) src/applications/calendar/parser/ics/PhutilICSParser.php:191 — PhutilICSParser.parseICSProperty has cognitive complexity 44 (threshold 15). Drivers by points: if/else 37, loops 5, boolean chains 1, match/switch 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConpherenceUpdateController.handleRequest (cognitive 44) · ×1
  • ConpherenceUpdateController.handleRequest (cognitive 44) src/applications/conpherence/controller/ConpherenceUpdateController.php:6 — ConpherenceUpdateController.handleRequest has cognitive complexity 44 (threshold 15). Drivers by points: if/else 31, match/switch 7, error handling 3, boolean chains 2, ternaries 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionServeController.isVCSRequest (cognitive 44) · ×1
  • DiffusionServeController.isVCSRequest (cognitive 44) src/applications/diffusion/controller/DiffusionServeController.php:40 — DiffusionServeController.isVCSRequest has cognitive complexity 44 (threshold 15). Drivers by points: if/else 44 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManiphestTaskDetailController.newChangesView (cognitive 44) · ×1
  • ManiphestTaskDetailController.newChangesView (cognitive 44) src/applications/maniphest/controller/ManiphestTaskDetailController.php:545 — ManiphestTaskDetailController.newChangesView has cognitive complexity 44 (threshold 15). Drivers by points: if/else 32, loops 7, ternaries 4, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhrictionDocumentQuery.buildWhereClauseParts (cognitive 44) · ×1
  • PhrictionDocumentQuery.buildWhereClauseParts (cognitive 44) src/applications/phriction/query/PhrictionDocumentQuery.php:199 — PhrictionDocumentQuery.buildWhereClauseParts has cognitive complexity 44 (threshold 15). Drivers by points: if/else 36, loops 7, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorBulkManagementExportWorkflow.newQueries (cognitive 44) · ×1
  • PhabricatorBulkManagementExportWorkflow.newQueries (cognitive 44) src/applications/transactions/bulk/management/PhabricatorBulkManagementExportWorkflow.php:152 — PhabricatorBulkManagementExportWorkflow.newQueries has cognitive complexity 44 (threshold 15). Drivers by points: if/else 36, loops 8 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _onjumpkey (cognitive 44) · ×1
  • _onjumpkey (cognitive 44) webroot/rsrc/js/application/diff/DiffChangesetList.js:650 — _onjumpkey has cognitive complexity 44 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorConfigConsoleController.loadVersions (cognitive 43) · ×1
  • PhabricatorConfigConsoleController.loadVersions (cognitive 43) src/applications/config/controller/PhabricatorConfigConsoleController.php:139 — PhabricatorConfigConsoleController.loadVersions has cognitive complexity 43 (threshold 15). Drivers by points: if/else 38, loops 5 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeraldRuleQuery.willFilterPage (cognitive 43) · ×1
  • HeraldRuleQuery.willFilterPage (cognitive 43) src/applications/herald/query/HeraldRuleQuery.php:89 — HeraldRuleQuery.willFilterPage has cognitive complexity 43 (threshold 15). Drivers by points: if/else 28, loops 14, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildPagingClauseFromMultipleColumns (cognitive 43) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildPagingClauseFromMultipleColumns (cognitive 43) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:727 — PhabricatorCursorPagedPolicyAwareQuery.buildPagingClauseFromMultipleColumns has cognitive complexity 43 (threshold 15). Drivers by points: if/else 33, match/switch 3, ternaries 3, boolean chains 2, loops 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUITimelineEventView.render (cognitive 43) · ×1
  • PHUITimelineEventView.render (cognitive 43) src/view/phui/PHUITimelineEventView.php:318 — PHUITimelineEventView.render has cognitive complexity 43 (threshold 15). Drivers by points: if/else 26, loops 9, ternaries 5, boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAuthInviteTestCase.testInviteWithKnownEmail (cognitive 42) · ×1
  • PhabricatorAuthInviteTestCase.testInviteWithKnownEmail (cognitive 42) src/applications/auth/factor/__tests__/PhabricatorAuthInviteTestCase.php:145 — PhabricatorAuthInviteTestCase.testInviteWithKnownEmail has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17, loops 10, match/switch 10, error handling 5 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorExtraConfigSetupCheck.executeChecks (cognitive 42) · ×1
  • PhabricatorExtraConfigSetupCheck.executeChecks (cognitive 42) src/applications/config/check/PhabricatorExtraConfigSetupCheck.php:9 — PhabricatorExtraConfigSetupCheck.executeChecks has cognitive complexity 42 (threshold 15). Drivers by points: if/else 36, loops 6 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPathSetupCheck.executeChecks (cognitive 42) · ×1
  • PhabricatorPathSetupCheck.executeChecks (cognitive 42) src/applications/config/check/PhabricatorPathSetupCheck.php:9 — PhabricatorPathSetupCheck.executeChecks has cognitive complexity 42 (threshold 15). Drivers by points: if/else 36, loops 5, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PassphraseQueryConduitAPIMethod.execute (cognitive 42) · ×1
  • PassphraseQueryConduitAPIMethod.execute (cognitive 42) src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php:31 — PassphraseQueryConduitAPIMethod.execute has cognitive complexity 42 (threshold 15). Drivers by points: if/else 37, boolean chains 2, match/switch 2, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPolicyFilter.applyExtendedPolicyChecks (cognitive 42) · ×1
  • PhabricatorPolicyFilter.applyExtendedPolicyChecks (cognitive 42) src/applications/policy/filter/PhabricatorPolicyFilter.php:299 — PhabricatorPolicyFilter.applyExtendedPolicyChecks has cognitive complexity 42 (threshold 15). Drivers by points: if/else 27, loops 15 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectIconSet.validateConfiguration (cognitive 42) · ×1
  • PhabricatorProjectIconSet.validateConfiguration (cognitive 42) src/applications/project/icon/PhabricatorProjectIconSet.php:195 — PhabricatorProjectIconSet.validateConfiguration has cognitive complexity 42 (threshold 15). Drivers by points: if/else 40, loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionSearchConduitAPIMethod.execute (cognitive 42) · ×1
  • TransactionSearchConduitAPIMethod.execute (cognitive 42) src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php:102 — TransactionSearchConduitAPIMethod.execute has cognitive complexity 42 (threshold 15). Drivers by points: if/else 24, match/switch 9, loops 6, error handling 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorInternationalizationManagementExtractWorkflow.extractFiles (cognitive 42) · ×1
  • PhabricatorInternationalizationManagementExtractWorkflow.extractFiles (cognitive 42) src/infrastructure/internationalization/management/PhabricatorInternationalizationManagementExtractWorkflow.php:127 — PhabricatorInternationalizationManagementExtractWorkflow.extractFiles has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 16, if/else 13, loops 8, error handling 5 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _getInlinesByType (cognitive 42) · ×1
  • _getInlinesByType (cognitive 42) webroot/rsrc/js/application/diff/DiffChangesetList.js:1968 — _getInlinesByType has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAphlictManagementWorkflow.parseLaunchArguments (cognitive 41) · ×1
  • PhabricatorAphlictManagementWorkflow.parseLaunchArguments (cognitive 41) src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php:27 — PhabricatorAphlictManagementWorkflow.parseLaunchArguments has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21, error handling 6, boolean chains 5, loops 5, match/switch 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCalendarEventCancelController.handleRequest (cognitive 41) · ×1
  • PhabricatorCalendarEventCancelController.handleRequest (cognitive 41) src/applications/calendar/controller/PhabricatorCalendarEventCancelController.php:6 — PhabricatorCalendarEventCancelController.handleRequest has cognitive complexity 41 (threshold 15). Drivers by points: if/else 29, loops 6, boolean chains 3, error handling 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialHunkParser.generateIntraLineDiffs (cognitive 41) · ×1
  • DifferentialHunkParser.generateIntraLineDiffs (cognitive 41) src/applications/differential/parser/DifferentialHunkParser.php:270 — DifferentialHunkParser.generateIntraLineDiffs has cognitive complexity 41 (threshold 15). Drivers by points: if/else 32, loops 7, boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetRenderer.buildPrimitives (cognitive 41) · ×1
  • DifferentialChangesetRenderer.buildPrimitives (cognitive 41) src/applications/differential/render/DifferentialChangesetRenderer.php:453 — DifferentialChangesetRenderer.buildPrimitives has cognitive complexity 41 (threshold 15). Drivers by points: if/else 31, loops 7, boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionCommitQuery.willFilterPage (cognitive 41) · ×1
  • DiffusionCommitQuery.willFilterPage (cognitive 41) src/applications/diffusion/query/DiffusionCommitQuery.php:293 — DiffusionCommitQuery.willFilterPage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 25, loops 16 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorChartStackedAreaDataset.newChartDisplayData (cognitive 41) · ×1
  • PhabricatorChartStackedAreaDataset.newChartDisplayData (cognitive 41) src/applications/fact/chart/PhabricatorChartStackedAreaDataset.php:19 — PhabricatorChartStackedAreaDataset.newChartDisplayData has cognitive complexity 41 (threshold 15). Drivers by points: if/else 26, loops 15 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorFeedTransactionQuery.loadPage (cognitive 41) · ×1
  • PhabricatorFeedTransactionQuery.loadPage (cognitive 41) src/applications/feed/query/PhabricatorFeedTransactionQuery.php:41 — PhabricatorFeedTransactionQuery.loadPage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 38, loops 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhortuneMerchantProviderEditController.handleMerchantRequest (cognitive 41) · ×1
  • PhortuneMerchantProviderEditController.handleMerchantRequest (cognitive 41) src/applications/phortune/controller/merchant/PhortuneMerchantProviderEditController.php:10 — PhortuneMerchantProviderEditController.handleMerchantRequest has cognitive complexity 41 (threshold 15). Drivers by points: if/else 28, loops 7, error handling 4, boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPolicyEditController.handleRequest (cognitive 41) · ×1
  • PhabricatorPolicyEditController.handleRequest (cognitive 41) src/applications/policy/controller/PhabricatorPolicyEditController.php:6 — PhabricatorPolicyEditController.handleRequest has cognitive complexity 41 (threshold 15). Drivers by points: if/else 29, loops 6, match/switch 4, error handling 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectDatasource.loadResults (cognitive 41) · ×1
  • PhabricatorProjectDatasource.loadResults (cognitive 41) src/applications/project/typeahead/PhabricatorProjectDatasource.php:18 — PhabricatorProjectDatasource.loadResults has cognitive complexity 41 (threshold 15). Drivers by points: if/else 31, loops 6, boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryGraphCache.loadLastModifiedCommitID (cognitive 41) · ×1
  • PhabricatorRepositoryGraphCache.loadLastModifiedCommitID (cognitive 41) src/applications/repository/graphcache/PhabricatorRepositoryGraphCache.php:75 — PhabricatorRepositoryGraphCache.loadLastModifiedCommitID has cognitive complexity 41 (threshold 15). Drivers by points: if/else 34, loops 5, boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryQuery.buildWhereClauseParts (cognitive 41) · ×1
  • PhabricatorRepositoryQuery.buildWhereClauseParts (cognitive 41) src/applications/repository/query/PhabricatorRepositoryQuery.php:533 — PhabricatorRepositoryQuery.buildWhereClauseParts has cognitive complexity 41 (threshold 15). Drivers by points: if/else 34, boolean chains 4, loops 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAuthStartController.handleRequest (cognitive 40) · ×1
  • PhabricatorAuthStartController.handleRequest (cognitive 40) src/applications/auth/controller/PhabricatorAuthStartController.php:10 — PhabricatorAuthStartController.handleRequest has cognitive complexity 40 (threshold 15). Drivers by points: if/else 30, loops 7, match/switch 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionRefTableController.handleRequest (cognitive 40) · ×1
  • DiffusionRefTableController.handleRequest (cognitive 40) src/applications/diffusion/controller/DiffusionRefTableController.php:9 — DiffusionRefTableController.handleRequest has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23, loops 9, ternaries 8 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhameLiveController.setupLiveEnvironment (cognitive 40) · ×1
  • PhameLiveController.setupLiveEnvironment (cognitive 40) src/applications/phame/controller/PhameLiveController.php:30 — PhameLiveController.setupLiveEnvironment has cognitive complexity 40 (threshold 15). Drivers by points: if/else 38, boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhrictionTransactionEditor.validateTransaction (cognitive 40) · ×1
  • PhrictionTransactionEditor.validateTransaction (cognitive 40) src/applications/phriction/editor/PhrictionTransactionEditor.php:348 — PhrictionTransactionEditor.validateTransaction has cognitive complexity 40 (threshold 15). Drivers by points: if/else 37, match/switch 2, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryManagementParentsWorkflow.rebuildRepository (cognitive 40) · ×1
  • PhabricatorRepositoryManagementParentsWorkflow.rebuildRepository (cognitive 40) src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php:49 — PhabricatorRepositoryManagementParentsWorkflow.rebuildRepository has cognitive complexity 40 (threshold 15). Drivers by points: loops 24, if/else 16 (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PhabricatorSearchHovercardController.handleRequest (cognitive 40) · ×1
  • PhabricatorSearchHovercardController.handleRequest (cognitive 40) src/applications/search/controller/PhabricatorSearchHovercardController.php:10 — PhabricatorSearchHovercardController.handleRequest has cognitive complexity 40 (threshold 15). Drivers by points: if/else 28, loops 12 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCacheEngine.updateObject (cognitive 40) · ×1
  • PhabricatorCacheEngine.updateObject (cognitive 40) src/applications/system/engine/PhabricatorCacheEngine.php:9 — PhabricatorCacheEngine.updateObject has cognitive complexity 40 (threshold 15). Drivers by points: if/else 30, loops 10 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorInlineCommentController.processRequest (cognitive 40) · ×1
  • PhabricatorInlineCommentController.processRequest (cognitive 40) src/infrastructure/diff/PhabricatorInlineCommentController.php:93 — PhabricatorInlineCommentController.processRequest has cognitive complexity 40 (threshold 15). Drivers by points: if/else 36, match/switch 3, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAuthInviteAction.newActionListFromAddresses (cognitive 39) · ×1
  • PhabricatorAuthInviteAction.newActionListFromAddresses (cognitive 39) src/applications/auth/data/PhabricatorAuthInviteAction.php:94 — PhabricatorAuthInviteAction.newActionListFromAddresses has cognitive complexity 39 (threshold 15). Drivers by points: if/else 26, loops 10, match/switch 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorConfigSchemaSpec.getDetailsForDataType (cognitive 39) · ×1
  • PhabricatorConfigSchemaSpec.getDetailsForDataType (cognitive 39) src/applications/config/schema/PhabricatorConfigSchemaSpec.php:269 — PhabricatorConfigSchemaSpec.getDetailsForDataType has cognitive complexity 39 (threshold 15). Drivers by points: if/else 33, match/switch 6 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialRevisionUpdateHistoryView.render (cognitive 39) · ×1
  • DifferentialRevisionUpdateHistoryView.render (cognitive 39) src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php:38 — DifferentialRevisionUpdateHistoryView.render has cognitive complexity 39 (threshold 15). Drivers by points: if/else 27, ternaries 9, loops 2, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhrictionDocumentQuery.willFilterPage (cognitive 39) · ×1
  • PhrictionDocumentQuery.willFilterPage (cognitive 39) src/applications/phriction/query/PhrictionDocumentQuery.php:69 — PhrictionDocumentQuery.willFilterPage has cognitive complexity 39 (threshold 15). Drivers by points: loops 20, if/else 19 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · (anonymous) (cognitive 39) · ×1
  • (anonymous) (cognitive 39) webroot/rsrc/js/application/diffusion/behavior-commit-graph.js:8 — (anonymous) has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAuditManagementDeleteWorkflow.execute (cognitive 38) · ×1
  • PhabricatorAuditManagementDeleteWorkflow.execute (cognitive 38) src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php:62 — PhabricatorAuditManagementDeleteWorkflow.execute has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23, loops 9, boolean chains 6 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CelerityResourceController.serveResource (cognitive 38) · ×1
  • CelerityResourceController.serveResource (cognitive 38) src/applications/celerity/controller/CelerityResourceController.php:27 — CelerityResourceController.serveResource has cognitive complexity 38 (threshold 15). Drivers by points: if/else 25, error handling 6, boolean chains 4, loops 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorDashboardTabsPanelType.renderPanelContent (cognitive 38) · ×1
  • PhabricatorDashboardTabsPanelType.renderPanelContent (cognitive 38) src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:46 — PhabricatorDashboardTabsPanelType.renderPanelContent has cognitive complexity 38 (threshold 15). Drivers by points: if/else 30, boolean chains 3, loops 3, ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialGetCommitMessageConduitAPIMethod.execute (cognitive 38) · ×1
  • DifferentialGetCommitMessageConduitAPIMethod.execute (cognitive 38) src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php:34 — DifferentialGetCommitMessageConduitAPIMethod.execute has cognitive complexity 38 (threshold 15). Drivers by points: if/else 28, boolean chains 5, loops 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionRepositoryProfilePictureController.handleRequest (cognitive 38) · ×1
  • DiffusionRepositoryProfilePictureController.handleRequest (cognitive 38) src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php:6 — DiffusionRepositoryProfilePictureController.handleRequest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 35, loops 2, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorFeedStory.loadAllFromRows (cognitive 38) · ×1
  • PhabricatorFeedStory.loadAllFromRows (cognitive 38) src/applications/feed/story/PhabricatorFeedStory.php:41 — PhabricatorFeedStory.loadAllFromRows has cognitive complexity 38 (threshold 15). Drivers by points: loops 20, if/else 15, error handling 2, boolean chains 1 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · HeraldEngine.applyRules (cognitive 38) · ×1
  • HeraldEngine.applyRules (cognitive 38) src/applications/herald/engine/HeraldEngine.php:126 — HeraldEngine.applyRules has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18, loops 10, error handling 8, boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorEmailAddressesSettingsPanel.returnNewAddressResponse (cognitive 38) · ×1
  • PhabricatorEmailAddressesSettingsPanel.returnNewAddressResponse (cognitive 38) src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php:158 — PhabricatorEmailAddressesSettingsPanel.returnNewAddressResponse has cognitive complexity 38 (threshold 15). Drivers by points: if/else 34, error handling 3, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildEdgeLogicJoinClause (cognitive 38) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildEdgeLogicJoinClause (cognitive 38) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:2694 — PhabricatorCursorPagedPolicyAwareQuery.buildEdgeLogicJoinClause has cognitive complexity 38 (threshold 15). Drivers by points: loops 24, if/else 7, match/switch 7 (nesting depth added 26). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PhabricatorConfigDatabaseIssueController.handleRequest (cognitive 37) · ×1
  • PhabricatorConfigDatabaseIssueController.handleRequest (cognitive 37) src/applications/config/controller/services/PhabricatorConfigDatabaseIssueController.php:6 — PhabricatorConfigDatabaseIssueController.handleRequest has cognitive complexity 37 (threshold 15). Drivers by points: loops 33, if/else 4 (nesting depth added 23). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DiffusionLowLevelResolveRefsQuery.resolveMercurialRefs (cognitive 37) · ×1
  • DiffusionLowLevelResolveRefsQuery.resolveMercurialRefs (cognitive 37) src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php:243 — DiffusionLowLevelResolveRefsQuery.resolveMercurialRefs has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19, loops 16, error handling 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionCommitGraphView.newObjectItemViews (cognitive 37) · ×1
  • DiffusionCommitGraphView.newObjectItemViews (cognitive 37) src/applications/diffusion/view/DiffusionCommitGraphView.php:105 — DiffusionCommitGraphView.newObjectItemViews has cognitive complexity 37 (threshold 15). Drivers by points: if/else 25, loops 12 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorOwnersPackageQuery.getControllingPackagesForPath (cognitive 37) · ×1
  • PhabricatorOwnersPackageQuery.getControllingPackagesForPath (cognitive 37) src/applications/owners/query/PhabricatorOwnersPackageQuery.php:369 — PhabricatorOwnersPackageQuery.getControllingPackagesForPath has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26, loops 10, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectColumnQuery.didFilterPage (cognitive 37) · ×1
  • PhabricatorProjectColumnQuery.didFilterPage (cognitive 37) src/applications/project/query/PhabricatorProjectColumnQuery.php:88 — PhabricatorProjectColumnQuery.didFilterPage has cognitive complexity 37 (threshold 15). Drivers by points: if/else 31, loops 6 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectQuery.willFilterPage (cognitive 37) · ×1
  • PhabricatorProjectQuery.willFilterPage (cognitive 37) src/applications/project/query/PhabricatorProjectQuery.php:239 — PhabricatorProjectQuery.willFilterPage has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26, loops 8, boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryPullEngine.pullRepositoryWithLock (cognitive 37) · ×1
  • PhabricatorRepositoryPullEngine.pullRepositoryWithLock (cognitive 37) src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:51 — PhabricatorRepositoryPullEngine.pullRepositoryWithLock has cognitive complexity 37 (threshold 15). Drivers by points: if/else 33, loops 2, error handling 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryRefEngine.updateCursors (cognitive 37) · ×1
  • PhabricatorRepositoryRefEngine.updateCursors (cognitive 37) src/applications/repository/engine/PhabricatorRepositoryRefEngine.php:258 — PhabricatorRepositoryRefEngine.updateCursors has cognitive complexity 37 (threshold 15). Drivers by points: if/else 25, loops 11, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationSearchEngine.buildConduitResponse (cognitive 37) · ×1
  • PhabricatorApplicationSearchEngine.buildConduitResponse (cognitive 37) src/applications/search/engine/PhabricatorApplicationSearchEngine.php:1134 — PhabricatorApplicationSearchEngine.buildConduitResponse has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19, loops 17, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilRemarkupCodeBlockRule.markupText (cognitive 37) · ×1
  • PhutilRemarkupCodeBlockRule.markupText (cognitive 37) src/infrastructure/markup/blockrule/PhutilRemarkupCodeBlockRule.php:46 — PhutilRemarkupCodeBlockRule.markupText has cognitive complexity 37 (threshold 15). Drivers by points: if/else 30, loops 6, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorActionView.render (cognitive 37) · ×1
  • PhabricatorActionView.render (cognitive 37) src/view/layout/PhabricatorActionView.php:198 — PhabricatorActionView.render has cognitive complexity 37 (threshold 15). Drivers by points: if/else 34, loops 2, ternaries 1 (nesting depth added 9). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ConpherenceTransactionRenderer.renderTransactions (cognitive 36) · ×1
  • ConpherenceTransactionRenderer.renderTransactions (cognitive 36) src/applications/conpherence/ConpherenceTransactionRenderer.php:5 — ConpherenceTransactionRenderer.renderTransactions has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, loops 2, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialTransactionEditor.buildMailBody (cognitive 36) · ×1
  • DifferentialTransactionEditor.buildMailBody (cognitive 36) src/applications/differential/editor/DifferentialTransactionEditor.php:662 — DifferentialTransactionEditor.buildMailBody has cognitive complexity 36 (threshold 15). Drivers by points: if/else 25, boolean chains 4, error handling 3, loops 2, match/switch 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialRevisionListView.render (cognitive 36) · ×1
  • DifferentialRevisionListView.render (cognitive 36) src/applications/differential/view/DifferentialRevisionListView.php:50 — DifferentialRevisionListView.render has cognitive complexity 36 (threshold 15). Drivers by points: if/else 29, loops 6, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialRevisionReviewTransaction.applyReviewerEffect (cognitive 36) · ×1
  • DifferentialRevisionReviewTransaction.applyReviewerEffect (cognitive 36) src/applications/differential/xaction/DifferentialRevisionReviewTransaction.php:163 — DifferentialRevisionReviewTransaction.applyReviewerEffect has cognitive complexity 36 (threshold 15). Drivers by points: if/else 29, loops 4, error handling 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionCommitController.buildPropertyListView (cognitive 36) · ×1
  • DiffusionCommitController.buildPropertyListView (cognitive 36) src/applications/diffusion/controller/DiffusionCommitController.php:524 — DiffusionCommitController.buildPropertyListView has cognitive complexity 36 (threshold 15). Drivers by points: if/else 25, loops 10, boolean chains 1 (nesting depth added 10). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PhabricatorFileViewController.buildPropertyViews (cognitive 36) · ×1
  • PhabricatorFileViewController.buildPropertyViews (cognitive 36) src/applications/files/controller/PhabricatorFileViewController.php:218 — PhabricatorFileViewController.buildPropertyViews has cognitive complexity 36 (threshold 15). Drivers by points: if/else 24, ternaries 6, boolean chains 3, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HarbormasterBuildEngine.updateBuildable (cognitive 36) · ×1
  • HarbormasterBuildEngine.updateBuildable (cognitive 36) src/applications/harbormaster/engine/HarbormasterBuildEngine.php:442 — HarbormasterBuildEngine.updateBuildable has cognitive complexity 36 (threshold 15). Drivers by points: if/else 29, loops 3, boolean chains 2, match/switch 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectEditPictureController.handleRequest (cognitive 36) · ×1
  • PhabricatorProjectEditPictureController.handleRequest (cognitive 36) src/applications/project/controller/PhabricatorProjectEditPictureController.php:6 — PhabricatorProjectEditPictureController.handleRequest has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, loops 2, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorSubscriptionsHeraldAction.applySubscribe (cognitive 36) · ×1
  • PhabricatorSubscriptionsHeraldAction.applySubscribe (cognitive 36) src/applications/subscriptions/herald/PhabricatorSubscriptionsHeraldAction.php:19 — PhabricatorSubscriptionsHeraldAction.applySubscribe has cognitive complexity 36 (threshold 15). Drivers by points: if/else 29, loops 7 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilXHPASTSyntaxHighlighterFuture.applyXHPHighlight (cognitive 36) · ×1
  • PhutilXHPASTSyntaxHighlighterFuture.applyXHPHighlight (cognitive 36) src/infrastructure/markup/syntax/highlighter/xhpast/PhutilXHPASTSyntaxHighlighterFuture.php:31 — PhutilXHPASTSyntaxHighlighterFuture.applyXHPHighlight has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28, loops 4, match/switch 3, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorStandardPageView.willRenderPage (cognitive 36) · ×1
  • PhabricatorStandardPageView.willRenderPage (cognitive 36) src/view/page/PhabricatorStandardPageView.php:199 — PhabricatorStandardPageView.willRenderPage has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28, ternaries 8 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAuthLoginController.handleRequest (cognitive 35) · ×1
  • PhabricatorAuthLoginController.handleRequest (cognitive 35) src/applications/auth/controller/PhabricatorAuthLoginController.php:28 — PhabricatorAuthLoginController.handleRequest has cognitive complexity 35 (threshold 15). Drivers by points: if/else 33, boolean chains 1, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorDuoAuthFactor.processAddFactorForm (cognitive 35) · ×1
  • PhabricatorDuoAuthFactor.processAddFactorForm (cognitive 35) src/applications/auth/factor/PhabricatorDuoAuthFactor.php:155 — PhabricatorDuoAuthFactor.processAddFactorForm has cognitive complexity 35 (threshold 15). Drivers by points: if/else 23, match/switch 8, ternaries 3, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilCalendarRecurrenceRule.newYearMap (cognitive 35) · ×1
  • PhutilCalendarRecurrenceRule.newYearMap (cognitive 35) src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php:1349 — PhutilCalendarRecurrenceRule.newYearMap has cognitive complexity 35 (threshold 15). Drivers by points: if/else 27, loops 5, boolean chains 2, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorWebServerSetupCheck.executeChecks (cognitive 35) · ×1
  • PhabricatorWebServerSetupCheck.executeChecks (cognitive 35) src/applications/config/check/PhabricatorWebServerSetupCheck.php:9 — PhabricatorWebServerSetupCheck.executeChecks has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, boolean chains 5, error handling 3, loops 2 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PhabricatorConfigEditController.handleRequest (cognitive 35) · ×1
  • PhabricatorConfigEditController.handleRequest (cognitive 35) src/applications/config/controller/settings/PhabricatorConfigEditController.php:6 — PhabricatorConfigEditController.handleRequest has cognitive complexity 35 (threshold 15). Drivers by points: if/else 29, error handling 3, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ConpherenceRoomPictureController.handleRequest (cognitive 35) · ×1
  • ConpherenceRoomPictureController.handleRequest (cognitive 35) src/applications/conpherence/controller/ConpherenceRoomPictureController.php:6 — ConpherenceRoomPictureController.handleRequest has cognitive complexity 35 (threshold 15). Drivers by points: if/else 33, boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialTransactionEditor.updateReviewStatus (cognitive 35) · ×1
  • DifferentialTransactionEditor.updateReviewStatus (cognitive 35) src/applications/differential/editor/DifferentialTransactionEditor.php:403 — DifferentialTransactionEditor.updateReviewStatus has cognitive complexity 35 (threshold 15). Drivers by points: if/else 27, boolean chains 5, match/switch 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DivinerAtomQuery.buildWhereClause (cognitive 35) · ×1
  • DivinerAtomQuery.buildWhereClause (cognitive 35) src/applications/diviner/query/DivinerAtomQuery.php:302 — DivinerAtomQuery.buildWhereClause has cognitive complexity 35 (threshold 15). Drivers by points: if/else 30, loops 4, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorFileQuery.loadPage (cognitive 35) · ×1
  • PhabricatorFileQuery.loadPage (cognitive 35) src/applications/files/query/PhabricatorFileQuery.php:166 — PhabricatorFileQuery.loadPage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, loops 10 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorMailEmailEngine.newMessage (cognitive 35) · ×1
  • PhabricatorMailEmailEngine.newMessage (cognitive 35) src/applications/metamta/engine/PhabricatorMailEmailEngine.php:6 — PhabricatorMailEmailEngine.newMessage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 27, loops 5, boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorMetaMTAMemberQuery.execute (cognitive 35) · ×1
  • PhabricatorMetaMTAMemberQuery.execute (cognitive 35) src/applications/metamta/query/PhabricatorMetaMTAMemberQuery.php:26 — PhabricatorMetaMTAMemberQuery.execute has cognitive complexity 35 (threshold 15). Drivers by points: loops 24, if/else 9, match/switch 2 (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PhameBlogProfilePictureController.handleRequest (cognitive 35) · ×1
  • PhameBlogProfilePictureController.handleRequest (cognitive 35) src/applications/phame/controller/blog/PhameBlogProfilePictureController.php:6 — PhameBlogProfilePictureController.handleRequest has cognitive complexity 35 (threshold 15). Drivers by points: if/else 33, boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhrequentUserTimeQuery.didFilterPage (cognitive 35) · ×1
  • PhrequentUserTimeQuery.didFilterPage (cognitive 35) src/applications/phrequent/query/PhrequentUserTimeQuery.php:159 — PhrequentUserTimeQuery.didFilterPage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 26, loops 7, boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectSearchEngine.buildQueryFromParameters (cognitive 35) · ×1
  • PhabricatorProjectSearchEngine.buildQueryFromParameters (cognitive 35) src/applications/project/query/PhabricatorProjectSearchEngine.php:130 — PhabricatorProjectSearchEngine.buildQueryFromParameters has cognitive complexity 35 (threshold 15). Drivers by points: if/else 32, boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorSearchRelationshipController.handleRequest (cognitive 35) · ×1
  • PhabricatorSearchRelationshipController.handleRequest (cognitive 35) src/applications/search/controller/PhabricatorSearchRelationshipController.php:6 — PhabricatorSearchRelationshipController.handleRequest has cognitive complexity 35 (threshold 15). Drivers by points: if/else 23, loops 5, error handling 4, boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUICalendarMonthView.render (cognitive 35) · ×1
  • PHUICalendarMonthView.render (cognitive 35) src/view/phui/calendar/PHUICalendarMonthView.php:53 — PHUICalendarMonthView.render has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22, loops 12, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redraw (cognitive 35) · ×1
  • redraw (cognitive 35) webroot/rsrc/js/application/diff/DiffTreeView.js:87 — redraw has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHPMailerLite.MailSend (cognitive 34) · ×1
  • PHPMailerLite.MailSend (cognitive 34) externals/phpmailer/class.phpmailer-lite.php:649 — PHPMailerLite.MailSend has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 14, if/else 10, loops 7, boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHPMailer.MailSend (cognitive 34) · ×1
  • PHPMailer.MailSend (cognitive 34) externals/phpmailer/class.phpmailer.php:628 — PHPMailer.MailSend has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 14, if/else 10, loops 7, boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorConfigSchemaQuery.loadActualSchemaForServer (cognitive 34) · ×1
  • PhabricatorConfigSchemaQuery.loadActualSchemaForServer (cognitive 34) src/applications/config/schema/PhabricatorConfigSchemaQuery.php:64 — PhabricatorConfigSchemaQuery.loadActualSchemaForServer has cognitive complexity 34 (threshold 15). Drivers by points: loops 16, if/else 14, error handling 4 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DifferentialChangesetParser.newDocumentEngine (cognitive 34) · ×1
  • DifferentialChangesetParser.newDocumentEngine (cognitive 34) src/applications/differential/parser/DifferentialChangesetParser.php:1746 — DifferentialChangesetParser.newDocumentEngine has cognitive complexity 34 (threshold 15). Drivers by points: if/else 32, boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DivinerPHPAtomizer.executeAtomize (cognitive 34) · ×1
  • DivinerPHPAtomizer.executeAtomize (cognitive 34) src/applications/diviner/atomizer/DivinerPHPAtomizer.php:9 — DivinerPHPAtomizer.executeAtomize has cognitive complexity 34 (threshold 15). Drivers by points: loops 21, if/else 7, match/switch 6 (nesting depth added 22). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PhabricatorFilesManagementRebuildWorkflow.execute (cognitive 34) · ×1
  • PhabricatorFilesManagementRebuildWorkflow.execute (cognitive 34) src/applications/files/management/PhabricatorFilesManagementRebuildWorkflow.php:30 — PhabricatorFilesManagementRebuildWorkflow.execute has cognitive complexity 34 (threshold 15). Drivers by points: if/else 25, loops 5, error handling 3, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManiphestConduitAPIMethod.applyRequest (cognitive 34) · ×1
  • ManiphestConduitAPIMethod.applyRequest (cognitive 34) src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php:53 — ManiphestConduitAPIMethod.applyRequest has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, loops 3, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NuanceGitHubImportCursor.pullDataFromSource (cognitive 34) · ×1
  • NuanceGitHubImportCursor.pullDataFromSource (cognitive 34) src/applications/nuance/cursor/NuanceGitHubImportCursor.php:56 — NuanceGitHubImportCursor.pullDataFromSource has cognitive complexity 34 (threshold 15). Drivers by points: if/else 26, loops 8 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhortuneMerchantPictureController.handleMerchantRequest (cognitive 34) · ×1
  • PhortuneMerchantPictureController.handleMerchantRequest (cognitive 34) src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php:10 — PhortuneMerchantPictureController.handleMerchantRequest has cognitive complexity 34 (threshold 15). Drivers by points: if/else 32, boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhrequentTrackController.processRequest (cognitive 34) · ×1
  • PhrequentTrackController.processRequest (cognitive 34) src/applications/phrequent/controller/PhrequentTrackController.php:14 — PhrequentTrackController.processRequest has cognitive complexity 34 (threshold 15). Drivers by points: if/else 33, match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectTriggerSearchEngine.renderResultList (cognitive 34) · ×1
  • PhabricatorProjectTriggerSearchEngine.renderResultList (cognitive 34) src/applications/project/query/PhabricatorProjectTriggerSearchEngine.php:72 — PhabricatorProjectTriggerSearchEngine.renderResultList has cognitive complexity 34 (threshold 15). Drivers by points: if/else 32, loops 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationTransactionEditor.addHeadersAndCommentsToMailBody (cognitive 34) · ×1
  • PhabricatorApplicationTransactionEditor.addHeadersAndCommentsToMailBody (cognitive 34) src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3859 — PhabricatorApplicationTransactionEditor.addHeadersAndCommentsToMailBody has cognitive complexity 34 (threshold 15). Drivers by points: if/else 28, loops 4, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilRemarkupSimpleTableBlockRule.markupText (cognitive 34) · ×1
  • PhutilRemarkupSimpleTableBlockRule.markupText (cognitive 34) src/infrastructure/markup/blockrule/PhutilRemarkupSimpleTableBlockRule.php:19 — PhutilRemarkupSimpleTableBlockRule.markupText has cognitive complexity 34 (threshold 15). Drivers by points: if/else 26, loops 7, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · render.phutil_escape_html (cognitive 34) · ×1
  • render.phutil_escape_html (cognitive 34) src/infrastructure/markup/render.php:107 — render.phutil_escape_html has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24, error handling 6, loops 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SMTP.Data (cognitive 33) · ×1
  • SMTP.Data (cognitive 33) externals/phpmailer/class.smtp.php:326 — SMTP.Data has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26, loops 5, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionCommitHookEngine.findGitChangeFlags (cognitive 33) · ×1
  • DiffusionCommitHookEngine.findGitChangeFlags (cognitive 33) src/applications/diffusion/engine/DiffusionCommitHookEngine.php:526 — DiffusionCommitHookEngine.findGitChangeFlags has cognitive complexity 33 (threshold 15). Drivers by points: if/else 31, boolean chains 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionRepositoryClusterEngine.synchronizeWorkingCopyBeforeRead (cognitive 33) · ×1
  • DiffusionRepositoryClusterEngine.synchronizeWorkingCopyBeforeRead (cognitive 33) src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php:153 — DiffusionRepositoryClusterEngine.synchronizeWorkingCopyBeforeRead has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, loops 6, boolean chains 1, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeraldTranscriptController.buildActionTranscriptPanel (cognitive 33) · ×1
  • HeraldTranscriptController.buildActionTranscriptPanel (cognitive 33) src/applications/herald/controller/HeraldTranscriptController.php:226 — HeraldTranscriptController.buildActionTranscriptPanel has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, loops 8 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhluxEditController.handleRequest (cognitive 33) · ×1
  • PhluxEditController.handleRequest (cognitive 33) src/applications/phlux/controller/PhluxEditController.php:5 — PhluxEditController.handleRequest has cognitive complexity 33 (threshold 15). Drivers by points: if/else 27, error handling 3, boolean chains 2, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPhortuneManagementInvoiceWorkflow.execute (cognitive 33) · ×1
  • PhabricatorPhortuneManagementInvoiceWorkflow.execute (cognitive 33) src/applications/phortune/management/PhabricatorPhortuneManagementInvoiceWorkflow.php:49 — PhabricatorPhortuneManagementInvoiceWorkflow.execute has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, boolean chains 7, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositorySvnCommitChangeParserWorker.parseRecursiveListFileData (cognitive 33) · ×1
  • PhabricatorRepositorySvnCommitChangeParserWorker.parseRecursiveListFileData (cognitive 33) src/applications/repository/worker/commitchangeparser/PhabricatorRepositorySvnCommitChangeParserWorker.php:676 — PhabricatorRepositorySvnCommitChangeParserWorker.parseRecursiveListFileData has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, match/switch 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationSearchController.newQueryListView (cognitive 33) · ×1
  • PhabricatorApplicationSearchController.newQueryListView (cognitive 33) src/applications/search/controller/PhabricatorApplicationSearchController.php:621 — PhabricatorApplicationSearchController.newQueryListView has cognitive complexity 33 (threshold 15). Drivers by points: if/else 31, boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorFerretFulltextEngineExtension.indexFulltextObject (cognitive 33) · ×1
  • PhabricatorFerretFulltextEngineExtension.indexFulltextObject (cognitive 33) src/applications/search/engineextension/PhabricatorFerretFulltextEngineExtension.php:19 — PhabricatorFerretFulltextEngineExtension.indexFulltextObject has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21, loops 6, match/switch 4, error handling 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorDatabaseRef.queryRefs (cognitive 33) · ×1
  • PhabricatorDatabaseRef.queryRefs (cognitive 33) src/infrastructure/cluster/PhabricatorDatabaseRef.php:342 — PhabricatorDatabaseRef.queryRefs has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24, error handling 6, boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilRemarkupListBlockRule.getMatchingLineCount (cognitive 33) · ×1
  • PhutilRemarkupListBlockRule.getMatchingLineCount (cognitive 33) src/infrastructure/markup/blockrule/PhutilRemarkupListBlockRule.php:13 — PhutilRemarkupListBlockRule.getMatchingLineCount has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28, boolean chains 4, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _getFragmentLocation (cognitive 33) · ×1
  • _getFragmentLocation (cognitive 33) webroot/rsrc/js/application/diff/DiffChangesetList.js:2643 — _getFragmentLocation has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialRevisionViewController.getOldDiffID (cognitive 32) · ×1
  • DifferentialRevisionViewController.getOldDiffID (cognitive 32) src/applications/differential/controller/DifferentialRevisionViewController.php:1321 — DifferentialRevisionViewController.getOldDiffID has cognitive complexity 32 (threshold 15). Drivers by points: if/else 24, loops 7, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialLocalCommitsView.render (cognitive 32) · ×1
  • DifferentialLocalCommitsView.render (cognitive 32) src/applications/differential/view/DifferentialLocalCommitsView.php:19 — DifferentialLocalCommitsView.render has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27, loops 4, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorFilesManagementMigrateWorkflow.execute (cognitive 32) · ×1
  • PhabricatorFilesManagementMigrateWorkflow.execute (cognitive 32) src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php:57 — PhabricatorFilesManagementMigrateWorkflow.execute has cognitive complexity 32 (threshold 15). Drivers by points: if/else 25, error handling 4, boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManiphestTaskQuery.buildWhereClauseParts (cognitive 32) · ×1
  • ManiphestTaskQuery.buildWhereClauseParts (cognitive 32) src/applications/maniphest/query/ManiphestTaskQuery.php:354 — ManiphestTaskQuery.buildWhereClauseParts has cognitive complexity 32 (threshold 15). Drivers by points: if/else 25, loops 7 (nesting depth added 9). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PhutilDaemonOverseer.run (cognitive 32) · ×1
  • PhutilDaemonOverseer.run (cognitive 32) src/infrastructure/daemon/PhutilDaemonOverseer.php:162 — PhutilDaemonOverseer.run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 28, loops 3, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorTaskmasterDaemon.run (cognitive 32) · ×1
  • PhabricatorTaskmasterDaemon.run (cognitive 32) src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:5 — PhabricatorTaskmasterDaemon.run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 28, loops 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilRemarkupBlockRule.renderRemarkupTable (cognitive 32) · ×1
  • PhutilRemarkupBlockRule.renderRemarkupTable (cognitive 32) src/infrastructure/markup/blockrule/PhutilRemarkupBlockRule.php:105 — PhutilRemarkupBlockRule.renderRemarkupTable has cognitive complexity 32 (threshold 15). Drivers by points: loops 17, if/else 10, ternaries 5 (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PhabricatorMainMenuView.render (cognitive 32) · ×1
  • PhabricatorMainMenuView.render (cognitive 32) src/view/page/menu/PhabricatorMainMenuView.php:51 — PhabricatorMainMenuView.render has cognitive complexity 32 (threshold 15). Drivers by points: if/else 24, loops 8 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorConduitAPIController.handleRequest (cognitive 31) · ×1
  • PhabricatorConduitAPIController.handleRequest (cognitive 31) src/applications/conduit/controller/PhabricatorConduitAPIController.php:10 — PhabricatorConduitAPIController.handleRequest has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, error handling 3, boolean chains 1, match/switch 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorBinariesSetupCheck.executeChecks (cognitive 31) · ×1
  • PhabricatorBinariesSetupCheck.executeChecks (cognitive 31) src/applications/config/check/PhabricatorBinariesSetupCheck.php:9 — PhabricatorBinariesSetupCheck.executeChecks has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23, loops 4, match/switch 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorDashboardPanelsTransaction.validateTransactions (cognitive 31) · ×1
  • PhabricatorDashboardPanelsTransaction.validateTransactions (cognitive 31) src/applications/dashboard/xaction/dashboard/PhabricatorDashboardPanelsTransaction.php:22 — PhabricatorDashboardPanelsTransaction.validateTransactions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, loops 6, error handling 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialCommitMessageParser.parseCorpus (cognitive 31) · ×1
  • DifferentialCommitMessageParser.parseCorpus (cognitive 31) src/applications/differential/parser/DifferentialCommitMessageParser.php:136 — DifferentialCommitMessageParser.parseCorpus has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23, loops 5, boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialLineAdjustmentMap.mapLine (cognitive 31) · ×1
  • DifferentialLineAdjustmentMap.mapLine (cognitive 31) src/applications/differential/parser/DifferentialLineAdjustmentMap.php:65 — DifferentialLineAdjustmentMap.mapLine has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, loops 4, boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionLintSaveRunner.run (cognitive 31) · ×1
  • DiffusionLintSaveRunner.run (cognitive 31) src/applications/diffusion/DiffusionLintSaveRunner.php:45 — DiffusionLintSaveRunner.run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 26, error handling 2, ternaries 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionRepositoryURIViewController.buildPropertySection (cognitive 31) · ×1
  • DiffusionRepositoryURIViewController.buildPropertySection (cognitive 31) src/applications/diffusion/controller/DiffusionRepositoryURIViewController.php:178 — DiffusionRepositoryURIViewController.buildPropertySection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 31 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeraldEngine.isForbidden (cognitive 31) · ×1
  • HeraldEngine.isForbidden (cognitive 31) src/applications/herald/engine/HeraldEngine.php:790 — HeraldEngine.isForbidden has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17, loops 8, error handling 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LegalpadDocumentSignatureAddController.handleRequest (cognitive 31) · ×1
  • LegalpadDocumentSignatureAddController.handleRequest (cognitive 31) src/applications/legalpad/controller/LegalpadDocumentSignatureAddController.php:5 — LegalpadDocumentSignatureAddController.handleRequest has cognitive complexity 31 (threshold 15). Drivers by points: if/else 31 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorLipsumGenerateWorkflow.execute (cognitive 31) · ×1
  • PhabricatorLipsumGenerateWorkflow.execute (cognitive 31) src/applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php:31 — PhabricatorLipsumGenerateWorkflow.execute has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23, loops 8 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManiphestTaskStatus.validateConfiguration (cognitive 31) · ×1
  • ManiphestTaskStatus.validateConfiguration (cognitive 31) src/applications/maniphest/constants/ManiphestTaskStatus.php:261 — ManiphestTaskStatus.validateConfiguration has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23, loops 4, boolean chains 2, match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPeopleSearchEngine.renderResultList (cognitive 31) · ×1
  • PhabricatorPeopleSearchEngine.renderResultList (cognitive 31) src/applications/people/query/PhabricatorPeopleSearchEngine.php:233 — PhabricatorPeopleSearchEngine.renderResultList has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPeopleDatasource.loadResults (cognitive 31) · ×1
  • PhabricatorPeopleDatasource.loadResults (cognitive 31) src/applications/people/typeahead/PhabricatorPeopleDatasource.php:18 — PhabricatorPeopleDatasource.loadResults has cognitive complexity 31 (threshold 15). Drivers by points: if/else 29, boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectBoardReorderController.handleRequest (cognitive 31) · ×1
  • PhabricatorProjectBoardReorderController.handleRequest (cognitive 31) src/applications/project/controller/PhabricatorProjectBoardReorderController.php:6 — PhabricatorProjectBoardReorderController.handleRequest has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24, loops 5, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectQuery.buildWhereClauseParts (cognitive 31) · ×1
  • PhabricatorProjectQuery.buildWhereClauseParts (cognitive 31) src/applications/project/query/PhabricatorProjectQuery.php:457 — PhabricatorProjectQuery.buildWhereClauseParts has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, loops 4, match/switch 2 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PhabricatorSearchResultView.emboldenQuery (cognitive 31) · ×1
  • PhabricatorSearchResultView.emboldenQuery (cognitive 31) src/applications/search/view/PhabricatorSearchResultView.php:59 — PhabricatorSearchResultView.emboldenQuery has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, loops 7, match/switch 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationTransactionEditor.mergePHIDOrEdgeTransactions (cognitive 31) · ×1
  • PhabricatorApplicationTransactionEditor.mergePHIDOrEdgeTransactions (cognitive 31) src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2481 — PhabricatorApplicationTransactionEditor.mergePHIDOrEdgeTransactions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 26, loops 5 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorJavelinLinter.lintPath (cognitive 31) · ×1
  • PhabricatorJavelinLinter.lintPath (cognitive 31) src/infrastructure/lint/linter/PhabricatorJavelinLinter.php:104 — PhabricatorJavelinLinter.lintPath has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, loops 7, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorManagementWorkflow.loadUsersFromArguments (cognitive 31) · ×1
  • PhabricatorManagementWorkflow.loadUsersFromArguments (cognitive 31) src/infrastructure/management/PhabricatorManagementWorkflow.php:70 — PhabricatorManagementWorkflow.loadUsersFromArguments has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17, loops 13, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilXHPASTSyntaxHighlighterFuture.findInterestingSymbols (cognitive 31) · ×1
  • PhutilXHPASTSyntaxHighlighterFuture.findInterestingSymbols (cognitive 31) src/infrastructure/markup/syntax/highlighter/xhpast/PhutilXHPASTSyntaxHighlighterFuture.php:164 — PhutilXHPASTSyntaxHighlighterFuture.findInterestingSymbols has cognitive complexity 31 (threshold 15). Drivers by points: loops 15, if/else 14, boolean chains 2 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildEdgeLogicWhereClause (cognitive 31) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildEdgeLogicWhereClause (cognitive 31) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:2814 — PhabricatorCursorPagedPolicyAwareQuery.buildEdgeLogicWhereClause has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15, loops 12, match/switch 3, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorSourceCodeView.render (cognitive 31) · ×1
  • PhabricatorSourceCodeView.render (cognitive 31) src/view/layout/PhabricatorSourceCodeView.php:72 — PhabricatorSourceCodeView.render has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, loops 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHPMailer.SmtpConnect (cognitive 30) · ×1
  • PHPMailer.SmtpConnect (cognitive 30) externals/phpmailer/class.phpmailer.php:756 — PHPMailer.SmtpConnect has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, ternaries 5, boolean chains 1, error handling 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCalendarEventViewController.buildPropertySection (cognitive 30) · ×1
  • PhabricatorCalendarEventViewController.buildPropertySection (cognitive 30) src/applications/calendar/controller/PhabricatorCalendarEventViewController.php:275 — PhabricatorCalendarEventViewController.buildPropertySection has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, loops 5 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorConfigManagementSetWorkflow.execute (cognitive 30) · ×1
  • PhabricatorConfigManagementSetWorkflow.execute (cognitive 30) src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:32 — PhabricatorConfigManagementSetWorkflow.execute has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18, match/switch 6, error handling 5, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorDashboardObjectInstallWorkflow.handleRequest (cognitive 30) · ×1
  • PhabricatorDashboardObjectInstallWorkflow.handleRequest (cognitive 30) src/applications/dashboard/install/PhabricatorDashboardObjectInstallWorkflow.php:10 — PhabricatorDashboardObjectInstallWorkflow.handleRequest has cognitive complexity 30 (threshold 15). Drivers by points: if/else 28, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialQueryConduitAPIMethod.execute (cognitive 30) · ×1
  • DifferentialQueryConduitAPIMethod.execute (cognitive 30) src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php:65 — DifferentialQueryConduitAPIMethod.execute has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DifferentialTransactionEditor.expandTransaction (cognitive 30) · ×1
  • DifferentialTransactionEditor.expandTransaction (cognitive 30) src/applications/differential/editor/DifferentialTransactionEditor.php:152 — DifferentialTransactionEditor.expandTransaction has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24, match/switch 5, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialDiffExtractionEngine.isDiffChangedBeforeCommit (cognitive 30) · ×1
  • DifferentialDiffExtractionEngine.isDiffChangedBeforeCommit (cognitive 30) src/applications/differential/engine/DifferentialDiffExtractionEngine.php:119 — DifferentialDiffExtractionEngine.isDiffChangedBeforeCommit has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, loops 4, error handling 3, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionLocalRepositoryFilter.execute (cognitive 30) · ×1
  • DiffusionLocalRepositoryFilter.execute (cognitive 30) src/applications/diffusion/data/DiffusionLocalRepositoryFilter.php:50 — DiffusionLocalRepositoryFilter.execute has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorFactDatapointQuery.execute (cognitive 30) · ×1
  • PhabricatorFactDatapointQuery.execute (cognitive 30) src/applications/fact/query/PhabricatorFactDatapointQuery.php:34 — PhabricatorFactDatapointQuery.execute has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, loops 6, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPeopleQuery.fillUserCaches (cognitive 30) · ×1
  • PhabricatorPeopleQuery.fillUserCaches (cognitive 30) src/applications/people/query/PhabricatorPeopleQuery.php:514 — PhabricatorPeopleQuery.fillUserCaches has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18, loops 10, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryPullEngine.executeGitUpdate (cognitive 30) · ×1
  • PhabricatorRepositoryPullEngine.executeGitUpdate (cognitive 30) src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:275 — PhabricatorRepositoryPullEngine.executeGitUpdate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryPushMailWorker.renderRefs (cognitive 30) · ×1
  • PhabricatorRepositoryPushMailWorker.renderRefs (cognitive 30) src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php:135 — PhabricatorRepositoryPushMailWorker.renderRefs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 27, match/switch 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilRemarkupLiteralBlockRule.getMatchingLineCount (cognitive 30) · ×1
  • PhutilRemarkupLiteralBlockRule.getMatchingLineCount (cognitive 30) src/infrastructure/markup/blockrule/PhutilRemarkupLiteralBlockRule.php:9 — PhutilRemarkupLiteralBlockRule.getMatchingLineCount has cognitive complexity 30 (threshold 15). Drivers by points: if/else 28, boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUITimelineEventView.renderExtra (cognitive 30) · ×1
  • PHUITimelineEventView.renderExtra (cognitive 30) src/view/phui/PHUITimelineEventView.php:560 — PHUITimelineEventView.renderExtra has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getSelectableItems (cognitive 30) · ×1
  • getSelectableItems (cognitive 30) webroot/rsrc/js/application/diff/DiffChangeset.js:435 — getSelectableItems has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Text_Figlet._rep (cognitive 29) · ×1
  • Text_Figlet._rep (cognitive 29) externals/pear-figlet/Text/Figlet.php:390 — Text_Figlet._rep has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, boolean chains 6, ternaries 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHPMailerLite.EncodeQPphp (cognitive 29) · ×1
  • PHPMailerLite.EncodeQPphp (cognitive 29) externals/phpmailer/class.phpmailer-lite.php:1489 — PHPMailerLite.EncodeQPphp has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, boolean chains 3, loops 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHPMailer.EncodeQPphp (cognitive 29) · ×1
  • PHPMailer.EncodeQPphp (cognitive 29) externals/phpmailer/class.phpmailer.php:1621 — PHPMailer.EncodeQPphp has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, boolean chains 3, loops 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorAuthPasswordEngine.checkNewPassword (cognitive 29) · ×1
  • PhabricatorAuthPasswordEngine.checkNewPassword (cognitive 29) src/applications/auth/engine/PhabricatorAuthPasswordEngine.php:57 — PhabricatorAuthPasswordEngine.checkNewPassword has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, loops 7, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPasswordAuthProvider.processLoginRequest (cognitive 29) · ×1
  • PhabricatorPasswordAuthProvider.processLoginRequest (cognitive 29) src/applications/auth/provider/PhabricatorPasswordAuthProvider.php:251 — PhabricatorPasswordAuthProvider.processLoginRequest has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, ternaries 3, error handling 2, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilCalendarRecurrenceRule.advanceCursorState (cognitive 29) · ×1
  • PhutilCalendarRecurrenceRule.advanceCursorState (cognitive 29) src/applications/calendar/parser/data/PhutilCalendarRecurrenceRule.php:1685 — PhutilCalendarRecurrenceRule.advanceCursorState has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13, loops 10, match/switch 6 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorConduitMethodQuery.filterMethods (cognitive 29) · ×1
  • PhabricatorConduitMethodQuery.filterMethods (cognitive 29) src/applications/conduit/query/PhabricatorConduitMethodQuery.php:57 — PhabricatorConduitMethodQuery.filterMethods has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20, loops 9 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorDashboardPanelTabsController.handleMoveOperation (cognitive 29) · ×1
  • PhabricatorDashboardPanelTabsController.handleMoveOperation (cognitive 29) src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php:301 — PhabricatorDashboardPanelTabsController.handleMoveOperation has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, boolean chains 3, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionGitUploadPackWireProtocol.newProtocolRefMessage (cognitive 29) · ×1
  • DiffusionGitUploadPackWireProtocol.newProtocolRefMessage (cognitive 29) src/applications/diffusion/protocol/DiffusionGitUploadPackWireProtocol.php:165 — DiffusionGitUploadPackWireProtocol.newProtocolRefMessage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionLowLevelGitRefQuery.executeQuery (cognitive 29) · ×1
  • DiffusionLowLevelGitRefQuery.executeQuery (cognitive 29) src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php:16 — DiffusionLowLevelGitRefQuery.executeQuery has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionSourceLinkRemarkupRule.didMarkupText (cognitive 29) · ×1
  • DiffusionSourceLinkRemarkupRule.didMarkupText (cognitive 29) src/applications/diffusion/remarkup/DiffusionSourceLinkRemarkupRule.php:46 — DiffusionSourceLinkRemarkupRule.didMarkupText has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, loops 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeraldAction.loadStandardTargets (cognitive 29) · ×1
  • HeraldAction.loadStandardTargets (cognitive 29) src/applications/herald/action/HeraldAction.php:206 — HeraldAction.loadStandardTargets has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, loops 5, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationEditController.handleRequest (cognitive 29) · ×1
  • PhabricatorApplicationEditController.handleRequest (cognitive 29) src/applications/meta/controller/PhabricatorApplicationEditController.php:6 — PhabricatorApplicationEditController.handleRequest has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, loops 3, error handling 2, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorMailReplyHandler.expandRecipientPHIDs (cognitive 29) · ×1
  • PhabricatorMailReplyHandler.expandRecipientPHIDs (cognitive 29) src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php:281 — PhabricatorMailReplyHandler.expandRecipientPHIDs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, loops 10 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhrictionRemarkupRule.markupDocumentLink (cognitive 29) · ×1
  • PhrictionRemarkupRule.markupDocumentLink (cognitive 29) src/applications/phriction/markup/PhrictionRemarkupRule.php:18 — PhrictionRemarkupRule.markupDocumentLink has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, loops 3, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilDaemonHandle.update (cognitive 29) · ×1
  • PhutilDaemonHandle.update (cognitive 29) src/infrastructure/daemon/PhutilDaemonHandle.php:136 — PhutilDaemonHandle.update has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, error handling 4, boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorObjectGraph.newGraphTable (cognitive 29) · ×1
  • PhabricatorObjectGraph.newGraphTable (cognitive 29) src/infrastructure/graph/PhabricatorObjectGraph.php:163 — PhabricatorObjectGraph.newGraphTable has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, loops 8 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · markup.javelin_tag (cognitive 29) · ×1
  • markup.javelin_tag (cognitive 29) src/infrastructure/javelin/markup.php:3 — markup.javelin_tag has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, match/switch 3, boolean chains 2, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilRemarkupEngine.splitTextIntoBlocks (cognitive 29) · ×1
  • PhutilRemarkupEngine.splitTextIntoBlocks (cognitive 29) src/infrastructure/markup/remarkup/PhutilRemarkupEngine.php:156 — PhutilRemarkupEngine.splitTextIntoBlocks has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, loops 9, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCursorPagedPolicyAwareQuery.validateEdgeLogicConstraints (cognitive 29) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.validateEdgeLogicConstraints (cognitive 29) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:3000 — PhabricatorCursorPagedPolicyAwareQuery.validateEdgeLogicConstraints has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13, loops 8, match/switch 6, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUIObjectBoxView.getTagContent (cognitive 29) · ×1
  • PHUIObjectBoxView.getTagContent (cognitive 29) src/view/phui/PHUIObjectBoxView.php:181 — PHUIObjectBoxView.getTagContent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, ternaries 6, loops 4, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUIPagerView.render (cognitive 29) · ×1
  • PHUIPagerView.render (cognitive 29) src/view/phui/PHUIPagerView.php:119 — PHUIPagerView.render has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, loops 4, ternaries 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHUITimelineView.buildEvents (cognitive 29) · ×1
  • PHUITimelineView.buildEvents (cognitive 29) src/view/phui/PHUITimelineView.php:101 — PHUITimelineView.buildEvents has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, match/switch 2, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xhprof_lib.xhprof_prune_run (cognitive 28) · ×1
  • xhprof_lib.xhprof_prune_run (cognitive 28) externals/xhprof/xhprof_lib.php:563 — xhprof_lib.xhprof_prune_run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, loops 7, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AphrontHTTPHeaderParser.getHeaderContentAsPairs (cognitive 28) · ×1
  • AphrontHTTPHeaderParser.getHeaderContentAsPairs (cognitive 28) src/aphront/headerparser/AphrontHTTPHeaderParser.php:34 — AphrontHTTPHeaderParser.getHeaderContentAsPairs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, boolean chains 2, match/switch 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorPHPPreflightSetupCheck.executeChecks (cognitive 28) · ×1
  • PhabricatorPHPPreflightSetupCheck.executeChecks (cognitive 28) src/applications/config/check/PhabricatorPHPPreflightSetupCheck.php:13 — PhabricatorPHPPreflightSetupCheck.executeChecks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 5, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialDiffCreateController.handleRequest (cognitive 28) · ×1
  • DifferentialDiffCreateController.handleRequest (cognitive 28) src/applications/differential/controller/DifferentialDiffCreateController.php:5 — DifferentialDiffCreateController.handleRequest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, error handling 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialTransactionEditor.didApplyTransactions (cognitive 28) · ×1
  • DifferentialTransactionEditor.didApplyTransactions (cognitive 28) src/applications/differential/editor/DifferentialTransactionEditor.php:1529 — DifferentialTransactionEditor.didApplyTransactions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialRevisionQuery.buildWhereClause (cognitive 28) · ×1
  • DifferentialRevisionQuery.buildWhereClause (cognitive 28) src/applications/differential/query/DifferentialRevisionQuery.php:630 — DifferentialRevisionQuery.buildWhereClause has cognitive complexity 28 (threshold 15). Drivers by points: if/else 26, loops 2 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DifferentialChangesetOneUpMailRenderer.renderPrimitives (cognitive 28) · ×1
  • DifferentialChangesetOneUpMailRenderer.renderPrimitives (cognitive 28) src/applications/differential/render/DifferentialChangesetOneUpMailRenderer.php:43 — DifferentialChangesetOneUpMailRenderer.renderPrimitives has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 4, match/switch 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialRevisionReviewTransaction.isViewerReviewerStatusFully (cognitive 28) · ×1
  • DifferentialRevisionReviewTransaction.isViewerReviewerStatusFully (cognitive 28) src/applications/differential/xaction/DifferentialRevisionReviewTransaction.php:97 — DifferentialRevisionReviewTransaction.isViewerReviewerStatusFully has cognitive complexity 28 (threshold 15). Drivers by points: if/else 27, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionBlameController.handleRequest (cognitive 28) · ×1
  • DiffusionBlameController.handleRequest (cognitive 28) src/applications/diffusion/controller/DiffusionBlameController.php:9 — DiffusionBlameController.handleRequest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 5, ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionCompareController.handleRequest (cognitive 28) · ×1
  • DiffusionCompareController.handleRequest (cognitive 28) src/applications/diffusion/controller/DiffusionCompareController.php:9 — DiffusionCompareController.handleRequest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, boolean chains 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeraldRuleController.setupEditorBehavior (cognitive 28) · ×1
  • HeraldRuleController.setupEditorBehavior (cognitive 28) src/applications/herald/controller/HeraldRuleController.php:400 — HeraldRuleController.setupEditorBehavior has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13, loops 11, error handling 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManiphestTransactionEditor.getLockValidationErrors (cognitive 28) · ×1
  • ManiphestTransactionEditor.getLockValidationErrors (cognitive 28) src/applications/maniphest/editor/ManiphestTransactionEditor.php:774 — ManiphestTransactionEditor.getLockValidationErrors has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, boolean chains 2, match/switch 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManiphestTaskSearchEngine.buildQueryFromParameters (cognitive 28) · ×1
  • ManiphestTaskSearchEngine.buildQueryFromParameters (cognitive 28) src/applications/maniphest/query/ManiphestTaskSearchEngine.php:190 — ManiphestTaskSearchEngine.buildQueryFromParameters has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.execute (cognitive 28) · ×1
  • PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.execute (cognitive 28) src/applications/repository/management/PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.php:63 — PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.execute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, loops 5, boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryManagementUnpublishWorkflow.unpublishEdgeTransaction (cognitive 28) · ×1
  • PhabricatorRepositoryManagementUnpublishWorkflow.unpublishEdgeTransaction (cognitive 28) src/applications/repository/management/PhabricatorRepositoryManagementUnpublishWorkflow.php:154 — PhabricatorRepositoryManagementUnpublishWorkflow.unpublishEdgeTransaction has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 7 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRepositoryGitCommitChangeParserWorker.parseCommitChanges (cognitive 28) · ×1
  • PhabricatorRepositoryGitCommitChangeParserWorker.parseCommitChanges (cognitive 28) src/applications/repository/worker/commitchangeparser/PhabricatorRepositoryGitCommitChangeParserWorker.php:6 — PhabricatorRepositoryGitCommitChangeParserWorker.parseCommitChanges has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16, loops 6, match/switch 4, ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationTransactionView.buildEvents (cognitive 28) · ×1
  • PhabricatorApplicationTransactionView.buildEvents (cognitive 28) src/applications/transactions/view/PhabricatorApplicationTransactionView.php:129 — PhabricatorApplicationTransactionView.buildEvents has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, loops 8, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilRemarkupTableBlockRule.newTable (cognitive 28) · ×1
  • PhutilRemarkupTableBlockRule.newTable (cognitive 28) src/infrastructure/markup/blockrule/PhutilRemarkupTableBlockRule.php:63 — PhutilRemarkupTableBlockRule.newTable has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20, loops 7, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCursorPagedPolicyAwareQuery.buildApplicationSearchJoinClause (cognitive 28) · ×1
  • PhabricatorCursorPagedPolicyAwareQuery.buildApplicationSearchJoinClause (cognitive 28) src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:1535 — PhabricatorCursorPagedPolicyAwareQuery.buildApplicationSearchJoinClause has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20, loops 5, match/switch 2, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorRemarkupControl.renderInput (cognitive 28) · ×1
  • PhabricatorRemarkupControl.renderInput (cognitive 28) src/view/form/control/PhabricatorRemarkupControl.php:52 — PhabricatorRemarkupControl.renderInput has cognitive complexity 28 (threshold 15). Drivers by points: if/else 26, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _newHoverMap (cognitive 28) · ×1
  • _newHoverMap (cognitive 28) webroot/rsrc/js/application/diff/DiffChangesetList.js:1539 — _newHoverMap has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHPMailerLite.MsgHTML (cognitive 27) · ×1
  • PHPMailerLite.MsgHTML (cognitive 27) externals/phpmailer/class.phpmailer-lite.php:1865 — PHPMailerLite.MsgHTML has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18, ternaries 4, boolean chains 3, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PHPMailer.MsgHTML (cognitive 27) · ×1
  • PHPMailer.MsgHTML (cognitive 27) externals/phpmailer/class.phpmailer.php:2003 — PHPMailer.MsgHTML has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18, ternaries 4, boolean chains 3, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionRepositoryController.handleRequest (cognitive 27) · ×1
  • DiffusionRepositoryController.handleRequest (cognitive 27) src/applications/diffusion/controller/DiffusionRepositoryController.php:13 — DiffusionRepositoryController.handleRequest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionSymbolController.handleRequest (cognitive 27) · ×1
  • DiffusionSymbolController.handleRequest (cognitive 27) src/applications/diffusion/controller/DiffusionSymbolController.php:5 — DiffusionSymbolController.handleRequest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, error handling 2, loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DivinerSymbolRemarkupRule.didMarkupText (cognitive 27) · ×1
  • DivinerSymbolRemarkupRule.didMarkupText (cognitive 27) src/applications/diviner/markup/DivinerSymbolRemarkupRule.php:87 — DivinerSymbolRemarkupRule.didMarkupText has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, match/switch 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DoorkeeperImportEngine.execute (cognitive 27) · ×1
  • DoorkeeperImportEngine.execute (cognitive 27) src/applications/doorkeeper/engine/DoorkeeperImportEngine.php:65 — DoorkeeperImportEngine.execute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, loops 11 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorJupyterDocumentEngine.newCells (cognitive 27) · ×1
  • PhabricatorJupyterDocumentEngine.newCells (cognitive 27) src/applications/files/document/PhabricatorJupyterDocumentEngine.php:307 — PhabricatorJupyterDocumentEngine.newCells has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, loops 9, boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HarbormasterPlanViewController.buildArtifactList (cognitive 27) · ×1
  • HarbormasterPlanViewController.buildArtifactList (cognitive 27) src/applications/harbormaster/controller/HarbormasterPlanViewController.php:284 — HarbormasterPlanViewController.buildArtifactList has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeraldEngine.applyEffects (cognitive 27) · ×1
  • HeraldEngine.applyEffects (cognitive 27) src/applications/herald/engine/HeraldEngine.php:258 — HeraldEngine.applyEffects has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, loops 9, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorMailManagementSendTestWorkflow.execute (cognitive 27) · ×1
  • PhabricatorMailManagementSendTestWorkflow.execute (cognitive 27) src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php:72 — PhabricatorMailManagementSendTestWorkflow.execute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, loops 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PhabricatorNotificationServersConfigType.validateStoredValue (cognitive 27) · ×1
  • PhabricatorNotificationServersConfigType.validateStoredValue (cognitive 27) src/applications/notification/config/PhabricatorNotificationServersConfigType.php:8 — PhabricatorNotificationServersConfigType.validateStoredValue has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, match/switch 4, boolean chains 2, error handling 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PholioInlineController.handleRequest (cognitive 27) · ×1
  • PholioInlineController.handleRequest (cognitive 27) src/applications/pholio/controller/PholioInlineController.php:5 — PholioInlineController.handleRequest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, loops 2, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectEditController.handleRequest (cognitive 27) · ×1
  • PhabricatorProjectEditController.handleRequest (cognitive 27) src/applications/project/controller/PhabricatorProjectEditController.php:17 — PhabricatorProjectEditController.handleRequest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 27 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectQuery.loadSlugs (cognitive 27) · ×1
  • PhabricatorProjectQuery.loadSlugs (cognitive 27) src/applications/project/query/PhabricatorProjectQuery.php:799 — PhabricatorProjectQuery.loadSlugs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, loops 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorProjectUserListView.render (cognitive 27) · ×1
  • PhabricatorProjectUserListView.render (cognitive 27) src/applications/project/view/PhabricatorProjectUserListView.php:55 — PhabricatorProjectUserListView.render has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19, ternaries 4, boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationSearchController.processExportRequest (cognitive 27) · ×1
  • PhabricatorApplicationSearchController.processExportRequest (cognitive 27) src/applications/search/controller/PhabricatorApplicationSearchController.php:399 — PhabricatorApplicationSearchController.processExportRequest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationTransactionEditor.combineTransactions (cognitive 27) · ×1
  • PhabricatorApplicationTransactionEditor.combineTransactions (cognitive 27) src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2430 — PhabricatorApplicationTransactionEditor.combineTransactions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, loops 5, boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorApplicationTransactionEditor.filterTransactions (cognitive 27) · ×1
  • PhabricatorApplicationTransactionEditor.filterTransactions (cognitive 27) src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2772 — PhabricatorApplicationTransactionEditor.filterTransactions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, boolean chains 3, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorTypeaheadCompositeDatasource.loadResultsForPhase (cognitive 27) · ×1
  • PhabricatorTypeaheadCompositeDatasource.loadResultsForPhase (cognitive 27) src/applications/typeahead/datasource/PhabricatorTypeaheadCompositeDatasource.php:67 — PhabricatorTypeaheadCompositeDatasource.loadResultsForPhase has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, loops 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorTypeaheadDatasource.renderTokens (cognitive 27) · ×1
  • PhabricatorTypeaheadDatasource.renderTokens (cognitive 27) src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php:274 — PhabricatorTypeaheadDatasource.renderTokens has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, loops 11 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhutilPygmentizeParser.parse (cognitive 27) · ×1
  • PhutilPygmentizeParser.parse (cognitive 27) src/infrastructure/parser/PhutilPygmentizeParser.php:20 — PhutilPygmentizeParser.parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, match/switch 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorSSHPassthruCommand.execute (cognitive 27) · ×1
  • PhabricatorSSHPassthruCommand.execute (cognitive 27) src/infrastructure/ssh/PhabricatorSSHPassthruCommand.php:87 — PhabricatorSSHPassthruCommand.execute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19, boolean chains 5, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorCalendarEventSearchEngine.getQueryDateRange (cognitive 26) · ×1
  • PhabricatorCalendarEventSearchEngine.getQueryDateRange (cognitive 26) src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php:149 — PhabricatorCalendarEventSearchEngine.getQueryDateRange has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, boolean chains 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorDashboardPanelTabsController.handleRequest (cognitive 26) · ×1
  • PhabricatorDashboardPanelTabsController.handleRequest (cognitive 26) src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php:17 — PhabricatorDashboardPanelTabsController.handleRequest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 4, match/switch 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DifferentialChangesetHTMLRenderer.renderShowContextLinks (cognitive 26) · ×1
  • DifferentialChangesetHTMLRenderer.renderShowContextLinks (cognitive 26) src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:499 — DifferentialChangesetHTMLRenderer.renderShowContextLinks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 26 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionLintController.handleRequest (cognitive 26) · ×1
  • DiffusionLintController.handleRequest (cognitive 26) src/applications/diffusion/controller/DiffusionLintController.php:9 — DiffusionLintController.handleRequest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, loops 1 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DiffusionSetPasswordSettingsPanel.processRequest (cognitive 26) · ×1
  • DiffusionSetPasswordSettingsPanel.processRequest (cognitive 26) src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php:33 — DiffusionSetPasswordSettingsPanel.processRequest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, error handling 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DrydockLandRepositoryOperation.getBarrierToLanding (cognitive 26) · ×1
  • DrydockLandRepositoryOperation.getBarrierToLanding (cognitive 26) src/applications/drydock/operation/DrydockLandRepositoryOperation.php:225 — DrydockLandRepositoryOperation.getBarrierToLanding has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhabricatorFileQuery.buildWhereClauseParts (cognitive 26) · ×1
  • PhabricatorFileQuery.buildWhereClauseParts (cognitive 26) src/applications/files/query/PhabricatorFileQuery.php:396 — PhabricatorFileQuery.buildWhereClauseParts has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, loops 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HarbormasterUIEventListener.handlePropertyEvent (cognitive 26) · ×1
  • HarbormasterUIEventListener.handlePropertyEvent (cognitive 26) src/applications/harbormaster/event/HarbormasterUIEventListener.php:18 — HarbormasterUIEventListener.handlePropertyEvent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15, loops 9, boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeraldRuleController.handleRequest (cognitive 26) · ×1
  • HeraldRuleController.handleRequest (cognitive 26) src/applications/herald/controller/HeraldRuleController.php:5 — HeraldRuleController.handleRequest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, error handling 2, boolean chains 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeraldRuleController.saveRule (cognitive 26) · ×1
  • HeraldRuleController.saveRule (cognitive 26) src/applications/herald/controller/HeraldRuleController.php:263 — HeraldRuleController.saveRule has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15, error handling 7, boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManiphestTaskStatusTransaction.getTitle (cognitive 26) · ×1
  • ManiphestTaskStatusTransaction.getTitle (cognitive 26) src/applications/maniphest/xaction/ManiphestTaskStatusTransaction.php:49 — ManiphestTaskStatusTransaction.getTitle has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.