• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IlyasDeckers / ody-core / 13575371463

27 Feb 2025 08:34PM UTC coverage: 28.921% (+0.6%) from 28.348%
13575371463

push

github

IlyasDeckers
Refactoring/cleaning up/getting rid of redundant helper functions

0 of 68 new or added lines in 8 files covered. (0.0%)

9 existing lines in 5 files now uncovered.

544 of 1881 relevant lines covered (28.92%)

8.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Console/Commands/Server/StopCommand.php
1
<?php
2
declare(strict_types=1);
3

4
namespace Ody\Core\Console\Commands\Server;
5

6
use Ody\Core\Console\Style;
7
use Ody\Swoole\ServerState;
8
use Symfony\Component\Console\Attribute\AsCommand;
9
use Symfony\Component\Console\Command\Command;
10
use Symfony\Component\Console\Input\InputInterface;
11
use Symfony\Component\Console\Output\OutputInterface;
12

13
#[AsCommand(
14
    name: 'server:stop' ,
×
NEW
15
    description: 'stops the http server')
×
16
]
×
17
class StopCommand extends Command
18
{
19
    /**
20
     * @param InputInterface $input
21
     * @param OutputInterface $output
22
     * @return int
23
     */
UNCOV
24
    protected function execute(InputInterface $input, OutputInterface $output): int
×
25
    {
NEW
26
        $serverState = ServerState::getInstance();
×
UNCOV
27
        $io = new Style($input, $output);
×
28

NEW
29
        if (!$serverState->httpServerIsRunning()){
×
30
            $io->error('server is not running...' , true);
×
31
            return self::FAILURE;
×
32
        }
33

34

NEW
35
        $serverState->killProcesses([
×
NEW
36
            $serverState->getMasterProcessId(),
×
NEW
37
            $serverState->getManagerProcessId(),
×
NEW
38
            $serverState->getWatcherProcessId(),
×
NEW
39
            ...$serverState->getWorkerProcessIds()
×
NEW
40
        ]);
×
41

NEW
42
        $serverState->clearHttpProcessIds();
×
UNCOV
43
        sleep(1);
×
44

45
        $io->success('stopping server...' , true);
×
46
        return self::SUCCESS;
×
47
    }
48
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc