Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 2e4b2f3

Browse files
authored
Apply fixes from StyleCI (#1190)
1 parent 257a129 commit 2e4b2f3

File tree

12 files changed

+24
-14
lines changed

12 files changed

+24
-14
lines changed

src/Apps/ConfigAppManager.php

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
66
use React\Promise\PromiseInterface;
7+
78
use function React\Promise\resolve as resolvePromise;
89

910
class ConfigAppManager implements AppManager

src/ChannelManagers/LocalChannelManager.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
use Illuminate\Support\Str;
1414
use Ratchet\ConnectionInterface;
1515
use React\EventLoop\LoopInterface;
16-
use function React\Promise\all;
1716
use React\Promise\PromiseInterface;
1817
use stdClass;
1918

19+
use function React\Promise\all;
20+
2021
class LocalChannelManager implements ChannelManager
2122
{
2223
/**

src/ChannelManagers/RedisChannelManager.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
use Illuminate\Support\Str;
1515
use Ratchet\ConnectionInterface;
1616
use React\EventLoop\LoopInterface;
17-
use function React\Promise\all;
1817
use React\Promise\PromiseInterface;
1918
use stdClass;
2019

20+
use function React\Promise\all;
21+
2122
class RedisChannelManager extends LocalChannelManager
2223
{
2324
/**

src/Console/Commands/StartServer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
use Illuminate\Support\Facades\Cache;
1414
use React\EventLoop\Factory as LoopFactory;
1515
use React\EventLoop\LoopInterface;
16-
use function React\Promise\all;
1716
use Symfony\Component\Console\Output\OutputInterface;
1817

18+
use function React\Promise\all;
19+
1920
class StartServer extends Command
2021
{
2122
/**

src/Contracts/AppManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function findBySecret($appSecret): PromiseInterface;
4141
/**
4242
* Create a new app.
4343
*
44-
* @param $appData
44+
* @param $appData
4545
* @return PromiseInterface
4646
*/
4747
public function createApp($appData): PromiseInterface;

src/Dashboard/Http/Controllers/AuthenticateDashboard.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
use BeyondCode\LaravelWebSockets\Apps\App;
66
use BeyondCode\LaravelWebSockets\Concerns\PushesToPusher;
7-
use function Clue\React\Block\await;
87
use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster;
98
use Illuminate\Http\Request;
109
use React\EventLoop\LoopInterface;
1110

11+
use function Clue\React\Block\await;
12+
1213
class AuthenticateDashboard
1314
{
1415
use PushesToPusher;
@@ -28,7 +29,7 @@ public function __invoke(Request $request)
2829
$broadcaster = $this->getPusherBroadcaster([
2930
'key' => $app->key,
3031
'secret' => $app->secret,
31-
'id' =>$app->id,
32+
'id' => $app->id,
3233
]);
3334

3435
/*

src/Dashboard/Http/Controllers/ShowApps.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
44

55
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
6-
use function Clue\React\Block\await;
76
use Illuminate\Http\Request;
87
use React\EventLoop\LoopInterface;
98

9+
use function Clue\React\Block\await;
10+
1011
class ShowApps
1112
{
1213
/**

src/Dashboard/Http/Controllers/ShowDashboard.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
66
use BeyondCode\LaravelWebSockets\DashboardLogger;
7-
use function Clue\React\Block\await;
87
use Illuminate\Http\Request;
98
use React\EventLoop\LoopInterface;
109

10+
use function Clue\React\Block\await;
11+
1112
class ShowDashboard
1213
{
1314
/**

src/Dashboard/Http/Controllers/StoreApp.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
66
use BeyondCode\LaravelWebSockets\Dashboard\Http\Requests\StoreAppRequest;
7-
use function Clue\React\Block\await;
87
use Illuminate\Support\Str;
98
use React\EventLoop\LoopInterface;
109

10+
use function Clue\React\Block\await;
11+
1112
class StoreApp
1213
{
1314
/**

src/Rules/AppId.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
namespace BeyondCode\LaravelWebSockets\Rules;
44

55
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
6-
use function Clue\React\Block\await;
76
use Illuminate\Contracts\Validation\Rule;
87
use React\EventLoop\Factory;
98

9+
use function Clue\React\Block\await;
10+
1011
class AppId implements Rule
1112
{
1213
/**

tests/Mocks/LazyClient.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function on($event, callable $listener)
8888
public function assertCalled($name)
8989
{
9090
foreach ($this->getCalledFunctions() as $function) {
91-
[$calledName, ] = $function;
91+
[$calledName] = $function;
9292

9393
if ($calledName === $name) {
9494
PHPUnit::assertTrue(true);
@@ -112,7 +112,7 @@ public function assertCalled($name)
112112
public function assertCalledCount(int $times, string $name)
113113
{
114114
$total = collect($this->getCalledFunctions())->filter(function ($function) use ($name) {
115-
[$calledName, ] = $function;
115+
[$calledName] = $function;
116116

117117
return $calledName === $name;
118118
});
@@ -176,7 +176,7 @@ public function assertCalledWithArgsCount(int $times, string $name, array $args)
176176
public function assertNotCalled(string $name)
177177
{
178178
foreach ($this->getCalledFunctions() as $function) {
179-
[$calledName, ] = $function;
179+
[$calledName] = $function;
180180

181181
if ($calledName === $name) {
182182
PHPUnit::assertFalse(true);

tests/TestCase.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use BeyondCode\LaravelWebSockets\Server\Loggers\HttpLogger;
1111
use BeyondCode\LaravelWebSockets\Server\Loggers\WebSocketsLogger;
1212
use BeyondCode\LaravelWebSockets\ServerFactory;
13-
use function Clue\React\Block\await;
1413
use Clue\React\Buzz\Browser;
1514
use GuzzleHttp\Psr7\Request;
1615
use Illuminate\Support\Facades\Redis;
@@ -22,6 +21,8 @@
2221
use React\Promise\PromiseInterface;
2322
use Symfony\Component\Console\Output\BufferedOutput;
2423

24+
use function Clue\React\Block\await;
25+
2526
abstract class TestCase extends Orchestra
2627
{
2728
const AWAIT_TIMEOUT = 5.0;

0 commit comments

Comments
 (0)