Skip to content

Commit df0a21f

Browse files
authored
refactor(archimate): delete the unreachable private getVoorzieningenConfig duplicate (#468)
`ArchiMateService::getVoorzieningenConfig()` is `private` and has zero `$this->` call sites in its own file — the only thing that can reach a private method. It is not reflected into either: the whole of `lib/` contains exactly one `ReflectionMethod` call site (`SettingsService:4644`) and it targets `getAmefConfig`, not this method. It cannot run. It is also a STALE duplicate. `SettingsService::getVoorzieningenConfig()` is the live resolver — 13 references across the app — and it ends with `normalizeVoorzieningenConfig()`, which this copy never had. Anything that had been wired to the copy would have received un-normalised config. Removing it removes three of gate-50's seventeen unsafe config reads (`voorzieningen_register`, `voorzieningen_organisatie_schema`, `voorzieningen_contactpersoon_schema`) by removing code that cannot execute, not by moving a guard into the checker's window. Can-fail proof: restoring the file from origin/development puts gate-50 back to 17; with the deletion it reports 14. phpcs clean, psalm clean, phpstan clean, phpmd clean against the repo baseline, unit suite 512 tests green.
1 parent eff9e05 commit df0a21f

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

‎lib/Service/ArchiMateService.php‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,36 +1694,6 @@ public function getAmefConfig(): array
16941694
}//end try
16951695
}//end getAmefConfig()
16961696

1697-
/**
1698-
* Get Voorzieningen configuration directly from IAppConfig
1699-
*
1700-
* @return array The voorzieningen configuration
1701-
*/
1702-
private function getVoorzieningenConfig(): array
1703-
{
1704-
$config = $this->config->getValueString('softwarecatalog', 'voorzieningen_config', '{}');
1705-
$decoded = json_decode($config, true);
1706-
1707-
if (is_array($decoded) === false) {
1708-
// Fallback to individual config values for backward compatibility.
1709-
$decoded = [
1710-
'register' => $this->config->getValueString('softwarecatalog', 'voorzieningen_register', ''),
1711-
'organisatie_schema' => $this->config->getValueString(
1712-
'softwarecatalog',
1713-
'voorzieningen_organisatie_schema',
1714-
''
1715-
),
1716-
'contactpersoon_schema' => $this->config->getValueString(
1717-
'softwarecatalog',
1718-
'voorzieningen_contactpersoon_schema',
1719-
''
1720-
),
1721-
];
1722-
}
1723-
1724-
return $decoded;
1725-
}//end getVoorzieningenConfig()
1726-
17271697
/**
17281698
* Get the current status of ArchiMate operations
17291699
*

0 commit comments

Comments
 (0)