Repository navigation
refactor(archimate): remove private methods nothing calls - #1374
Merged
Merged
Conversation
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
…rchimate-dead-code
This was referenced Nov 2, 2026
Contributor
Quality Report — ConductionNL/stackiq @
|
| 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes private methods, constants and properties that nothing calls from
ArchiMateImportService,ArchiMateService,ArchiMateExportServiceandAangebodenGebruikService. 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 (grepovertests/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::checkOrganisationOwnershipandgetApplicationsOwnedByOrganisationare 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 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,getObjectsRelatedToUuidandgetAllObjectsForSchematook 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
php -l, phpcs (0 errors), phpmd with both rule sets (0 violations), psalm (0 errors) and phpstan (0 errors) on the four files; full phpstan run overlib/has no new finding.--fail-on-risky(phpunit-unit.xml): 1,506 tests, 20 errors, 0 risky. development gives the identical 20 errors (Doctrine\DBAL\ParameterTypemissing locally in the Repair migration tests).phpunit.xml, whose bootstrap needs a Nextcloud server tree; that happens on development too. The same filter underphpunit-unit.xmlpasses (27 tests).AI disclosure: prepared with Claude Code (claude-opus-5-5) and reviewed by the lane before opening.