2026-03-04 15:56:58 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Tests\Architecture;
|
|
|
|
|
|
2026-03-19 19:11:03 +01:00
|
|
|
final class StatusTaxonomyContractFiles
|
2026-03-04 15:56:58 +01:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @return list<string>
|
|
|
|
|
*/
|
2026-03-19 19:11:03 +01:00
|
|
|
public static function taxonomyEnumFiles(): array
|
2026-03-04 15:56:58 +01:00
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'lib/Domain/Taxonomy/SystemAuditOutcome.php',
|
|
|
|
|
'lib/Domain/Taxonomy/SystemAuditChannel.php',
|
|
|
|
|
'lib/Domain/Taxonomy/UserLifecycleAction.php',
|
|
|
|
|
'lib/Domain/Taxonomy/UserLifecycleTriggerType.php',
|
|
|
|
|
'lib/Domain/Taxonomy/UserLifecycleStatus.php',
|
|
|
|
|
'lib/Domain/Taxonomy/ImportAuditStatus.php',
|
|
|
|
|
'lib/Domain/Taxonomy/ScheduledJobStatus.php',
|
|
|
|
|
'lib/Domain/Taxonomy/ScheduledJobRunStatus.php',
|
|
|
|
|
'lib/Domain/Taxonomy/ScheduledJobTriggerType.php',
|
|
|
|
|
'lib/Domain/Taxonomy/MailLogStatus.php',
|
|
|
|
|
'lib/Domain/Taxonomy/TenantStatus.php',
|
|
|
|
|
'lib/Domain/Taxonomy/SchedulerRuntimeResult.php',
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return array<string,list<string>>
|
|
|
|
|
*/
|
2026-03-19 19:11:03 +01:00
|
|
|
public static function taxonomySchemaExpectations(): array
|
2026-03-04 15:56:58 +01:00
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'pages/admin/system-audit/filter-schema.php' => [
|
|
|
|
|
'SystemAuditOutcome::values()',
|
|
|
|
|
'SystemAuditChannel::values()',
|
|
|
|
|
],
|
|
|
|
|
'pages/admin/user-lifecycle-audit/filter-schema.php' => [
|
|
|
|
|
'gridEnumSanitizer(UserLifecycleAction::class)',
|
|
|
|
|
'gridEnumSanitizer(UserLifecycleStatus::class)',
|
|
|
|
|
'gridEnumSanitizer(UserLifecycleTriggerType::class)',
|
|
|
|
|
],
|
|
|
|
|
'pages/admin/import-audit/filter-schema.php' => [
|
|
|
|
|
'ImportAuditStatus::values()',
|
|
|
|
|
],
|
|
|
|
|
'pages/admin/scheduled-jobs/filter-schema.php' => [
|
|
|
|
|
'ScheduledJobStatus::values()',
|
|
|
|
|
],
|
|
|
|
|
'pages/admin/scheduled-jobs/runs-filter-schema.php' => [
|
|
|
|
|
'ScheduledJobRunStatus::values()',
|
|
|
|
|
'ScheduledJobTriggerType::values()',
|
|
|
|
|
],
|
|
|
|
|
'pages/admin/mail-log/filter-schema.php' => [
|
|
|
|
|
'MailLogStatus::values()',
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return list<string>
|
|
|
|
|
*/
|
2026-03-19 19:11:03 +01:00
|
|
|
public static function taxonomyDataEndpointFiles(): array
|
2026-03-04 15:56:58 +01:00
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'pages/admin/system-audit/data().php',
|
|
|
|
|
'pages/admin/user-lifecycle-audit/data().php',
|
|
|
|
|
'pages/admin/import-audit/data().php',
|
|
|
|
|
'pages/admin/scheduled-jobs/data().php',
|
|
|
|
|
'pages/admin/scheduled-jobs/runs-data($id).php',
|
|
|
|
|
'pages/admin/mail-log/data().php',
|
|
|
|
|
'pages/admin/tenants/data().php',
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return list<string>
|
|
|
|
|
*/
|
2026-03-19 19:11:03 +01:00
|
|
|
public static function taxonomyLiteralGuardFiles(): array
|
2026-03-04 15:56:58 +01:00
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'lib/Service/Audit/SystemAuditService.php',
|
|
|
|
|
'lib/Repository/Audit/SystemAuditLogRepository.php',
|
|
|
|
|
'lib/Http/ApiSystemAuditReporter.php',
|
|
|
|
|
'lib/Service/Audit/UserLifecycleAuditService.php',
|
|
|
|
|
'lib/Repository/Audit/UserLifecycleAuditRepository.php',
|
|
|
|
|
'lib/Service/Audit/ImportAuditService.php',
|
|
|
|
|
'lib/Repository/Audit/ImportAuditRunRepository.php',
|
|
|
|
|
'lib/Service/Scheduler/SchedulerRunService.php',
|
|
|
|
|
'lib/Repository/Scheduler/ScheduledJobRepository.php',
|
|
|
|
|
'lib/Repository/Scheduler/ScheduledJobRunRepository.php',
|
|
|
|
|
'lib/Repository/Scheduler/SchedulerRuntimeRepository.php',
|
|
|
|
|
'lib/Service/Mail/MailService.php',
|
|
|
|
|
'lib/Repository/Mail/MailLogRepository.php',
|
|
|
|
|
'lib/Service/Tenant/TenantService.php',
|
|
|
|
|
'lib/Repository/Tenant/TenantRepository.php',
|
|
|
|
|
'lib/Repository/Stats/AdminStatsRepository.php',
|
|
|
|
|
'pages/admin/system-audit/data().php',
|
|
|
|
|
'pages/admin/user-lifecycle-audit/data().php',
|
|
|
|
|
'pages/admin/import-audit/data().php',
|
|
|
|
|
'pages/admin/scheduled-jobs/data().php',
|
|
|
|
|
'pages/admin/scheduled-jobs/runs-data($id).php',
|
|
|
|
|
'pages/admin/mail-log/data().php',
|
|
|
|
|
'pages/admin/tenants/data().php',
|
|
|
|
|
'pages/admin/system-audit/index().php',
|
|
|
|
|
'pages/admin/user-lifecycle-audit/index().php',
|
|
|
|
|
'pages/admin/import-audit/index().php',
|
|
|
|
|
'pages/admin/scheduled-jobs/index().php',
|
|
|
|
|
'pages/admin/mail-log/index().php',
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-19 19:11:03 +01:00
|
|
|
/**
|
|
|
|
|
* @return list<string>
|
|
|
|
|
*/
|
|
|
|
|
public static function forbiddenLiteralPatterns(): array
|
2026-03-04 15:56:58 +01:00
|
|
|
{
|
2026-03-19 19:11:03 +01:00
|
|
|
return [
|
2026-03-04 15:56:58 +01:00
|
|
|
"/\\bstatus\\s*=\\s*'(running|success|partial|failed|skipped|queued|sent|active|inactive)'/",
|
|
|
|
|
"/\\boutcome\\s*=\\s*'(success|failed|denied)'/",
|
|
|
|
|
"/\\bchannel\\s*=\\s*'(web|api|scheduler|cli)'/",
|
|
|
|
|
"/\\btrigger_type\\s*=\\s*'(scheduler|manual|cron|system)'/",
|
|
|
|
|
"/\\baction\\s*=\\s*'(deactivate|delete|restore)'/",
|
|
|
|
|
"/['\\\"]statuses['\\\"]\\s*=>\\s*'failed,skipped'/",
|
|
|
|
|
"/['\\\"]actions['\\\"]\\s*=>\\s*'restore'/",
|
|
|
|
|
"/in_array\\([^\\n]*\\[(?:[^\\]]*'(?:success|failed|denied|running|partial|skipped|queued|sent|active|inactive|scheduler|manual|web|api|cli|deactivate|delete|restore|ok|lock_not_acquired|unexpected_error)')/",
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|