Skip to content

refactor(archimate): remove private methods nothing calls - #1374

Merged
rubenvdlinde merged 2 commits into
developmentfrom
refactor/sig-archimate-dead-code
Nov 2, 2026
Merged

rubenvdlinde merged 2 commits into
developmentfrom
refactor/sig-archimate-dead-code

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Removes private methods, constants and properties that nothing calls from ArchiMateImportService, ArchiMateService, ArchiMateExportService and AangebodenGebruikService. 3,609 lines go, 3 doc lines change, and no caller changes.

How the set was chosen: PHPStan already reported 24 of these private methods and 2 constants as unused (they sat in phpstan-baseline.neon). Removing them left 33 more private methods without a caller, then 5 properties that were only ever written and 2 more unused constants. The removal was repeated until PHPStan on these four files reports nothing unused. Every removed member is private, so no other class or app can reach it, and no test referenced any of them (grep over tests/ for each name). The new files are strict line subsequences of the old ones, apart from one docblock in AangebodenGebruikService that named a removed method.

The baseline loses the 26 entries that matched the removed code.

Kept on purpose: AangebodenGebruikService::checkOrganisationOwnership and getApplicationsOwnedByOrganisation are unused too, but they are ownership checks; whether something should call them is a separate decision.

SIG (gate 122 reader, lizard 1.24.3, five-star profile)

php development this PR 4-star 5-star
size >15 84.11% 83.52% 47.1% 23.6%
size >30 62.85% 61.86% 23.1% 11.6%
size >60 36.99% 36.65% 8.3% 4.2%
McCabe >5 52.63% 52.09% 20.2% 10.1%
McCabe >10 20.88% 20.05% 7.3% 3.7%
McCabe >25 3.61% 3.41% 1.1% 0.55%
params >=3 20.58% 19.77% 15.0% 7.5%
params >=5 4.69% 4.40% 3.3% 1.65%
params >=7 0.72% 0.75% 0.9% 0.45%
duplication 11.56% 9.97% 5.6% 2.8%
fan-in >10 11.01% 11.52% 10.0% 5.0%
fan-in >20 11.01% 11.52% 5.6% 2.8%
fan-in >50 9.72% 10.17% 1.9% 0.95%
component independence 29.44% 30.79% 93.7% 93.7%

php unit LOC 44517 -> 42379; module LOC 50466 -> 48252.

No check flips on its own. params >=5 drops from 4.69% to 4.40% (the dead transformSectionObjectsBatch, getObjectsRelatedToUuid and getAllObjectsForSchema took 5 or 6 parameters) and duplication from 11.56% to 9.97%. The fan-in shares rise because the module total shrinks while SettingsService (fan-in 54, 4,906 lines) and Application (fan-in 32) stay the same size; fan-in >10 was missed before and still is.

Verified

AI disclosure: prepared with Claude Code (claude-opus-5-5) and reviewed by the lane before opening.

PHPStan reported 24 private methods and 2 constants in the ArchiMate
import, export and service classes and in AangebodenGebruikService as
unused (they were baselined). Removing them left 33 more private methods,
5 never-read properties and 2 constants without a caller; those go too,
repeated until PHPStan reports none. No caller changes; the baseline
loses the 26 entries that matched the removed code.

Kept on purpose: AangebodenGebruikService::checkOrganisationOwnership
and getApplicationsOwnedByOrganisation (unused ownership checks, to be
decided separately).

Assisted-by: ClaudeCode:claude-opus-5-5
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/stackiq @ 546c1e6

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-vue-demi ✅
test-l10n ✅
format ❌
check-schema-l10n ❌
check-l10n-js ✅
composer ❌ ✅ 127/127
npm ❌ ✅ 807/807
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ✅ 1486/1486 · 20 skipped
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ❌

Quality workflow — 2026-11-02 21:43 UTC

Download the full PDF report from the workflow artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant