| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class ActionField extends AbstractField |
||
| 10 | { |
||
| 11 | private const ACTIONS = [ |
||
| 12 | 'failed', |
||
| 13 | 'delayed', |
||
| 14 | 'delivered', |
||
| 15 | 'relayed', |
||
| 16 | 'expanded', |
||
| 17 | ]; |
||
| 18 | private $action; |
||
| 19 | |||
| 20 | 24 | public function __construct(string $name, string $action) |
|
| 21 | { |
||
| 22 | 24 | parent::__construct($name, null); |
|
| 23 | |||
| 24 | 24 | $this->setAction($action); |
|
| 25 | 20 | } |
|
| 26 | |||
| 27 | 14 | public function getAction(): string |
|
| 28 | { |
||
| 29 | 14 | return $this->action; |
|
| 30 | } |
||
| 31 | |||
| 32 | 24 | public function setAction(string $action): void |
|
| 39 | 20 | } |
|
| 40 | } |
||
| 41 |