Skip to content

Commit

Permalink
fix: update code style
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-claras committed Mar 17, 2021
1 parent 5069d42 commit f0ac54a
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 52 deletions.
8 changes: 2 additions & 6 deletions src/Adapter/Amp/Internal/Deferred.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@
*/
class Deferred implements \M6Web\Tornado\Deferred
{
/**
* @var \Amp\Deferred
*/
/** @var \Amp\Deferred */
private $ampDeferred;

/**
* @var PromiseWrapper
*/
/** @var PromiseWrapper */
private $promise;

public function __construct(\Amp\Deferred $ampDeferred, PromiseWrapper $promise)
Expand Down
4 changes: 1 addition & 3 deletions src/Adapter/Amp/Internal/PromiseWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
*/
class PromiseWrapper implements Promise
{
/**
* @var \Amp\Promise
*/
/** @var \Amp\Promise */
private $ampPromise;

/** @var bool */
Expand Down
8 changes: 2 additions & 6 deletions src/Adapter/Guzzle/CurlMultiClientWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@

final class CurlMultiClientWrapper implements GuzzleClientWrapper
{
/**
* @var \GuzzleHttp\Handler\CurlMultiHandler
*/
/** @var \GuzzleHttp\Handler\CurlMultiHandler */
private $curlMultiHandler;

/**
* @var \GuzzleHttp\Client
*/
/** @var \GuzzleHttp\Client */
private $guzzleClient;

/**
Expand Down
8 changes: 2 additions & 6 deletions src/Adapter/Guzzle/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@

class HttpClient implements \M6Web\Tornado\HttpClient
{
/**
* @var EventLoop
*/
/** @var EventLoop */
private $eventLoop;

/**
* @var GuzzleClientWrapper
*/
/** @var GuzzleClientWrapper */
private $clientWrapper;

private $nbConcurrentRequests = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/ReactPhp/EventLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public function delay(int $milliseconds): Promise
{
$deferred = $this->deferred();
$this->reactEventLoop->addTimer(
$milliseconds / 1000 /* milliseconds per second */,
$milliseconds / 1000 /* milliseconds per second */ ,
function () use ($deferred) {
$deferred->resolve(null);
}
Expand Down
8 changes: 2 additions & 6 deletions src/Adapter/ReactPhp/Internal/Deferred.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@
*/
class Deferred implements \M6Web\Tornado\Deferred
{
/**
* @var \React\Promise\Deferred
*/
/** @var \React\Promise\Deferred */
private $reactDeferred;

/**
* @var PromiseWrapper
*/
/** @var PromiseWrapper */
private $promise;

public function __construct(\React\Promise\Deferred $reactDeferred, PromiseWrapper $promiseWrapper)
Expand Down
4 changes: 1 addition & 3 deletions src/Adapter/ReactPhp/Internal/PromiseWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
*/
class PromiseWrapper implements Promise
{
/**
* @var \React\Promise\PromiseInterface
*/
/** @var \React\Promise\PromiseInterface */
private $reactPromise;

/** @var bool */
Expand Down
12 changes: 3 additions & 9 deletions src/Adapter/Tornado/Internal/StreamEventLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,11 @@
*/
class StreamEventLoop
{
/**
* @var resource[]
*/
/** @var resource[] */
private $readStreams = [];
/**
* @var resource[]
*/
/** @var resource[] */
private $writeStreams = [];
/**
* @var PendingPromise[]
*/
/** @var PendingPromise[] */
private $pendingPromises = [];

public function readable(EventLoop $eventLoop, $stream): PendingPromise
Expand Down
4 changes: 1 addition & 3 deletions src/Adapter/Tornado/SynchronousEventLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

class SynchronousEventLoop implements \M6Web\Tornado\EventLoop
{
/**
* @var \Throwable[]
*/
/** @var \Throwable[] */
private $asyncThrowables = [];

/**
Expand Down
12 changes: 3 additions & 9 deletions tests/Adapter/Guzzle/GuzzleMockWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@

final class GuzzleMockWrapper implements GuzzleClientWrapper
{
/**
* @var \GuzzleHttp\Client
*/
/** @var \GuzzleHttp\Client */
private $guzzleClient;

/**
* @var array
*/
/** @var array */
private $transactions = [];

/**
* @var int
*/
/** @var int */
public $ticks;

public function __construct(array $queue)
Expand Down

0 comments on commit f0ac54a

Please sign in to comment.