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

Apply fixes from StyleCI #1190

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Apps/ConfigAppManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use BeyondCode\LaravelWebSockets\Contracts\AppManager;
use React\Promise\PromiseInterface;

use function React\Promise\resolve as resolvePromise;

class ConfigAppManager implements AppManager
Expand Down
3 changes: 2 additions & 1 deletion src/ChannelManagers/LocalChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
use Illuminate\Support\Str;
use Ratchet\ConnectionInterface;
use React\EventLoop\LoopInterface;
use function React\Promise\all;
use React\Promise\PromiseInterface;
use stdClass;

use function React\Promise\all;

class LocalChannelManager implements ChannelManager
{
/**
Expand Down
3 changes: 2 additions & 1 deletion src/ChannelManagers/RedisChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
use Illuminate\Support\Str;
use Ratchet\ConnectionInterface;
use React\EventLoop\LoopInterface;
use function React\Promise\all;
use React\Promise\PromiseInterface;
use stdClass;

use function React\Promise\all;

class RedisChannelManager extends LocalChannelManager
{
/**
Expand Down
3 changes: 2 additions & 1 deletion src/Console/Commands/StartServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
use Illuminate\Support\Facades\Cache;
use React\EventLoop\Factory as LoopFactory;
use React\EventLoop\LoopInterface;
use function React\Promise\all;
use Symfony\Component\Console\Output\OutputInterface;

use function React\Promise\all;

class StartServer extends Command
{
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/AppManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function findBySecret($appSecret): PromiseInterface;
/**
* Create a new app.
*
* @param $appData
* @param $appData
* @return PromiseInterface
*/
public function createApp($appData): PromiseInterface;
Expand Down
5 changes: 3 additions & 2 deletions src/Dashboard/Http/Controllers/AuthenticateDashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

use BeyondCode\LaravelWebSockets\Apps\App;
use BeyondCode\LaravelWebSockets\Concerns\PushesToPusher;
use function Clue\React\Block\await;
use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster;
use Illuminate\Http\Request;
use React\EventLoop\LoopInterface;

use function Clue\React\Block\await;

class AuthenticateDashboard
{
use PushesToPusher;
Expand All @@ -28,7 +29,7 @@ public function __invoke(Request $request)
$broadcaster = $this->getPusherBroadcaster([
'key' => $app->key,
'secret' => $app->secret,
'id' =>$app->id,
'id' => $app->id,
]);

/*
Expand Down
3 changes: 2 additions & 1 deletion src/Dashboard/Http/Controllers/ShowApps.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;

use BeyondCode\LaravelWebSockets\Contracts\AppManager;
use function Clue\React\Block\await;
use Illuminate\Http\Request;
use React\EventLoop\LoopInterface;

use function Clue\React\Block\await;

class ShowApps
{
/**
Expand Down
3 changes: 2 additions & 1 deletion src/Dashboard/Http/Controllers/ShowDashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

use BeyondCode\LaravelWebSockets\Contracts\AppManager;
use BeyondCode\LaravelWebSockets\DashboardLogger;
use function Clue\React\Block\await;
use Illuminate\Http\Request;
use React\EventLoop\LoopInterface;

use function Clue\React\Block\await;

class ShowDashboard
{
/**
Expand Down
3 changes: 2 additions & 1 deletion src/Dashboard/Http/Controllers/StoreApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

use BeyondCode\LaravelWebSockets\Contracts\AppManager;
use BeyondCode\LaravelWebSockets\Dashboard\Http\Requests\StoreAppRequest;
use function Clue\React\Block\await;
use Illuminate\Support\Str;
use React\EventLoop\LoopInterface;

use function Clue\React\Block\await;

class StoreApp
{
/**
Expand Down
3 changes: 2 additions & 1 deletion src/Rules/AppId.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
namespace BeyondCode\LaravelWebSockets\Rules;

use BeyondCode\LaravelWebSockets\Contracts\AppManager;
use function Clue\React\Block\await;
use Illuminate\Contracts\Validation\Rule;
use React\EventLoop\Factory;

use function Clue\React\Block\await;

class AppId implements Rule
{
/**
Expand Down
6 changes: 3 additions & 3 deletions tests/Mocks/LazyClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function on($event, callable $listener)
public function assertCalled($name)
{
foreach ($this->getCalledFunctions() as $function) {
[$calledName, ] = $function;
[$calledName] = $function;

if ($calledName === $name) {
PHPUnit::assertTrue(true);
Expand All @@ -112,7 +112,7 @@ public function assertCalled($name)
public function assertCalledCount(int $times, string $name)
{
$total = collect($this->getCalledFunctions())->filter(function ($function) use ($name) {
[$calledName, ] = $function;
[$calledName] = $function;

return $calledName === $name;
});
Expand Down Expand Up @@ -176,7 +176,7 @@ public function assertCalledWithArgsCount(int $times, string $name, array $args)
public function assertNotCalled(string $name)
{
foreach ($this->getCalledFunctions() as $function) {
[$calledName, ] = $function;
[$calledName] = $function;

if ($calledName === $name) {
PHPUnit::assertFalse(true);
Expand Down
3 changes: 2 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use BeyondCode\LaravelWebSockets\Server\Loggers\HttpLogger;
use BeyondCode\LaravelWebSockets\Server\Loggers\WebSocketsLogger;
use BeyondCode\LaravelWebSockets\ServerFactory;
use function Clue\React\Block\await;
use Clue\React\Buzz\Browser;
use GuzzleHttp\Psr7\Request;
use Illuminate\Support\Facades\Redis;
Expand All @@ -22,6 +21,8 @@
use React\Promise\PromiseInterface;
use Symfony\Component\Console\Output\BufferedOutput;

use function Clue\React\Block\await;

abstract class TestCase extends Orchestra
{
const AWAIT_TIMEOUT = 5.0;
Expand Down
Loading