Skip to content

Commit

Permalink
Fix code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon authored and github-actions[bot] committed Dec 22, 2023
1 parent 16ee9ec commit 589b3b0
Show file tree
Hide file tree
Showing 33 changed files with 44 additions and 49 deletions.
1 change: 0 additions & 1 deletion src/Contracts/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Laravel\Reverb\Contracts;

use Evenement\EventEmitter;
use Laravel\Reverb\Application;

abstract class Connection
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/PingInactiveConnections.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use Illuminate\Foundation\Bus\Dispatchable;
use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Loggers\Log;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Pusher\Event as PusherEvent;

class PingInactiveConnections
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/PruneStaleConnections.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use Illuminate\Foundation\Bus\Dispatchable;
use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Loggers\Log;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;

class PruneStaleConnections
{
Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/Channels/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Laravel\Reverb\Pusher\Channels;

use Laravel\Reverb\Contracts\Connection;
use Laravel\Reverb\Pusher\Concerns\SerializesChannels;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Contracts\Connection;

class Channel
{
Expand Down
4 changes: 2 additions & 2 deletions src/Pusher/Channels/Concerns/InteractsWithPrivateChannels.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public function subscribe(Connection $connection, ?string $auth = null, ?string
protected function verify(Connection $connection, string $auth, ?string $data = null): bool
{
$signature = "{$connection->id()}:{$this->name()}";

if ($data) {
$signature .= ":{$data}";
}

if (! hash_equals(
hash_hmac(
'sha256',
Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

use Exception;
use Illuminate\Support\Str;
use Laravel\Reverb\Contracts\Connection;
use Laravel\Reverb\Pusher\Channels\CacheChannel;
use Laravel\Reverb\Pusher\Channels\Channel;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Contracts\Connection;

class Event
{
Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use Illuminate\Support\Arr;
use Laravel\Reverb\Application;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Contracts\Connection;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\ServerManager;

class EventDispatcher
Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/Http/Controllers/ChannelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Laravel\Reverb\Pusher\Http\Controllers;

use Laravel\Reverb\Servers\Reverb\Http\Connection;
use Laravel\Reverb\Pusher\Concerns\InteractsWithChannelInformation;
use Laravel\Reverb\Servers\Reverb\Http\Connection;
use Psr\Http\Message\RequestInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/Http/Controllers/ChannelUsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Laravel\Reverb\Pusher\Http\Controllers;

use Laravel\Reverb\Servers\Reverb\Http\Connection;
use Laravel\Reverb\Pusher\Concerns\InteractsWithChannelInformation;
use Laravel\Reverb\Servers\Reverb\Http\Connection;
use Psr\Http\Message\RequestInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/Http/Controllers/ChannelsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Laravel\Reverb\Pusher\Http\Controllers;

use Illuminate\Support\Str;
use Laravel\Reverb\Servers\Reverb\Http\Connection;
use Laravel\Reverb\Pusher\Concerns\InteractsWithChannelInformation;
use Laravel\Reverb\Servers\Reverb\Http\Connection;
use Psr\Http\Message\RequestInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
Expand Down
4 changes: 2 additions & 2 deletions src/Pusher/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

use Illuminate\Support\Arr;
use Laravel\Reverb\Application;
use Laravel\Reverb\Servers\Reverb\Concerns\ClosesConnections;
use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Exceptions\InvalidApplication;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Servers\Reverb\Concerns\ClosesConnections;
use Laravel\Reverb\Servers\Reverb\Http\Connection;
use Psr\Http\Message\RequestInterface;
use Symfony\Component\HttpKernel\Exception\HttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/Http/Controllers/EventsBatchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use Illuminate\Contracts\Validation\Validator;
use Illuminate\Support\Facades\Validator as ValidatorFacade;
use Laravel\Reverb\Pusher\Concerns\InteractsWithChannelInformation;
use Laravel\Reverb\Pusher\EventDispatcher;
use Laravel\Reverb\Servers\Reverb\Http\Connection;
use Laravel\Reverb\Pusher\Concerns\InteractsWithChannelInformation;
use Psr\Http\Message\RequestInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/Http/Controllers/EventsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Validator as ValidatorFacade;
use Laravel\Reverb\Pusher\Concerns\InteractsWithChannelInformation;
use Laravel\Reverb\Pusher\EventDispatcher;
use Laravel\Reverb\Servers\Reverb\Http\Connection;
use Laravel\Reverb\Pusher\Concerns\InteractsWithChannelInformation;
use Psr\Http\Message\RequestInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/Http/Controllers/PusherController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Laravel\Reverb\Pusher\Http\Controllers;

use Laravel\Reverb\Connection as ReverbConnection;
use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Exceptions\InvalidApplication;
use Laravel\Reverb\Pusher\Server as PusherServer;
use Laravel\Reverb\Connection as ReverbConnection;
use Laravel\Reverb\Servers\Reverb\Connection;
use Psr\Http\Message\RequestInterface;

Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/Managers/ArrayChannelConnectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Laravel\Reverb\Pusher\Managers;

use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Contracts\Connection;
use Laravel\Reverb\Pusher\Channels\ChannelConnection;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;

class ArrayChannelConnectionManager implements ChannelConnectionManager
{
Expand Down
6 changes: 3 additions & 3 deletions src/Pusher/Managers/ArrayChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

use Illuminate\Support\Arr;
use Laravel\Reverb\Application;
use Laravel\Reverb\Pusher\Channels\Channel;
use Laravel\Reverb\Pusher\Channels\ChannelBroker;
use Laravel\Reverb\Concerns\InteractsWithApplications;
use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Pusher\Contracts\ChannelManager as ChannelManagerInterface;
use Laravel\Reverb\Contracts\Connection;
use Laravel\Reverb\Pusher\Channels\Channel;
use Laravel\Reverb\Pusher\Channels\ChannelBroker;
use Laravel\Reverb\Pusher\Contracts\ChannelManager as ChannelManagerInterface;

class ArrayChannelManager implements ChannelManagerInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Pusher/Managers/CacheChannelConnectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Laravel\Reverb\Pusher\Managers;

use Illuminate\Contracts\Cache\Repository;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Contracts\Connection;
use Laravel\Reverb\Contracts\ConnectionManager;
use Laravel\Reverb\Pusher\Channels\ChannelConnection;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;

class CacheChannelConnectionManager implements ChannelConnectionManager
{
Expand Down
4 changes: 2 additions & 2 deletions src/Pusher/Managers/CacheChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
use Illuminate\Contracts\Cache\Repository;
use Illuminate\Support\Arr;
use Laravel\Reverb\Application;
use Laravel\Reverb\Concerns\InteractsWithApplications;
use Laravel\Reverb\Contracts\Connection;
use Laravel\Reverb\Pusher\Channels\Channel;
use Laravel\Reverb\Pusher\Channels\ChannelBroker;
use Laravel\Reverb\Concerns\InteractsWithApplications;
use Laravel\Reverb\Pusher\Contracts\ChannelManager as ChannelManagerInterface;
use Laravel\Reverb\Contracts\Connection;

class CacheChannelManager implements ChannelManagerInterface
{
Expand Down
6 changes: 2 additions & 4 deletions src/Pusher/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

use Exception;
use Illuminate\Support\Str;
use Laravel\Reverb\Pusher\ClientEvent;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Contracts\Connection;
use Laravel\Reverb\Contracts\ConnectionManager;
use Laravel\Reverb\Exceptions\InvalidOrigin;
use Laravel\Reverb\Pusher\Exceptions\PusherException;
use Laravel\Reverb\Loggers\Log;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Pusher\Event as PusherEvent;
use Laravel\Reverb\Pusher\Exceptions\PusherException;

class Server
{
Expand Down
8 changes: 4 additions & 4 deletions src/Servers/ApiGateway/ApiGatewayProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Laravel\Reverb\CacheConnectionManager;
use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Contracts\ConnectionManager;
use Laravel\Reverb\Contracts\ServerProvider;
use Laravel\Reverb\Pusher\EventDispatcher;
use Laravel\Reverb\Jobs\PingInactiveConnections;
use Laravel\Reverb\Jobs\PruneStaleConnections;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Pusher\EventDispatcher;
use Laravel\Reverb\Pusher\Managers\CacheChannelConnectionManager;
use Laravel\Reverb\Pusher\Managers\CacheChannelManager;
use Laravel\Reverb\CacheConnectionManager;

class ApiGatewayProvider extends ServerProvider
{
Expand Down
3 changes: 1 addition & 2 deletions src/Servers/ApiGateway/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Laravel\Reverb\Servers\ApiGateway;

use Laravel\Reverb\Contracts\ConnectionManager;
use Laravel\Reverb\Contracts\WebSocketConnection;
use Laravel\Reverb\Servers\ApiGateway\Jobs\SendToConnection;

Expand Down Expand Up @@ -37,6 +36,6 @@ public function send(mixed $message): void
*/
public function close(mixed $message = null): void
{
//
//
}
}
8 changes: 4 additions & 4 deletions src/Servers/Reverb/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
namespace Laravel\Reverb\Servers\Reverb;

use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Servers\Reverb\Http\Route;
use Laravel\Reverb\Servers\Reverb\Http\Router;
use Laravel\Reverb\Servers\Reverb\Http\Server as HttpServer;
use Laravel\Reverb\Pusher\Http\Controllers\ChannelController;
use Laravel\Reverb\Pusher\Http\Controllers\ChannelsController;
use Laravel\Reverb\Pusher\Http\Controllers\ChannelUsersController;
use Laravel\Reverb\Pusher\Http\Controllers\EventsBatchController;
use Laravel\Reverb\Pusher\Http\Controllers\EventsController;
use Laravel\Reverb\Pusher\Http\Controllers\PusherController;
use Laravel\Reverb\Pusher\Http\Controllers\UsersTerminateController;
use Laravel\Reverb\Pusher\Server as PusherServer;
use Laravel\Reverb\Servers\Reverb\Http\Route;
use Laravel\Reverb\Servers\Reverb\Http\Router;
use Laravel\Reverb\Servers\Reverb\Http\Server as HttpServer;
use React\EventLoop\Loop;
use React\EventLoop\LoopInterface;
use React\Socket\SocketServer;
use Symfony\Component\Routing\Matcher\UrlMatcher;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\RouteCollection;
use Laravel\Reverb\Pusher\Http\Controllers\PusherController;

class Factory
{
Expand Down
2 changes: 1 addition & 1 deletion src/Servers/Reverb/ReverbProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use Illuminate\Console\Application as Artisan;
use Illuminate\Contracts\Foundation\Application;
use Laravel\Reverb\Concerns\InteractsWithAsyncRedis;
use Laravel\Reverb\Contracts\ServerProvider;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Contracts\ServerProvider;
use Laravel\Reverb\Pusher\EventDispatcher;
use Laravel\Reverb\Pusher\Managers\ArrayChannelConnectionManager;
use Laravel\Reverb\Pusher\Managers\ArrayChannelManager;
Expand Down
4 changes: 2 additions & 2 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Laravel\Reverb;

use Illuminate\Support\ServiceProvider as BaseServiceProvider;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Contracts\Logger;
use Laravel\Reverb\Loggers\NullLogger;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;

class ServiceProvider extends BaseServiceProvider
{
Expand Down
2 changes: 1 addition & 1 deletion tests/FakeConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use Illuminate\Testing\Assert;
use Laravel\Reverb\Application;
use Laravel\Reverb\Concerns\GeneratesIdentifiers;
use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Contracts\Connection as BaseConnection;
use Laravel\Reverb\Concerns\GeneratesIdentifiers;

class FakeConnection extends BaseConnection
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
use Illuminate\Support\Collection;
use Laravel\Reverb\Application;
use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Managers\Connections;
use Laravel\Reverb\Pusher\Channels\ChannelConnection;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Tests\FakeConnection;
use Laravel\Reverb\Tests\SerializableConnection;
use Laravel\Reverb\Tests\TestCase;
Expand Down
1 change: 0 additions & 1 deletion tests/ReverbTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Illuminate\Support\Str;
use Laravel\Reverb\Concerns\InteractsWithAsyncRedis;
use Laravel\Reverb\Pusher\EventDispatcher;
use Laravel\Reverb\ServerManager;
use Laravel\Reverb\Servers\Reverb\Factory;
use Ratchet\Client\WebSocket;
Expand Down
2 changes: 1 addition & 1 deletion tests/Specification/spec-server.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

use Laravel\Reverb\Servers\Reverb\Connection;
use Laravel\Reverb\Servers\Reverb\Http\Route;
use Laravel\Reverb\Servers\Reverb\Http\Router;
use Laravel\Reverb\Servers\Reverb\Http\Server;
use Laravel\Reverb\Servers\Reverb\Connection;
use Psr\Http\Message\RequestInterface;
use React\EventLoop\Loop;
use React\Socket\SocketServer;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Channels/PresenceCacheChannelTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

use Laravel\Reverb\Pusher\Channels\ChannelConnection;
use Laravel\Reverb\Pusher\Channels\PresenceCacheChannel;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Pusher\Exceptions\ConnectionUnauthorized;
use Laravel\Reverb\Pusher\Channels\ChannelConnection;
use Laravel\Reverb\Tests\FakeConnection;

beforeEach(function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Channels/PresenceChannelTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

use Laravel\Reverb\Pusher\Channels\ChannelConnection;
use Laravel\Reverb\Pusher\Channels\PresenceChannel;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Pusher\Exceptions\ConnectionUnauthorized;
use Laravel\Reverb\Pusher\Channels\ChannelConnection;
use Laravel\Reverb\Tests\FakeConnection;

beforeEach(function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/ClientEventTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Laravel\Reverb\Pusher\Channels\ChannelConnection;
use Laravel\Reverb\Pusher\ClientEvent;
use Laravel\Reverb\Pusher\Contracts\ChannelConnectionManager;
use Laravel\Reverb\Pusher\Channels\ChannelConnection;
use Laravel\Reverb\Tests\FakeConnection;

beforeEach(function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Jobs/PingInactiveConnectionsTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Laravel\Reverb\Jobs\PingInactiveConnections;
use Laravel\Reverb\Pusher\Channels\ChannelBroker;
use Laravel\Reverb\Pusher\Contracts\ChannelManager;
use Laravel\Reverb\Jobs\PingInactiveConnections;

beforeEach(function () {
$this->channelManager = Mockery::spy(ChannelManager::class);
Expand Down
Loading

0 comments on commit 589b3b0

Please sign in to comment.