mirror of
https://github.com/danog/postgres.git
synced 2025-01-22 05:11:14 +01:00
Refix style fixed code
This commit is contained in:
parent
2776a0344e
commit
7c00cf1fb0
@ -21,7 +21,6 @@ return PhpCsFixer\Config::create()
|
||||
"no_whitespace_in_blank_line" => true,
|
||||
"non_printable_character" => true,
|
||||
"normalize_index_brace" => true,
|
||||
"ordered_imports" => true,
|
||||
"php_unit_construct" => true,
|
||||
"php_unit_dedicate_assert" => true,
|
||||
"php_unit_fqcn_annotation" => true,
|
||||
@ -31,6 +30,7 @@ return PhpCsFixer\Config::create()
|
||||
"return_type_declaration" => ["space_before" => "none"],
|
||||
"short_scalar_cast" => true,
|
||||
"single_blank_line_before_namespace" => true,
|
||||
"single_import_per_statement" => false,
|
||||
])
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
|
@ -2,11 +2,7 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\CallableMaker;
|
||||
use Amp\Coroutine;
|
||||
use Amp\Deferred;
|
||||
use Amp\Promise;
|
||||
use function Amp\call;
|
||||
use Amp\{ CallableMaker, Coroutine, Deferred, Promise, function call };
|
||||
|
||||
abstract class AbstractConnection implements Connection {
|
||||
use CallableMaker;
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\Coroutine;
|
||||
use Amp\Deferred;
|
||||
use Amp\Promise;
|
||||
use Amp\{ Coroutine, Deferred, Promise };
|
||||
|
||||
abstract class AbstractPool implements Pool {
|
||||
/** @var \SplQueue */
|
||||
|
@ -2,5 +2,4 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
class FailureException extends \Exception {
|
||||
}
|
||||
class FailureException extends \Exception {}
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\Iterator;
|
||||
use Amp\Promise;
|
||||
use Amp\{ Iterator, Promise };
|
||||
|
||||
class Listener implements Iterator, Operation {
|
||||
use Internal\Operation;
|
||||
|
@ -2,10 +2,7 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\Deferred;
|
||||
use Amp\Failure;
|
||||
use Amp\Loop;
|
||||
use Amp\Promise;
|
||||
use Amp\{ Deferred, Failure, Loop, Promise };
|
||||
|
||||
class PgSqlConnection extends AbstractConnection {
|
||||
/**
|
||||
|
@ -2,12 +2,7 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\CallableMaker;
|
||||
use Amp\Deferred;
|
||||
use Amp\Emitter;
|
||||
use Amp\Loop;
|
||||
use Amp\Promise;
|
||||
use function Amp\call;
|
||||
use Amp\{ CallableMaker, Deferred, Emitter, Loop, Promise, function call };
|
||||
|
||||
class PgSqlExecutor implements Executor {
|
||||
use CallableMaker;
|
||||
|
@ -2,5 +2,4 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
class PoolError extends \Error {
|
||||
}
|
||||
class PoolError extends \Error {}
|
||||
|
@ -2,10 +2,7 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\Deferred;
|
||||
use Amp\Failure;
|
||||
use Amp\Loop;
|
||||
use Amp\Promise;
|
||||
use Amp\{ Deferred, Failure, Loop, Promise };
|
||||
use pq;
|
||||
|
||||
class PqConnection extends AbstractConnection {
|
||||
|
@ -2,15 +2,8 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\CallableMaker;
|
||||
use Amp\Coroutine;
|
||||
use Amp\Deferred;
|
||||
use Amp\Emitter;
|
||||
use Amp\Loop;
|
||||
use Amp\Promise;
|
||||
use Amp\{ CallableMaker, Coroutine, Deferred, Emitter, Loop, Promise, function call, function coroutine };
|
||||
use pq;
|
||||
use function Amp\call;
|
||||
use function Amp\coroutine;
|
||||
|
||||
class PqExecutor implements Executor {
|
||||
use CallableMaker;
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\Coroutine;
|
||||
use Amp\Promise;
|
||||
use Amp\{ Coroutine, Promise };
|
||||
use pq;
|
||||
|
||||
class PqStatement implements Statement {
|
||||
|
@ -2,5 +2,4 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
class QueryError extends \Error {
|
||||
}
|
||||
class QueryError extends \Error {}
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\Coroutine;
|
||||
use Amp\Promise;
|
||||
use Amp\{ Coroutine, Promise };
|
||||
|
||||
class Transaction implements Executor, Operation {
|
||||
use Internal\Operation;
|
||||
|
@ -2,5 +2,4 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
class TransactionError extends \Error {
|
||||
}
|
||||
class TransactionError extends \Error {}
|
||||
|
@ -2,15 +2,8 @@
|
||||
|
||||
namespace Amp\Postgres\Test;
|
||||
|
||||
use Amp\Coroutine;
|
||||
use Amp\Delayed;
|
||||
use Amp\Loop;
|
||||
use Amp\Postgres\CommandResult;
|
||||
use Amp\Postgres\Connection;
|
||||
use Amp\Postgres\QueryError;
|
||||
use Amp\Postgres\Transaction;
|
||||
use Amp\Postgres\TransactionError;
|
||||
use Amp\Postgres\TupleResult;
|
||||
use Amp\{ Coroutine, Delayed, Loop };
|
||||
use Amp\Postgres\{ CommandResult, Connection, QueryError, Transaction, TransactionError, TupleResult };
|
||||
|
||||
abstract class AbstractConnectionTest extends \PHPUnit_Framework_TestCase {
|
||||
/** @var \Amp\Postgres\Connection */
|
||||
|
@ -2,15 +2,8 @@
|
||||
|
||||
namespace Amp\Postgres\Test;
|
||||
|
||||
use Amp\Loop;
|
||||
use Amp\Postgres\CommandResult;
|
||||
use Amp\Postgres\Connection;
|
||||
use Amp\Postgres\Statement;
|
||||
use Amp\Postgres\Transaction;
|
||||
use Amp\Postgres\TupleResult;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use function Amp\call;
|
||||
use Amp\{ Loop, Promise, Success, function call };
|
||||
use Amp\Postgres\{ CommandResult, Connection, Statement, Transaction, TupleResult };
|
||||
|
||||
abstract class AbstractPoolTest extends \PHPUnit_Framework_TestCase {
|
||||
/**
|
||||
|
@ -2,9 +2,8 @@
|
||||
|
||||
namespace Amp\Postgres\Test;
|
||||
|
||||
use Amp\{ Promise, Success };
|
||||
use Amp\Postgres\ConnectionPool;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
|
||||
class ConnectionPoolTest extends AbstractPoolTest {
|
||||
/**
|
||||
|
@ -3,8 +3,7 @@
|
||||
namespace Amp\Postgres\Test;
|
||||
|
||||
use Amp\Loop;
|
||||
use Amp\Postgres\Connection;
|
||||
use function Amp\Postgres\connect;
|
||||
use Amp\Postgres\{ Connection, function connect };
|
||||
|
||||
class FunctionsTest extends \PHPUnit_Framework_TestCase {
|
||||
public function setUp() {
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
namespace Amp\Postgres\Test;
|
||||
|
||||
use Amp\Postgres\Connection;
|
||||
use Amp\Postgres\PgSqlConnection;
|
||||
use Amp\Postgres\{ Connection, PgSqlConnection };
|
||||
|
||||
/**
|
||||
* @requires extension pgsql
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
namespace Amp\Postgres\Test;
|
||||
|
||||
use Amp\Postgres\Connection;
|
||||
use Amp\Postgres\PqConnection;
|
||||
use Amp\Postgres\{ Connection, PqConnection };
|
||||
|
||||
/**
|
||||
* @requires extension pq
|
||||
|
Loading…
x
Reference in New Issue
Block a user