1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-07 01:00:09 +01:00

Make domain required in currentTunnelUrl

These methods are never passed null anyway.

Co-Authored-By: Mateus Junges <mateus@junges.dev>
This commit is contained in:
Matt Stauffer
2024-08-24 22:19:28 -05:00
parent 628997d835
commit 374eaa0d59
3 changed files with 3 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ public function __construct(public CommandLine $cli, public Brew $brew)
{ {
} }
public function currentTunnelUrl(?string $domain = null) public function currentTunnelUrl(string $domain): ?string
{ {
return $this->currentCloudflaredTunnels()[$domain] ?? false; return $this->currentCloudflaredTunnels()[$domain] ?? false;
} }

View File

@@ -9,7 +9,7 @@ class Expose
{ {
public function __construct(public Composer $composer, public CommandLine $cli) {} public function __construct(public Composer $composer, public CommandLine $cli) {}
public function currentTunnelUrl(?string $domain = null): ?string public function currentTunnelUrl(string $domain): ?string
{ {
$endpoint = 'http://127.0.0.1:4040/api/tunnels'; $endpoint = 'http://127.0.0.1:4040/api/tunnels';

View File

@@ -18,7 +18,7 @@ public function __construct(public CommandLine $cli, public Brew $brew) {}
/** /**
* Get the current tunnel URL from the Ngrok API. * Get the current tunnel URL from the Ngrok API.
*/ */
public function currentTunnelUrl(?string $domain = null): string public function currentTunnelUrl(string $domain): string
{ {
// wait a second for ngrok to start before attempting to find available tunnels // wait a second for ngrok to start before attempting to find available tunnels
sleep(1); sleep(1);