Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
byawitz committed Sep 6, 2024
1 parent eb503cd commit 17d87f2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions example/src/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
use Utopia\Http\Adapter\Swoole\Server;
use Utopia\Http\Validator\Text;


class User {
function __construct(public $name) {}
class User
{
public function __construct(public $name)
{
}
}

$container = new Container();

$user = new Dependency();
$user->setName('user')->setCallback(fn() => new User("Demo user"));
$user->setName('user')->setCallback(fn () => new User("Demo user"));
$container->set($user);

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

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

0 comments on commit 17d87f2

Please sign in to comment.