Skip to content

Commit 2befbf7

Browse files
committed
fix WebServer reading command line options
1 parent 0be7759 commit 2befbf7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/Hosting/WebServer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,36 +43,36 @@ public function serve(object $sender, CommandEventArgs $args): void
4343
$root = $args->getParameter('--root');
4444

4545
if ($host) {
46-
if (!$host->getValue()) {
46+
if (!$host->Value) {
4747
Console::$ForegroundColor = ConsoleColor::Red;
4848
Console::writeLine("The option --host is missing a value.");
4949
Console::resetColor();
5050
return;
5151
}
5252

53-
$this->host = $host->getValue();
53+
$this->host = $host->Value;
5454
}
5555

5656
if ($port) {
57-
if (!$port->getValue()) {
57+
if (!$port->Value) {
5858
Console::$ForegroundColor = ConsoleColor::Red;
5959
Console::writeLine("The option --port is missing a value.");
6060
Console::resetColor();
6161
return;
6262
}
6363

64-
$this->port = $port->getValue();
64+
$this->port = $port->Value;
6565
}
6666

6767
if ($root) {
68-
if (!$root->getValue()) {
68+
if (!$root->Value) {
6969
Console::$ForegroundColor = ConsoleColor::Red;
7070
Console::writeLine("The option --root is missing a value.");
7171
Console::resetColor();
7272
return;
7373
}
7474

75-
$this->root = $root->getValue();
75+
$this->root = $root->Value;
7676
}
7777

7878
shell_exec("php -S {$this->host}:{$this->port} -t {$this->root}");

0 commit comments

Comments
 (0)