Skip to content

Commit 17d87f2

Browse files
committed
chore: formatting
1 parent eb503cd commit 17d87f2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

example/src/server.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99
use Utopia\Http\Adapter\Swoole\Server;
1010
use Utopia\Http\Validator\Text;
1111

12-
13-
class User {
14-
function __construct(public $name) {}
12+
class User
13+
{
14+
public function __construct(public $name)
15+
{
16+
}
1517
}
1618

1719
$container = new Container();
1820

1921
$user = new Dependency();
20-
$user->setName('user')->setCallback(fn() => new User("Demo user"));
22+
$user->setName('user')->setCallback(fn () => new User("Demo user"));
2123
$container->set($user);
2224

2325
Http::get('/')
@@ -34,5 +36,5 @@ function __construct(public $name) {}
3436
$response->send('Hello ' . $user->name);
3537
});
3638

37-
$http = new Http(new Server('0.0.0.0', '80'), $container,'America/New_York');
39+
$http = new Http(new Server('0.0.0.0', '80'), $container, 'America/New_York');
3840
$http->start();

0 commit comments

Comments
 (0)