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 React\Promise\PromiseInterface;
|
||||
|
||||
use function React\Promise\resolve as resolvePromise;
|
||||
|
||||
class ConfigAppManager implements AppManager
|
||||
|
|
|
|||
|
|
@ -13,10 +13,11 @@ use Illuminate\Cache\ArrayStore;
|
|||
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
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14,10 +14,11 @@ use Illuminate\Support\Facades\Redis;
|
|||
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
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -13,9 +13,10 @@ use Illuminate\Console\Command;
|
|||
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
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ interface AppManager
|
|||
/**
|
||||
* Create a new app.
|
||||
*
|
||||
* @param $appData
|
||||
* @param $appData
|
||||
* @return PromiseInterface
|
||||
*/
|
||||
public function createApp($appData): PromiseInterface;
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@ namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
|
|||
|
||||
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;
|
||||
|
|
@ -28,7 +29,7 @@ class AuthenticateDashboard
|
|||
$broadcaster = $this->getPusherBroadcaster([
|
||||
'key' => $app->key,
|
||||
'secret' => $app->secret,
|
||||
'id' =>$app->id,
|
||||
'id' => $app->id,
|
||||
]);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
|
|||
|
||||
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
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
|
|||
|
||||
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
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class LazyClient extends BaseLazyClient
|
|||
public function assertCalled($name)
|
||||
{
|
||||
foreach ($this->getCalledFunctions() as $function) {
|
||||
[$calledName, ] = $function;
|
||||
[$calledName] = $function;
|
||||
|
||||
if ($calledName === $name) {
|
||||
PHPUnit::assertTrue(true);
|
||||
|
|
@ -112,7 +112,7 @@ class LazyClient extends BaseLazyClient
|
|||
public function assertCalledCount(int $times, string $name)
|
||||
{
|
||||
$total = collect($this->getCalledFunctions())->filter(function ($function) use ($name) {
|
||||
[$calledName, ] = $function;
|
||||
[$calledName] = $function;
|
||||
|
||||
return $calledName === $name;
|
||||
});
|
||||
|
|
@ -176,7 +176,7 @@ class LazyClient extends BaseLazyClient
|
|||
public function assertNotCalled(string $name)
|
||||
{
|
||||
foreach ($this->getCalledFunctions() as $function) {
|
||||
[$calledName, ] = $function;
|
||||
[$calledName] = $function;
|
||||
|
||||
if ($calledName === $name) {
|
||||
PHPUnit::assertFalse(true);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ use BeyondCode\LaravelWebSockets\Helpers;
|
|||
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;
|
||||
|
|
@ -22,6 +21,8 @@ use React\Promise\Deferred;
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue