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 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| AppResetCommand | 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 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Runtime\Console; | |
| 6 | ||
| 7 | use Stewart\Contracts\App\AppId; | |
| 8 | use Stewart\Contracts\Time\Duration; | |
| 9 | use Stewart\Runtime\Control\Client\ControlTarget; | |
| 10 | use Stewart\Runtime\Control\Protocol\Frame\CommandResult; | |
| 11 | use Symfony\Component\Console\Attribute\AsCommand; | |
| 12 | ||
| 13 | #[AsCommand(name: self::NAME, description: 'Forget the stored pause or resume of one app, so its config decides again')] | |
| 14 | final class AppResetCommand extends AppRequestCommand | |
| 15 | { | |
| 16 | public const string NAME = 'app:reset'; | |
| 17 | ||
| 18 | protected function sendAppRequest(ControlTarget $target, AppId $appId, Duration $timeout): CommandResult | |
| 19 | { | |
| 20 | return $this->client->resetApp($target, $appId, $timeout); | |
| 21 | } | |
| 22 | } |