Gate 1 Artifact — Discovery Report & Dead Code Map | Baseline: v20.12.2 | 2026-05-15
FE Files
85
57 JS + 27 TPL + 1 JSON
FE Code LOC
~14,000
report-studio / report-viewer / dashboard
BE Files
79
17 PHP + 32 JSON + 29 DUPLICATE + 1 MD
BE Code LOC
~7,000
Controllers / Services / Tools / ORM
Dead Files (confirmed)
29+
29 duplicate + 2 unused classes + debug
Est. Dead LOC
~3,200+
~15% of total BE codebase
| Nested Path (DEAD) | Real Path (ACTIVE) | Status | Evidence |
HybReport/Controllers/CReportDashboard.php | Controllers/CReportDashboard.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/Controllers/CReportWidget.php | Controllers/CReportWidget.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/Services/CReportDashboard.php | Services/CReportDashboard.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/Services/CReportWidget.php | Services/CReportWidget.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/Hooks/CReportDashboard/SyncToWidgets.php | Hooks/CReportDashboard/SyncToWidgets.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/Hooks/CReportWidget/ClearMeasureField.php | Hooks/CReportWidget/ClearMeasureField.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/ORM/.../CountDistinct.php | ORM/.../CountDistinct.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/ORM/.../Distinct.php | ORM/.../Distinct.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/Acl/CReportWidget.php | Acl/CReportWidget.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/Helpers/MatrixTemplateHelper.php | Helpers/MatrixTemplateHelper.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/Tools/Report/DateRange.php | Tools/Report/DateRange.php | Identical | Same namespace, wrong PSR-4 path |
HybReport/Tools/Report/MatrixQueryBuilder.php | Tools/Report/MatrixQueryBuilder.php | STALE (older) | Differs from parent — outdated version |
HybReport/Tools/Report/PayloadParser.php | Tools/Report/PayloadParser.php | STALE (older) | Differs from parent — outdated version |
+ 16 JSON files (metadata, i18n, layouts) — all duplicates of Resources/ |
| File | Issue | Risk | Evidence |
Tools/Report/DateRange.php | Unused class | Low | Imported in Controller but never instantiated (0 hits for new DateRange / DateRange::) |
Hooks/CReportWidget/ClearMeasureField.php | Unregistered hook | Low | Not in hooks.json; references non-existent entity fields (aggregateFunction, measureField, etc.) |
Services/CReportWidget.php:109-114 | Debug code left in | Low | _f58Debug block with explicit TODO F58: Xóa block này |
Controllers/CReportDashboard.php | Unused import | Low | use DateRange — never referenced in body |
Services/CReportDashboard.php | Unused import | Low | use MatrixQueryBuilder — never referenced in body |
Services/CReportWidget.php | Unused imports ×2 | Low | use EntityManager, use Metadata — inherited, not direct |
Tools/Report/PayloadParser.php | Dead private method | Low | parseReverseJoinLink() — defined but never called |