| 1 | <?php |
||
| 5 | class PolicyEnforcement |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | protected $action; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var null|string |
||
| 14 | */ |
||
| 15 | protected $reason; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * PolicyEnforcement constructor. |
||
| 19 | * |
||
| 20 | * @param string $action |
||
| 21 | * @param null|string $reason |
||
| 22 | */ |
||
| 23 | 2 | public function __construct(string $action, $reason) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | 1 | public function getAction(): string |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @return null|string |
||
| 39 | */ |
||
| 40 | 1 | public function getReason() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @param array $payload |
||
| 47 | * |
||
| 48 | * @return \Kerox\Messenger\Model\Callback\PolicyEnforcement |
||
| 49 | */ |
||
| 50 | 1 | public static function create(array $payload): PolicyEnforcement |
|
| 56 | } |
||
| 57 |