Completed
Push — master ( 5bda77...cb2c73 )
by Aleh
10s
created

KillCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Padawan\Command;
4
5
6
use Symfony\Component\Console\Input\InputInterface;
7
use Padawan\Framework\Application\Socket\SocketOutput;
8
use Amp;
9
10
class KillCommand extends AsyncCommand
11
{
12
    protected function configure()
13
    {
14
        $this->setName("kill")
15
            ->setDescription("Stops padawan server");
16
    }
17
    protected function executeAsync(InputInterface $input, SocketOutput $output)
18
    {
19
        yield $output->write(json_encode([]));
20
        yield $output->disconnect();
21
        printf("Goodbye\n");
22
        yield Amp\stop();
23
    }
24
}
25