Skip to content

Commit

Permalink
Fix typos in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
yadaiio committed Nov 8, 2023
1 parent 28ccb94 commit 435cb55
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ using the new lazy connections as detailed below.
From a consumer side this means that you can start sending queries to the
database right away while the underlying connection may still be
outstanding. Because creating this underlying connection may take some
time, it will enqueue all oustanding commands and will ensure that all
time, it will enqueue all outstanding commands and will ensure that all
commands will be executed in correct order once the connection is ready.
In other words, this "virtual" connection behaves just like a "real"
connection as described in the `ConnectionInterface` and frees you from
Expand Down Expand Up @@ -176,7 +176,7 @@ have to take care of when updating from an older version.
$connection = new Connection($loop, $options);
$connection->connect(function (?Exception $error, $connection) {
if ($error) {
// an error occured while trying to connect or authorize client
// an error occurred while trying to connect or authorize client
} else {
// client connection established (and authenticated)
}
Expand All @@ -189,7 +189,7 @@ have to take care of when updating from an older version.
// client connection established (and authenticated)
},
function (Exception $e) {
// an error occured while trying to connect or authorize client
// an error occurred while trying to connect or authorize client
}
);
```
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ $factory->createConnection($url)->then(
// client connection established (and authenticated)
},
function (Exception $e) {
// an error occured while trying to connect or authorize client
// an error occurred while trying to connect or authorize client
}
);
```
Expand Down Expand Up @@ -213,7 +213,7 @@ underlying connection if this idle time is expired.
From a consumer side this means that you can start sending queries to the
database right away while the underlying connection may still be
outstanding. Because creating this underlying connection may take some
time, it will enqueue all oustanding commands and will ensure that all
time, it will enqueue all outstanding commands and will ensure that all
commands will be executed in correct order once the connection is ready.
In other words, this "virtual" connection behaves just like a "real"
connection as described in the `ConnectionInterface` and frees you from
Expand Down Expand Up @@ -463,7 +463,7 @@ The `close(): void` method can be used to
force-close the connection.

Unlike the `quit()` method, this method will immediately force-close the
connection and reject all oustanding commands.
connection and reject all outstanding commands.

```php
$connection->close();
Expand Down
2 changes: 1 addition & 1 deletion examples/12-slow-stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$factory->createConnection($uri)->then(function (ConnectionInterface $connection) use ($query) {
// The protocol parser reads rather large chunked from the underlying connection
// and as such can yield multiple (dozens to hundreds) rows from a single data
// chunk. We try to artifically limit the stream chunk size here to try to
// chunk. We try to artificially limit the stream chunk size here to try to
// only ever read a single row so we can demonstrate throttling this stream.
// It goes without saying this is only a hack! Real world applications rarely
// have the need to limit the chunk size. As an alternative, consider using
Expand Down
2 changes: 1 addition & 1 deletion src/ConnectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function quit();
* Force-close the connection.
*
* Unlike the `quit()` method, this method will immediately force-close the
* connection and reject all oustanding commands.
* connection and reject all outstanding commands.
*
* ```php
* $connection->close();
Expand Down
4 changes: 2 additions & 2 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function __construct(LoopInterface $loop = null, ConnectorInterface $conn
* // client connection established (and authenticated)
* },
* function (Exception $e) {
* // an error occured while trying to connect or authorize client
* // an error occurred while trying to connect or authorize client
* }
* );
* ```
Expand Down Expand Up @@ -285,7 +285,7 @@ public function createConnection(
* From a consumer side this means that you can start sending queries to the
* database right away while the underlying connection may still be
* outstanding. Because creating this underlying connection may take some
* time, it will enqueue all oustanding commands and will ensure that all
* time, it will enqueue all outstanding commands and will ensure that all
* commands will be executed in correct order once the connection is ready.
* In other words, this "virtual" connection behaves just like a "real"
* connection as described in the `ConnectionInterface` and frees you from
Expand Down
2 changes: 1 addition & 1 deletion src/Io/Buffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function readBuffer($len)
* This method can be used instead of `read()` if you do not care about the
* bytes that will be skipped.
*
* @param int $len length in bytes, must be positve and non-zero
* @param int $len length in bytes, must be positive and non-zero
* @return void
* @throws \UnderflowException
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Io/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class Connection extends EventEmitter implements ConnectionInterface
{
const STATE_AUTHENTICATED = 5;
const STATE_CLOSEING = 6;
const STATE_CLOSING = 6;
const STATE_CLOSED = 7;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Io/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Parser
protected $insertId;
protected $affectedRows;

public $protocalVersion = 0;
public $protocolVersion = 0;

private $buffer;

Expand Down Expand Up @@ -199,8 +199,8 @@ private function parsePacket(Buffer $packet)
}

$this->phase = self::PHASE_GOT_INIT;
$this->protocalVersion = $response;
$this->debug(sprintf("Protocal Version: %d", $this->protocalVersion));
$this->protocolVersion = $response;
$this->debug(sprintf("Protocol Version: %d", $this->protocalVersion));

$options = &$this->connectOptions;
$options['serverVersion'] = $packet->readStringNull();
Expand Down
4 changes: 2 additions & 2 deletions src/Io/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function bindParamsFromArray(array $params)
}

/**
* Binding params for the query, mutiple arguments support.
* Binding params for the query, multiple arguments support.
*
* @param mixed $param
* @return self
Expand Down Expand Up @@ -116,7 +116,7 @@ protected function resolveValueForSql($value)
$value = 'NULL';
break;
default:
throw new \InvalidArgumentException(sprintf('Not supportted value type of %s.', $type));
throw new \InvalidArgumentException(sprintf('Not supported value type of %s.', $type));
break;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ResultQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public function testSelectCharsetDefaultsToUtf8()
Loop::run();
}

public function testSelectWithExplcitCharsetReturnsCharset()
public function testSelectWithExplicitCharsetReturnsCharset()
{
$factory = new Factory();

Expand Down

0 comments on commit 435cb55

Please sign in to comment.