| Total Complexity | 6 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | class UpdateTubeCommand extends AbstractCommand implements ResponseParser |
||
| 20 | { |
||
| 21 | |||
| 22 | /** @var Tube $tube */ |
||
| 23 | private $tube; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Updates an existing tube |
||
| 27 | * |
||
| 28 | * @param Workflow $workflow The workflow to create |
||
| 29 | */ |
||
| 30 | 1 | public function __construct(Tube $tube) |
|
| 31 | { |
||
| 32 | 1 | $this->tube = $tube; |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @inheritDoc |
||
| 37 | */ |
||
| 38 | 1 | public function getGroup(): string |
|
| 39 | { |
||
| 40 | 1 | return 'queue'; |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @inheritDoc |
||
| 45 | */ |
||
| 46 | 1 | public function getAction(): string |
|
| 47 | { |
||
| 48 | 1 | return 'edit'; |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @inheritDoc |
||
| 53 | */ |
||
| 54 | 1 | public function getFilters(): array |
|
| 55 | { |
||
| 56 | return [ |
||
| 57 | 1 | 'id' => $this->tube->getId(), |
|
| 58 | 1 | 'name' => $this->tube->getName(), |
|
| 59 | 1 | "concurrency" => $this->tube->getConcurrency(), |
|
| 60 | 1 | 'scheduler' => $this->tube->getScheduler(), |
|
| 61 | 1 | 'dynamic' => $this->tube->getDynamic(), |
|
| 62 | ]; |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @inheritDoc |
||
| 67 | */ |
||
| 68 | 1 | public function getResponseParser() |
|
| 69 | { |
||
| 70 | 1 | return $this; |
|
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @inheritDoc |
||
| 75 | */ |
||
| 76 | 1 | public function parseResponse($responseLine, $responseData) |
|
| 79 | } |
||
| 80 | } |
||
| 81 |