24 lines
551 B
PHP
24 lines
551 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Exceptions\Entitlements;
|
|
|
|
final class WorkspaceEntitlementBlockedException extends \RuntimeException
|
|
{
|
|
/**
|
|
* @param array<string, mixed> $decision
|
|
*/
|
|
public function __construct(private readonly array $decision)
|
|
{
|
|
parent::__construct((string) ($decision['block_reason'] ?? 'Workspace entitlement currently blocks this action.'));
|
|
}
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function decision(): array
|
|
{
|
|
return $this->decision;
|
|
}
|
|
} |