TenantAtlas/apps/platform/app/Services/TenantConfiguration/ExchangePowerShellProcessCommandBuilderResult.php
Ahmed Darrazi 90a411429e
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 1m23s
feat: add Exchange PowerShell production runner gate
2026-07-07 20:32:36 +02: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,
);
}
}