Skip to content

Commit 13da2f7

Browse files
mattstauffergithub-actions[bot]
authored andcommitted
Fix code styling
1 parent 3f30051 commit 13da2f7

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

cli/Valet/Cloudflared.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
class Cloudflared
88
{
9-
public function __construct(public CommandLine $cli, public Brew $brew)
10-
{
11-
}
9+
public function __construct(public CommandLine $cli, public Brew $brew) {}
1210

1311
public function currentTunnelUrl(string $domain): ?string
1412
{
@@ -38,7 +36,7 @@ public function currentTunnelUrl(string $domain): ?string
3836

3937
try {
4038
// Get the cloudflared share URL from the metrics server output
41-
$body = (new Client())->get("http://{$lsofMatches['server']}/metrics")->getBody();
39+
$body = (new Client)->get("http://{$lsofMatches['server']}/metrics")->getBody();
4240
preg_match('/userHostname="(?<url>.+)"/', $body->getContents(), $userHostnameMatches);
4341
} catch (\Exception $e) {
4442
return false;

cli/app.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function (ConsoleCommandEvent $event) {
5050
$share_tools = [
5151
'cloudflared',
5252
'expose',
53-
'ngrok'
53+
'ngrok',
5454
];
5555

5656
/**
@@ -403,14 +403,13 @@ function (ConsoleCommandEvent $event) {
403403
/**
404404
* Echo or set the name of the currently-selected share tool (either "ngrok" or "expose").
405405
*/
406-
$app->command('share-tool [tool]', function (InputInterface $input, OutputInterface $output, $tool = null)
407-
use ($share_tools) {
406+
$app->command('share-tool [tool]', function (InputInterface $input, OutputInterface $output, $tool = null) use ($share_tools) {
408407
if ($tool === null) {
409408
return output(Configuration::read()['share-tool'] ?? '(not set)');
410409
}
411410

412411
$share_tools_list = preg_replace('/,\s([^,]+)$/', ' or $1',
413-
join(', ', array_map(fn($t) => "`$t`", $share_tools)));
412+
implode(', ', array_map(fn ($t) => "`$t`", $share_tools)));
414413

415414
if (! in_array($tool, $share_tools) || ! class_exists($tool)) {
416415
warning("$tool is not a valid share tool. Please use $share_tools_list.");

0 commit comments

Comments
 (0)