From 6f232eebdee7ec54d15ee66d0c72617eb71bb7a5 Mon Sep 17 00:00:00 2001 From: Thomas Alrek Date: Wed, 23 Jun 2021 10:06:17 +0200 Subject: [PATCH] Set default region to eu --- src/NgrokProcessBuilder.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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}";