| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class ZoneSetKeyAction extends AbstractAction |
||
| 19 | { |
||
| 20 | 3 | public function fieldDefinitions() |
|
| 21 | { |
||
| 22 | return [ |
||
| 23 | 3 | 'action' => [static::TYPE => 'string'], |
|
| 24 | 3 | 'key' => [static::TYPE => 'string'], |
|
| 25 | ]; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param array $data |
||
| 30 | * @param Context|callable $context |
||
| 31 | */ |
||
| 32 | 3 | public function __construct(array $data = [], $context = null) |
|
| 33 | { |
||
| 34 | 3 | parent::__construct($data, $context); |
|
| 35 | 3 | $this->setAction('setKey'); |
|
| 36 | 3 | } |
|
| 37 | |||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $key |
||
| 41 | * @param Context|callable $context |
||
| 42 | * @return ZoneSetKeyAction |
||
| 43 | */ |
||
| 44 | 1 | public static function ofKey($key, $context = null) |
|
| 47 | } |
||
| 48 | } |
||
| 49 |