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

IlyasDeckers / ody-core / 13568391933

27 Feb 2025 02:13PM UTC coverage: 28.422%. Remained the same
13568391933

push

github

IlyasDeckers
update doc blocks

0 of 1 new or added line in 1 file covered. (0.0%)

544 of 1914 relevant lines covered (28.42%)

8.55 hits per line

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

0.0
/src/Server/Http.php
1
<?php
2

3
namespace Ody\Core\Server;
4

5
use Exception;
6
use Ody\Core\Kernel;
7

8
class Http
9
{
10
    private string $host;
11

12
    private int $port;
13

14
    public function __construct(
×
15
        private readonly int $phpServer
16
    ) {
17
        $this->host = config('server.host');
×
18
        $this->port = config('server.port');
×
19
    }
20

21
    /**
22
     * Starts the server
23
     *
24
     * @param bool $daemonize
25
     * @return void
26
     * @throws Exception
27
     */
28
    public function init(bool $daemonize = false): void
×
29
    {
30
        match($this->phpServer) {
×
31
            // Start a Swoole webserver
32
            0 => (new \Ody\Swoole\Http($this->host, $this->port))
×
33
                ->createServer(
×
34
                    Kernel::init()
×
35
                )->start($daemonize),
×
36
            // Start as a normal PHP webserver
37
            1 => exec("php -S {$this->host}:{$this->port} " . __DIR__ . '/init_php_server.php'),
×
NEW
38
            default => throw new Exception('Unexpected match value')
×
39
        };
×
40
    }
41
}
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