Lines 100.00% 1 / 1
Functions and Methods 100.00% 1 / 1
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
AppResumeCommand 100.00% 1 / 1 100.00% 1 / 1 1 100.00% 1 / 1
 sendAppRequest 100.00% 1 / 1 100.00% 1 / 1 1
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Runtime\Console;
6
7use Stewart\Contracts\App\AppId;
8use Stewart\Contracts\Time\Duration;
9use Stewart\Runtime\Control\Client\ControlTarget;
10use Stewart\Runtime\Control\Protocol\Frame\CommandResult;
11use Symfony\Component\Console\Attribute\AsCommand;
12
13#[AsCommand(name: self::NAME, description: 'Resume a paused app')]
14final class AppResumeCommand extends AppRequestCommand
15{
16    public const string NAME = 'app:resume';
17
18    protected function sendAppRequest(ControlTarget $target, AppId $appId, Duration $timeout): CommandResult
19    {
20        return $this->client->resumeApp($target, $appId, $timeout);
21    }
22}