mirror of
https://github.com/danog/amp.git
synced 2024-11-26 20:15:00 +01:00
Fix code style according to new rules
This commit is contained in:
parent
b686f2ac8c
commit
70e63a3748
@ -124,7 +124,6 @@ trait Producer {
|
||||
return $deferred->promise();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Resolves the stream with the given value.
|
||||
*
|
||||
|
@ -255,8 +255,8 @@ class UvDriver extends Driver {
|
||||
unset($this->watchers[$eventId][$id]);
|
||||
|
||||
if (empty($this->watchers[$eventId])) {
|
||||
unset($this->watchers[$eventId]);
|
||||
unset($this->io[(int) $watcher->value]);
|
||||
unset($this->watchers[$eventId], $this->io[(int) $watcher->value]);
|
||||
|
||||
if (\uv_is_active($event)) {
|
||||
\uv_poll_stop($event);
|
||||
}
|
||||
|
@ -74,8 +74,8 @@ namespace Amp {
|
||||
}
|
||||
|
||||
namespace Amp\Promise {
|
||||
use Amp\Loop;
|
||||
use Amp\Deferred;
|
||||
use Amp\Loop;
|
||||
use Amp\MultiReasonException;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
@ -474,12 +474,12 @@ namespace Amp\Promise {
|
||||
namespace Amp\Stream {
|
||||
use Amp\Coroutine;
|
||||
use Amp\Emitter;
|
||||
use Amp\StreamIterator;
|
||||
use Amp\Loop;
|
||||
use Amp\Pause;
|
||||
use Amp\Producer;
|
||||
use Amp\Promise;
|
||||
use Amp\Stream;
|
||||
use Amp\StreamIterator;
|
||||
use Amp\UnionTypeError;
|
||||
|
||||
/**
|
||||
|
@ -3,8 +3,8 @@
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Failure;
|
||||
use Amp\Success;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
|
||||
class PromiseMock {
|
||||
/** @var \Amp\Promise */
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Loop;
|
||||
use Amp\Pause;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use Amp\Loop;
|
||||
|
||||
class AllTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testEmptyArray() {
|
||||
|
@ -3,10 +3,10 @@
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Failure;
|
||||
use Amp\Loop;
|
||||
use Amp\Pause;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use Amp\Loop;
|
||||
|
||||
class AnyTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testEmptyArray() {
|
||||
|
@ -4,8 +4,8 @@ namespace Amp\Test;
|
||||
|
||||
use Amp;
|
||||
use Amp\Coroutine;
|
||||
use Amp\Success;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use React\Promise\FulfilledPromise as FulfilledReactPromise;
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Failure;
|
||||
use Amp\Success;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use function React\Promise\reject;
|
||||
|
||||
class CaptureTest extends \PHPUnit\Framework\TestCase {
|
||||
|
@ -7,8 +7,8 @@ use Amp\Failure;
|
||||
use Amp\InvalidYieldError;
|
||||
use Amp\Loop;
|
||||
use Amp\Pause;
|
||||
use Amp\Success;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use React\Promise\FulfilledPromise as FulfilledReactPromise;
|
||||
use React\Promise\Promise as ReactPromise;
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Producer;
|
||||
use Amp\Stream;
|
||||
use Amp\Emitter;
|
||||
use Amp\Loop;
|
||||
use Amp\Producer;
|
||||
use Amp\Stream;
|
||||
|
||||
class FilterTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testNoValuesEmitted() {
|
||||
|
@ -2,13 +2,12 @@
|
||||
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp;
|
||||
use Amp\Failure;
|
||||
use Amp\Loop;
|
||||
use Amp\MultiReasonException;
|
||||
use Amp\Pause;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use Amp\Loop;
|
||||
|
||||
class FirstTest extends \PHPUnit\Framework\TestCase {
|
||||
/**
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp;
|
||||
use Amp\Failure;
|
||||
use Amp\LazyPromise;
|
||||
use Amp\Success;
|
||||
|
@ -8,7 +8,6 @@ use Amp\Loop;
|
||||
use Amp\Loop\Driver;
|
||||
use Amp\Loop\InvalidWatcherError;
|
||||
use Amp\Loop\UnsupportedFeatureException;
|
||||
use Amp\Success;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use React\Promise\RejectedPromise as RejectedReactPromise;
|
||||
|
||||
@ -231,7 +230,6 @@ abstract class DriverTest extends TestCase {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function provideRegistrationArgs() {
|
||||
$args = [
|
||||
["defer", [function () {
|
||||
|
@ -2,11 +2,10 @@
|
||||
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp;
|
||||
use Amp\Producer;
|
||||
use Amp\Stream;
|
||||
use Amp\Emitter;
|
||||
use Amp\Loop;
|
||||
use Amp\Producer;
|
||||
use Amp\Stream;
|
||||
|
||||
class MapTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testNoValuesEmitted() {
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Pause;
|
||||
use Amp\Loop;
|
||||
use Amp\Pause;
|
||||
|
||||
class PauseTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testPause() {
|
||||
|
@ -3,8 +3,8 @@
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Failure;
|
||||
use Amp\Success;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use function React\Promise\resolve;
|
||||
|
||||
class PipeTest extends \PHPUnit\Framework\TestCase {
|
||||
|
@ -4,9 +4,9 @@ namespace Amp\Test;
|
||||
|
||||
use Amp;
|
||||
use Amp\Deferred;
|
||||
use Amp\Producer;
|
||||
use Amp\Pause;
|
||||
use Amp\Loop;
|
||||
use Amp\Pause;
|
||||
use Amp\Producer;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use React\Promise\Promise as ReactPromise;
|
||||
|
||||
|
@ -5,8 +5,8 @@ namespace Amp\Test;
|
||||
use Amp\Deferred;
|
||||
use Amp\Failure;
|
||||
use Amp\Loop;
|
||||
use Amp\Success;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use React\Promise\FulfilledPromise as FulfilledReactPromise;
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Failure;
|
||||
use Amp\Loop;
|
||||
use Amp\MultiReasonException;
|
||||
use Amp\Pause;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use Amp\Loop;
|
||||
|
||||
class SomeTest extends \PHPUnit\Framework\TestCase {
|
||||
public function testEmptyArray() {
|
||||
|
@ -3,11 +3,11 @@
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Failure;
|
||||
use Amp\Loop;
|
||||
use Amp\Pause;
|
||||
use Amp\Promise;
|
||||
use Amp\Stream;
|
||||
use Amp\Success;
|
||||
use Amp\Loop;
|
||||
|
||||
class StreamFromIterableTest extends \PHPUnit\Framework\TestCase {
|
||||
const TIMEOUT = 10;
|
||||
|
@ -2,12 +2,11 @@
|
||||
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp;
|
||||
use Amp\Producer;
|
||||
use Amp\StreamIterator;
|
||||
use Amp\Pause;
|
||||
use Amp\Emitter;
|
||||
use Amp\Loop;
|
||||
use Amp\Pause;
|
||||
use Amp\Producer;
|
||||
use Amp\StreamIterator;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class StreamIteratorTest extends TestCase {
|
||||
|
@ -3,8 +3,8 @@
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Loop;
|
||||
use Amp\Success;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use React\Promise\RejectedPromise as RejectedReactPromise;
|
||||
|
||||
class SuccessTest extends \PHPUnit\Framework\TestCase {
|
||||
|
@ -5,8 +5,8 @@ namespace Amp\Test;
|
||||
use Amp\Failure;
|
||||
use Amp\Loop;
|
||||
use Amp\Pause;
|
||||
use Amp\Success;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use function React\Promise\resolve;
|
||||
|
||||
class TimeoutTest extends \PHPUnit\Framework\TestCase {
|
||||
|
@ -4,10 +4,10 @@ namespace Amp\Test;
|
||||
|
||||
use Amp\Deferred;
|
||||
use Amp\Failure;
|
||||
use Amp\Loop;
|
||||
use Amp\Pause;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use Amp\Loop;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use function React\Promise\resolve;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user