Apply fixes from StyleCI (#1190)
This commit is contained in:
parent
257a129254
commit
2e4b2f35f9
|
|
@ -4,6 +4,7 @@ namespace BeyondCode\LaravelWebSockets\Apps;
|
||||||
|
|
||||||
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
|
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
|
||||||
use React\Promise\PromiseInterface;
|
use React\Promise\PromiseInterface;
|
||||||
|
|
||||||
use function React\Promise\resolve as resolvePromise;
|
use function React\Promise\resolve as resolvePromise;
|
||||||
|
|
||||||
class ConfigAppManager implements AppManager
|
class ConfigAppManager implements AppManager
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,11 @@ use Illuminate\Cache\ArrayStore;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Ratchet\ConnectionInterface;
|
use Ratchet\ConnectionInterface;
|
||||||
use React\EventLoop\LoopInterface;
|
use React\EventLoop\LoopInterface;
|
||||||
use function React\Promise\all;
|
|
||||||
use React\Promise\PromiseInterface;
|
use React\Promise\PromiseInterface;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
|
||||||
|
use function React\Promise\all;
|
||||||
|
|
||||||
class LocalChannelManager implements ChannelManager
|
class LocalChannelManager implements ChannelManager
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,11 @@ use Illuminate\Support\Facades\Redis;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Ratchet\ConnectionInterface;
|
use Ratchet\ConnectionInterface;
|
||||||
use React\EventLoop\LoopInterface;
|
use React\EventLoop\LoopInterface;
|
||||||
use function React\Promise\all;
|
|
||||||
use React\Promise\PromiseInterface;
|
use React\Promise\PromiseInterface;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
|
||||||
|
use function React\Promise\all;
|
||||||
|
|
||||||
class RedisChannelManager extends LocalChannelManager
|
class RedisChannelManager extends LocalChannelManager
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,10 @@ use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use React\EventLoop\Factory as LoopFactory;
|
use React\EventLoop\Factory as LoopFactory;
|
||||||
use React\EventLoop\LoopInterface;
|
use React\EventLoop\LoopInterface;
|
||||||
use function React\Promise\all;
|
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
|
use function React\Promise\all;
|
||||||
|
|
||||||
class StartServer extends Command
|
class StartServer extends Command
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,12 @@ namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
|
||||||
|
|
||||||
use BeyondCode\LaravelWebSockets\Apps\App;
|
use BeyondCode\LaravelWebSockets\Apps\App;
|
||||||
use BeyondCode\LaravelWebSockets\Concerns\PushesToPusher;
|
use BeyondCode\LaravelWebSockets\Concerns\PushesToPusher;
|
||||||
use function Clue\React\Block\await;
|
|
||||||
use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster;
|
use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use React\EventLoop\LoopInterface;
|
use React\EventLoop\LoopInterface;
|
||||||
|
|
||||||
|
use function Clue\React\Block\await;
|
||||||
|
|
||||||
class AuthenticateDashboard
|
class AuthenticateDashboard
|
||||||
{
|
{
|
||||||
use PushesToPusher;
|
use PushesToPusher;
|
||||||
|
|
@ -28,7 +29,7 @@ class AuthenticateDashboard
|
||||||
$broadcaster = $this->getPusherBroadcaster([
|
$broadcaster = $this->getPusherBroadcaster([
|
||||||
'key' => $app->key,
|
'key' => $app->key,
|
||||||
'secret' => $app->secret,
|
'secret' => $app->secret,
|
||||||
'id' =>$app->id,
|
'id' => $app->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,11 @@
|
||||||
namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
|
namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
|
||||||
|
|
||||||
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
|
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
|
||||||
use function Clue\React\Block\await;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use React\EventLoop\LoopInterface;
|
use React\EventLoop\LoopInterface;
|
||||||
|
|
||||||
|
use function Clue\React\Block\await;
|
||||||
|
|
||||||
class ShowApps
|
class ShowApps
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,11 @@ namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
|
||||||
|
|
||||||
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
|
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
|
||||||
use BeyondCode\LaravelWebSockets\DashboardLogger;
|
use BeyondCode\LaravelWebSockets\DashboardLogger;
|
||||||
use function Clue\React\Block\await;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use React\EventLoop\LoopInterface;
|
use React\EventLoop\LoopInterface;
|
||||||
|
|
||||||
|
use function Clue\React\Block\await;
|
||||||
|
|
||||||
class ShowDashboard
|
class ShowDashboard
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,11 @@ namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
|
||||||
|
|
||||||
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
|
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
|
||||||
use BeyondCode\LaravelWebSockets\Dashboard\Http\Requests\StoreAppRequest;
|
use BeyondCode\LaravelWebSockets\Dashboard\Http\Requests\StoreAppRequest;
|
||||||
use function Clue\React\Block\await;
|
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use React\EventLoop\LoopInterface;
|
use React\EventLoop\LoopInterface;
|
||||||
|
|
||||||
|
use function Clue\React\Block\await;
|
||||||
|
|
||||||
class StoreApp
|
class StoreApp
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,11 @@
|
||||||
namespace BeyondCode\LaravelWebSockets\Rules;
|
namespace BeyondCode\LaravelWebSockets\Rules;
|
||||||
|
|
||||||
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
|
use BeyondCode\LaravelWebSockets\Contracts\AppManager;
|
||||||
use function Clue\React\Block\await;
|
|
||||||
use Illuminate\Contracts\Validation\Rule;
|
use Illuminate\Contracts\Validation\Rule;
|
||||||
use React\EventLoop\Factory;
|
use React\EventLoop\Factory;
|
||||||
|
|
||||||
|
use function Clue\React\Block\await;
|
||||||
|
|
||||||
class AppId implements Rule
|
class AppId implements Rule
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ class LazyClient extends BaseLazyClient
|
||||||
public function assertCalled($name)
|
public function assertCalled($name)
|
||||||
{
|
{
|
||||||
foreach ($this->getCalledFunctions() as $function) {
|
foreach ($this->getCalledFunctions() as $function) {
|
||||||
[$calledName, ] = $function;
|
[$calledName] = $function;
|
||||||
|
|
||||||
if ($calledName === $name) {
|
if ($calledName === $name) {
|
||||||
PHPUnit::assertTrue(true);
|
PHPUnit::assertTrue(true);
|
||||||
|
|
@ -112,7 +112,7 @@ class LazyClient extends BaseLazyClient
|
||||||
public function assertCalledCount(int $times, string $name)
|
public function assertCalledCount(int $times, string $name)
|
||||||
{
|
{
|
||||||
$total = collect($this->getCalledFunctions())->filter(function ($function) use ($name) {
|
$total = collect($this->getCalledFunctions())->filter(function ($function) use ($name) {
|
||||||
[$calledName, ] = $function;
|
[$calledName] = $function;
|
||||||
|
|
||||||
return $calledName === $name;
|
return $calledName === $name;
|
||||||
});
|
});
|
||||||
|
|
@ -176,7 +176,7 @@ class LazyClient extends BaseLazyClient
|
||||||
public function assertNotCalled(string $name)
|
public function assertNotCalled(string $name)
|
||||||
{
|
{
|
||||||
foreach ($this->getCalledFunctions() as $function) {
|
foreach ($this->getCalledFunctions() as $function) {
|
||||||
[$calledName, ] = $function;
|
[$calledName] = $function;
|
||||||
|
|
||||||
if ($calledName === $name) {
|
if ($calledName === $name) {
|
||||||
PHPUnit::assertFalse(true);
|
PHPUnit::assertFalse(true);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ use BeyondCode\LaravelWebSockets\Helpers;
|
||||||
use BeyondCode\LaravelWebSockets\Server\Loggers\HttpLogger;
|
use BeyondCode\LaravelWebSockets\Server\Loggers\HttpLogger;
|
||||||
use BeyondCode\LaravelWebSockets\Server\Loggers\WebSocketsLogger;
|
use BeyondCode\LaravelWebSockets\Server\Loggers\WebSocketsLogger;
|
||||||
use BeyondCode\LaravelWebSockets\ServerFactory;
|
use BeyondCode\LaravelWebSockets\ServerFactory;
|
||||||
use function Clue\React\Block\await;
|
|
||||||
use Clue\React\Buzz\Browser;
|
use Clue\React\Buzz\Browser;
|
||||||
use GuzzleHttp\Psr7\Request;
|
use GuzzleHttp\Psr7\Request;
|
||||||
use Illuminate\Support\Facades\Redis;
|
use Illuminate\Support\Facades\Redis;
|
||||||
|
|
@ -22,6 +21,8 @@ use React\Promise\Deferred;
|
||||||
use React\Promise\PromiseInterface;
|
use React\Promise\PromiseInterface;
|
||||||
use Symfony\Component\Console\Output\BufferedOutput;
|
use Symfony\Component\Console\Output\BufferedOutput;
|
||||||
|
|
||||||
|
use function Clue\React\Block\await;
|
||||||
|
|
||||||
abstract class TestCase extends Orchestra
|
abstract class TestCase extends Orchestra
|
||||||
{
|
{
|
||||||
const AWAIT_TIMEOUT = 5.0;
|
const AWAIT_TIMEOUT = 5.0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue