1
0
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:
Niklas Keller 2017-04-23 14:39:19 +02:00
parent b686f2ac8c
commit 70e63a3748
24 changed files with 28 additions and 35 deletions

View File

@ -124,7 +124,6 @@ trait Producer {
return $deferred->promise();
}
/**
* Resolves the stream with the given value.
*

View File

@ -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);
}

View File

@ -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;
/**

View File

@ -3,8 +3,8 @@
namespace Amp\Test;
use Amp\Failure;
use Amp\Success;
use Amp\Promise;
use Amp\Success;
class PromiseMock {
/** @var \Amp\Promise */

View File

@ -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() {

View File

@ -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() {

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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() {

View File

@ -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 {
/**

View File

@ -2,7 +2,6 @@
namespace Amp\Test;
use Amp;
use Amp\Failure;
use Amp\LazyPromise;
use Amp\Success;

View File

@ -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 () {

View File

@ -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() {

View File

@ -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() {

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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() {

View File

@ -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;

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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;