Skip to content

Commit

Permalink
Happy linter
Browse files Browse the repository at this point in the history
  • Loading branch information
SiebeVE committed Mar 13, 2024
1 parent f2092a6 commit 4c1f69d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/Server/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected function addControlConnectionRoute(): WsServer

protected function addAdminRoutes()
{
$adminCondition = 'request.headers.get("Host") matches "/^' . config('expose.admin.subdomain') . '\\\\./i"';
$adminCondition = 'request.headers.get("Host") matches "/^'.config('expose.admin.subdomain').'\\\\./i"';

$this->router->get('/', RedirectToUsersController::class, $adminCondition);
$this->router->get('/users', ListUsersController::class, $adminCondition);
Expand Down Expand Up @@ -173,7 +173,7 @@ protected function addAdminRoutes()

protected function addValidateTunnel()
{
$localCondition = 'request.headers.get("Host") matches "/^' . $this->host . ':' . $this->port . '$/i"';
$localCondition = 'request.headers.get("Host") matches "/^'.$this->host.':'.$this->port.'$/i"';

$this->router->get('/validate-tunnel', ValidateTunnelController::class, $localCondition);

Expand Down Expand Up @@ -287,7 +287,7 @@ protected function bindDatabase()
app()->singleton(DatabaseInterface::class, function () {
$factory = new \Clue\React\SQLite\Factory($this->loop);

$options = ['worker_command' => Phar::running(false) ? Phar::running(false) . ' --sqlite-worker' : null];
$options = ['worker_command' => Phar::running(false) ? Phar::running(false).' --sqlite-worker' : null];

return $factory->openLazy(
config('expose.admin.database', ':memory:'),
Expand Down
3 changes: 1 addition & 2 deletions app/Server/Http/Controllers/ValidateTunnelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function handle(Request $request, ConnectionInterface $httpConnection)

// Also allow the admin dashboard
$adminSubdomain = config('expose.admin.subdomain');
if ($domain === $adminSubdomain . '.' . $hostname) {
if ($domain === $adminSubdomain.'.'.$hostname) {
$this->isSuccessful($httpConnection);

return;
Expand Down Expand Up @@ -92,7 +92,6 @@ public function handle(Request $request, ConnectionInterface $httpConnection)
return;
}


$httpConnection->send(respond_json(['exists' => false, 'error' => 'no_tunnel_found'], 404));
$httpConnection->close();
}
Expand Down

0 comments on commit 4c1f69d

Please sign in to comment.