diff --git a/README.md b/README.md index 396ec96..80d27a4 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ $factory = new React\MySQL\Factory(null, $connector); #### createConnection() -The `createConnection(string $url): PromiseInterface` method can be used to +The `createConnection(string $url): PromiseInterface` method can be used to create a new [`ConnectionInterface`](#connectioninterface). It helps with establishing a TCP/IP connection to your MySQL database @@ -311,7 +311,7 @@ and sending your database queries. #### query() -The `query(string $query, array $params = []): PromiseInterface` method can be used to +The `query(string $query, array $params = []): PromiseInterface` method can be used to perform an async query. This method returns a promise that will resolve with a `QueryResult` on @@ -424,7 +424,7 @@ suited for exposing multiple possible results. #### ping() -The `ping(): PromiseInterface` method can be used to +The `ping(): PromiseInterface` method can be used to check that the connection is alive. This method returns a promise that will resolve (with a void value) on @@ -443,7 +443,7 @@ $connection->ping()->then(function () { #### quit() -The `quit(): PromiseInterface` method can be used to +The `quit(): PromiseInterface` method can be used to quit (soft-close) the connection. This method returns a promise that will resolve (with a void value) on diff --git a/src/ConnectionInterface.php b/src/ConnectionInterface.php index c07ac22..db94b47 100644 --- a/src/ConnectionInterface.php +++ b/src/ConnectionInterface.php @@ -98,7 +98,8 @@ interface ConnectionInterface extends EventEmitterInterface * * @param string $sql SQL statement * @param array $params Parameters which should be bound to query - * @return PromiseInterface Returns a Promise + * @return PromiseInterface + * Resolves with a `QueryResult` on success or rejects with an `Exception` on error. */ public function query($sql, array $params = []); @@ -180,7 +181,8 @@ public function queryStream($sql, $params = []); * }); * ``` * - * @return PromiseInterface Returns a Promise + * @return PromiseInterface + * Resolves with a `void` value on success or rejects with an `Exception` on error. */ public function ping(); @@ -198,7 +200,8 @@ public function ping(); * $connection->quit(); * ``` * - * @return PromiseInterface Returns a Promise + * @return PromiseInterface + * Resolves with a `void` value on success or rejects with an `Exception` on error. */ public function quit(); diff --git a/src/Factory.php b/src/Factory.php index 7fb89d0..9d55800 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -153,7 +153,8 @@ public function __construct(LoopInterface $loop = null, ConnectorInterface $conn * ``` * * @param string $uri - * @return PromiseInterface Promise + * @return PromiseInterface + * Resolves with a `ConnectionInterface` on success or rejects with an `Exception` on error. */ public function createConnection( #[\SensitiveParameter]