TenantAtlas/apps/platform/app/Services/TenantConfiguration/ExchangePowerShellProcessCommandBuilderResult.php
ahmido f4e342121a feat: add Exchange PowerShell production runner gate (#499)
Spec 432: Exchange PowerShell production runner boundary and runtime gate. Validation: php artisan test --filter=Spec432 --compact; ./vendor/bin/pint --dirty --test --format agent; git diff --check.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #499
2026-07-07 18:34:18 +00:00

43 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Services\TenantConfiguration;
final readonly class ExchangePowerShellProcessCommandBuilderResult
{
/**
* @param array<string, mixed> $context
*/
private function __construct(
public bool $successful,
public ?ExchangePowerShellProcessCommand $command = null,
public ?string $reasonCode = null,
public ?string $failureCode = null,
public ?string $message = null,
public array $context = [],
) {}
/**
* @param array<string, mixed> $context
*/
public static function built(ExchangePowerShellProcessCommand $command, array $context = []): self
{
return new self(successful: true, command: $command, context: $context);
}
/**
* @param array<string, mixed> $context
*/
public static function blocked(string $reasonCode, string $failureCode, string $message, array $context = []): self
{
return new self(
successful: false,
reasonCode: $reasonCode,
failureCode: $failureCode,
message: $message,
context: $context,
);
}
}