Skip to content

Commit f4da401

Browse files
committed
Apply fixes from StyleCI
1 parent 2a542a8 commit f4da401

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

examples/server.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* A simple PSR3 logger.
2424
*/
25-
$logger = new class() extends \Psr\Log\AbstractLogger implements Psr\Log\LoggerInterface {
25+
$logger = new class() extends Psr\Log\AbstractLogger implements Psr\Log\LoggerInterface {
2626
public function log($level, $message, array $context = []): void
2727
{
2828
echo \sprintf('[%s] %s - %s', $level, $message, \json_encode($context)).\PHP_EOL;
@@ -32,7 +32,7 @@ public function log($level, $message, array $context = []): void
3232
/**
3333
* Our websocket server.
3434
*/
35-
$server = new \Wrench\Server('ws://localhost:8000/', [
35+
$server = new Wrench\Server('ws://localhost:8000/', [
3636
// 'logger' => $logger,
3737
'allowed_origins' => [
3838
'mysite.localhost',
@@ -42,7 +42,7 @@ public function log($level, $message, array $context = []): void
4242
/**
4343
* Our example application, that just echoes the received data.
4444
*/
45-
$app = new class() implements \Wrench\Application\DataHandlerInterface {
45+
$app = new class() implements Wrench\Application\DataHandlerInterface {
4646
public function onData(string $data, Wrench\Connection $connection): void
4747
{
4848
$connection->send($data);
@@ -51,5 +51,5 @@ public function onData(string $data, Wrench\Connection $connection): void
5151

5252
$server->setLogger($logger);
5353
$server->registerApplication('echo', $app);
54-
$server->registerApplication('status', new \Wrench\Application\StatusApplication());
54+
$server->registerApplication('status', new Wrench\Application\StatusApplication());
5555
$server->run();

examples/server_ssl.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
);
4343

4444
// User can use tls in place of ssl
45-
$server = new \Wrench\Server('wss://127.0.0.1:8000/', [
45+
$server = new Wrench\Server('wss://127.0.0.1:8000/', [
4646
'connection_manager_options' => [
4747
'socket_master_options' => [
4848
'server_ssl_local_cert' => $pemFile,
@@ -56,14 +56,14 @@
5656
/**
5757
* Our example application, that just echoes the received data.
5858
*/
59-
$app = new class() implements \Wrench\Application\DataHandlerInterface {
59+
$app = new class() implements Wrench\Application\DataHandlerInterface {
6060
public function onData(string $data, Wrench\Connection $connection): void
6161
{
6262
$connection->send($data);
6363
}
6464
};
6565

6666
$server->registerApplication('echo', $app);
67-
$server->registerApplication('status', new \Wrench\Application\StatusApplication());
67+
$server->registerApplication('status', new Wrench\Application\StatusApplication());
6868

6969
$server->run();

tests/Test/server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
$server = new Wrench\Server('ws://localhost:'.$port);
1212

13-
$app = new class() implements \Wrench\Application\DataHandlerInterface {
13+
$app = new class() implements Wrench\Application\DataHandlerInterface {
1414
public function onData(string $data, Wrench\Connection $connection): void
1515
{
1616
$connection->send($data);

0 commit comments

Comments
 (0)