| Total Complexity | 4 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class CreateSnapshot extends Action |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Action parameter |
||
| 15 | * |
||
| 16 | * @const ACTION |
||
| 17 | */ |
||
| 18 | const ACTION = 'snapshot'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Action HTTP Method |
||
| 22 | * |
||
| 23 | * @const method |
||
| 24 | */ |
||
| 25 | const METHOD = 'POST'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Name of the snapshot to be created |
||
| 29 | * |
||
| 30 | * @var string name |
||
| 31 | */ |
||
| 32 | private $name; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Constructor for the create snapshot action |
||
| 36 | * |
||
| 37 | * @param Array $values |
||
| 38 | * @throws \InvalidArgumentException |
||
| 39 | */ |
||
| 40 | 7 | public function __construct(Array $values) |
|
| 51 | 2 | } |
|
| 52 | |||
| 53 | /** |
||
| 54 | * Return the body of the request |
||
| 55 | * |
||
| 56 | * @return string json representation of the body |
||
| 57 | */ |
||
| 58 | 1 | public function getBody() |
|
| 67 |