Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
42 | public function listen() |
||
43 | { |
||
44 | $cmd = sprintf( |
||
45 | 'php -S %s -t %s %s', |
||
46 | escapeshellarg($this->host.':'.$this->port), |
||
47 | escapeshellarg($this->docRoot), |
||
48 | escapeshellarg($this->routerPath) |
||
49 | ); |
||
50 | |||
51 | $this->logger->info(sprintf("Starting webserver on %s:%d ...\n", $this->host, $this->port)); |
||
52 | |||
53 | putenv('foo=bar'); |
||
54 | exec($cmd); |
||
55 | } |
||
56 | } |
||
57 |