diff --git a/src/NgrokProcessBuilder.php b/src/NgrokProcessBuilder.php index 5745281..3f4a78f 100644 --- a/src/NgrokProcessBuilder.php +++ b/src/NgrokProcessBuilder.php @@ -26,7 +26,7 @@ public function __construct(string $cwd = null) * * @param string $cwd */ - public function setWorkingDirectory(string $cwd) : void + public function setWorkingDirectory(string $cwd): void { $this->cwd = $cwd; } @@ -36,7 +36,7 @@ public function setWorkingDirectory(string $cwd) : void * * @return string */ - public function getWorkingDirectory() : string + public function getWorkingDirectory(): string { return $this->cwd; } @@ -48,11 +48,11 @@ public function getWorkingDirectory() : string * @param string $port * @return \Symfony\Component\Process\Process */ - public function buildProcess(string $host = '', string $port = '80') : Process + public function buildProcess(string $host = '', string $port = '80', string $region = 'eu'): Process { $command = ['ngrok', 'http', '--log', 'stdout']; - $region = env('NGROK_REGION'); + $region = $region ? $region : env('NGROK_REGION', 'eu'); if ($region) { $command[] = "-region={$region}";