Skip to content

Commit

Permalink
Fix code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored and github-actions[bot] committed Jun 24, 2024
1 parent 0876134 commit d50dbf8
Show file tree
Hide file tree
Showing 41 changed files with 41 additions and 100 deletions.
4 changes: 1 addition & 3 deletions src/ApplicationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

class ApplicationFactory
{
public function __construct(protected string $basePath)
{
}
public function __construct(protected string $basePath) {}

/**
* Create a new application instance.
Expand Down
4 changes: 1 addition & 3 deletions src/ApplicationGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ class ApplicationGateway
{
use DispatchesEvents;

public function __construct(protected Application $app, protected Application $sandbox)
{
}
public function __construct(protected Application $app, protected Application $sandbox) {}

/**
* Handle an incoming request.
Expand Down
4 changes: 1 addition & 3 deletions src/Cache/OctaneStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ class OctaneStore implements Store
* @param \Swoole\Table $table
* @return void
*/
public function __construct(protected $table)
{
}
public function __construct(protected $table) {}

/**
* Retrieve an item from the cache by key.
Expand Down
3 changes: 1 addition & 2 deletions src/Events/RequestHandled.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ public function __construct(
public Application $sandbox,
public Request $request,
public Response $response
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/Events/RequestReceived.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ public function __construct(
public Application $app,
public Application $sandbox,
public Request $request
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/Events/RequestTerminated.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ public function __construct(
public Application $sandbox,
public Request $request,
public Response $response
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/Events/TaskReceived.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ public function __construct(
public Application $app,
public Application $sandbox,
public $data
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/Events/TaskTerminated.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ public function __construct(
public Application $sandbox,
public $data,
public $result,
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/Events/TickReceived.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ class TickReceived
public function __construct(
public Application $app,
public Application $sandbox
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/Events/TickTerminated.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ class TickTerminated implements OperationTerminated
public function __construct(
public Application $app,
public Application $sandbox
) {
}
) {}
}
4 changes: 1 addition & 3 deletions src/Events/WorkerErrorOccurred.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@

class WorkerErrorOccurred
{
public function __construct(public Throwable $exception, public Application $sandbox)
{
}
public function __construct(public Throwable $exception, public Application $sandbox) {}
}
4 changes: 1 addition & 3 deletions src/Events/WorkerStarting.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@

class WorkerStarting
{
public function __construct(public Application $app)
{
}
public function __construct(public Application $app) {}
}
4 changes: 1 addition & 3 deletions src/Events/WorkerStopping.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@

class WorkerStopping
{
public function __construct(public Application $app)
{
}
public function __construct(public Application $app) {}
}
4 changes: 1 addition & 3 deletions src/Exceptions/ServerShutdownException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use Exception;

class ServerShutdownException extends Exception
{
}
class ServerShutdownException extends Exception {}
3 changes: 1 addition & 2 deletions src/Exceptions/TaskExceptionResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ public function __construct(
protected int $code,
protected string $file,
protected int $line,
) {
}
) {}

/**
* Creates a new task exception result from the given throwable.
Expand Down
3 changes: 1 addition & 2 deletions src/FrankenPhp/ServerProcessInspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class ServerProcessInspector implements ServerProcessInspectorContract
*/
public function __construct(
protected ServerStateFile $serverStateFile,
) {
}
) {}

/**
* Determine if the FrankenPHP server process is running.
Expand Down
4 changes: 1 addition & 3 deletions src/FrankenPhp/ServerStateFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

class ServerStateFile
{
public function __construct(protected string $path)
{
}
public function __construct(protected string $path) {}

/**
* Read the server state from the server state file.
Expand Down
4 changes: 1 addition & 3 deletions src/OctaneResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@

class OctaneResponse
{
public function __construct(public Response $response, public ?string $outputBuffer = null)
{
}
public function __construct(public Response $response, public ?string $outputBuffer = null) {}
}
4 changes: 1 addition & 3 deletions src/RequestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

class RequestContext implements ArrayAccess
{
public function __construct(public array $data = [])
{
}
public function __construct(public array $data = []) {}

#[\ReturnTypeWillChange]
public function offsetExists($offset)
Expand Down
4 changes: 1 addition & 3 deletions src/RoadRunner/RoadRunnerClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class RoadRunnerClient implements Client, StoppableClient
{
use MarshalsPsr7RequestsAndResponses;

public function __construct(protected PSR7Worker $client)
{
}
public function __construct(protected PSR7Worker $client) {}

/**
* Marshal the given request context into an Illuminate request.
Expand Down
3 changes: 1 addition & 2 deletions src/RoadRunner/ServerProcessInspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public function __construct(
protected ServerStateFile $serverStateFile,
protected SymfonyProcessFactory $processFactory,
protected PosixExtension $posix
) {
}
) {}

/**
* Determine if the RoadRunner server process is running.
Expand Down
4 changes: 1 addition & 3 deletions src/RoadRunner/ServerStateFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

class ServerStateFile
{
public function __construct(protected string $path)
{
}
public function __construct(protected string $path) {}

/**
* Read the server state from the server state file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ public function __construct(
protected $timerTable,
protected $maxExecutionTime,
protected ?Server $server = null
) {
}
) {}

/**
* Invoke the action.
Expand Down
3 changes: 1 addition & 2 deletions src/Swoole/Handlers/OnManagerStart.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ public function __construct(
protected SwooleExtension $extension,
protected string $appName,
protected bool $shouldSetProcessName = true
) {
}
) {}

/**
* Handle the "managerstart" Swoole event.
Expand Down
3 changes: 1 addition & 2 deletions src/Swoole/Handlers/OnServerStart.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public function __construct(
protected $timerTable,
protected bool $shouldTick = true,
protected bool $shouldSetProcessName = true
) {
}
) {}

/**
* Handle the "start" Swoole event.
Expand Down
3 changes: 1 addition & 2 deletions src/Swoole/Handlers/OnWorkerStart.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public function __construct(
protected array $serverState,
protected WorkerState $workerState,
protected bool $shouldSetProcessName = true
) {
}
) {}

/**
* Handle the "workerstart" Swoole event.
Expand Down
3 changes: 1 addition & 2 deletions src/Swoole/InvokeTickCallable.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ public function __construct(
protected bool $immediate,
protected $cache,
protected ExceptionHandler $exceptionHandler
) {
}
) {}

/**
* Invoke the tick listener.
Expand Down
3 changes: 1 addition & 2 deletions src/Swoole/ServerProcessInspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ public function __construct(
protected SignalDispatcher $dispatcher,
protected ServerStateFile $serverStateFile,
protected Exec $exec,
) {
}
) {}

/**
* Determine if the Swoole server process is running.
Expand Down
4 changes: 1 addition & 3 deletions src/Swoole/ServerStateFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

class ServerStateFile
{
public function __construct(protected string $path)
{
}
public function __construct(protected string $path) {}

/**
* Read the server state from the server state file.
Expand Down
4 changes: 1 addition & 3 deletions src/Swoole/SignalDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

class SignalDispatcher
{
public function __construct(protected SwooleExtension $extension)
{
}
public function __construct(protected SwooleExtension $extension) {}

/**
* Determine if the given process ID can be communicated with.
Expand Down
4 changes: 1 addition & 3 deletions src/Swoole/SwooleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ class SwooleClient implements Client, ServesStaticFiles
451 => 'Unavailable For Legal Reasons', // RFC7725
];

public function __construct(protected int $chunkSize = 1048576)
{
}
public function __construct(protected int $chunkSize = 1048576) {}

/**
* Marshal the given request context into an Illuminate request.
Expand Down
4 changes: 1 addition & 3 deletions src/Swoole/SwooleCoroutineDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

class SwooleCoroutineDispatcher implements DispatchesCoroutines
{
public function __construct(protected bool $withinCoroutineContext)
{
}
public function __construct(protected bool $withinCoroutineContext) {}

/**
* Concurrently resolve the given callbacks via coroutines, returning the results.
Expand Down
3 changes: 1 addition & 2 deletions src/Swoole/SwooleHttpTaskDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public function __construct(
protected string $host,
protected string $port,
protected DispatchesTasks $fallbackDispatcher
) {
}
) {}

/**
* Concurrently resolve the given callbacks via background tasks, returning the results.
Expand Down
4 changes: 1 addition & 3 deletions src/Swoole/TaskResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@

class TaskResult
{
public function __construct(public mixed $result)
{
}
public function __construct(public mixed $result) {}
}
4 changes: 1 addition & 3 deletions src/Testing/Fakes/FakeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ class FakeClient implements Client

public $errors = [];

public function __construct(public array $requests)
{
}
public function __construct(public array $requests) {}

public function marshalRequest(RequestContext $context): array
{
Expand Down
3 changes: 1 addition & 2 deletions src/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class Worker implements WorkerContract
public function __construct(
protected ApplicationFactory $appFactory,
protected Client $client
) {
}
) {}

/**
* Boot / initialize the Octane worker.
Expand Down
3 changes: 1 addition & 2 deletions tests/QueuedCookieFlushingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public function test_queued_cookies_from_previous_requests_are_flushed()
$app['cookie']->queue('color', 'blue');
});

$app['router']->middleware('web')->get('/second', function (Application $app) {
});
$app['router']->middleware('web')->get('/second', function (Application $app) {});

$worker->run();

Expand Down
3 changes: 1 addition & 2 deletions tests/SequentialCoroutineDispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public function test_coroutines_can_be_resolved()
], $dispatcher->resolve([
'first' => fn () => 1,
'second' => fn () => 2,
'third' => function () {
},
'third' => function () {},
]));
}
}
3 changes: 1 addition & 2 deletions tests/SequentialTaskDispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public function test_tasks_can_be_resolved()
], $dispatcher->resolve([
'first' => fn () => 1,
'second' => fn () => 2,
'third' => function () {
},
'third' => function () {},
]));
}

Expand Down
3 changes: 1 addition & 2 deletions tests/SwooleHttpTaskDispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public function test_tasks_can_be_resolved_via_http()
], $dispatcher->resolve([
'first' => fn () => 1,
'second' => fn () => 2,
'third' => function () {
},
'third' => function () {},
]));
}

Expand Down
Loading

0 comments on commit d50dbf8

Please sign in to comment.