Skip to content

Commit 69629c9

Browse files
committed
Fix typos in documentation
1 parent 28ccb94 commit 69629c9

File tree

10 files changed

+21
-21
lines changed

10 files changed

+21
-21
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ using the new lazy connections as detailed below.
130130
From a consumer side this means that you can start sending queries to the
131131
database right away while the underlying connection may still be
132132
outstanding. Because creating this underlying connection may take some
133-
time, it will enqueue all oustanding commands and will ensure that all
133+
time, it will enqueue all outstanding commands and will ensure that all
134134
commands will be executed in correct order once the connection is ready.
135135
In other words, this "virtual" connection behaves just like a "real"
136136
connection as described in the `ConnectionInterface` and frees you from
@@ -176,7 +176,7 @@ have to take care of when updating from an older version.
176176
$connection = new Connection($loop, $options);
177177
$connection->connect(function (?Exception $error, $connection) {
178178
if ($error) {
179-
// an error occured while trying to connect or authorize client
179+
// an error occurred while trying to connect or authorize client
180180
} else {
181181
// client connection established (and authenticated)
182182
}
@@ -189,7 +189,7 @@ have to take care of when updating from an older version.
189189
// client connection established (and authenticated)
190190
},
191191
function (Exception $e) {
192-
// an error occured while trying to connect or authorize client
192+
// an error occurred while trying to connect or authorize client
193193
}
194194
);
195195
```

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ $factory->createConnection($url)->then(
111111
// client connection established (and authenticated)
112112
},
113113
function (Exception $e) {
114-
// an error occured while trying to connect or authorize client
114+
// an error occurred while trying to connect or authorize client
115115
}
116116
);
117117
```
@@ -213,7 +213,7 @@ underlying connection if this idle time is expired.
213213
From a consumer side this means that you can start sending queries to the
214214
database right away while the underlying connection may still be
215215
outstanding. Because creating this underlying connection may take some
216-
time, it will enqueue all oustanding commands and will ensure that all
216+
time, it will enqueue all outstanding commands and will ensure that all
217217
commands will be executed in correct order once the connection is ready.
218218
In other words, this "virtual" connection behaves just like a "real"
219219
connection as described in the `ConnectionInterface` and frees you from
@@ -463,7 +463,7 @@ The `close(): void` method can be used to
463463
force-close the connection.
464464

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

468468
```php
469469
$connection->close();

examples/12-slow-stream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
$factory->createConnection($uri)->then(function (ConnectionInterface $connection) use ($query) {
1919
// The protocol parser reads rather large chunked from the underlying connection
2020
// and as such can yield multiple (dozens to hundreds) rows from a single data
21-
// chunk. We try to artifically limit the stream chunk size here to try to
21+
// chunk. We try to artificially limit the stream chunk size here to try to
2222
// only ever read a single row so we can demonstrate throttling this stream.
2323
// It goes without saying this is only a hack! Real world applications rarely
2424
// have the need to limit the chunk size. As an alternative, consider using

src/ConnectionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public function quit();
206206
* Force-close the connection.
207207
*
208208
* Unlike the `quit()` method, this method will immediately force-close the
209-
* connection and reject all oustanding commands.
209+
* connection and reject all outstanding commands.
210210
*
211211
* ```php
212212
* $connection->close();

src/Factory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function __construct(LoopInterface $loop = null, ConnectorInterface $conn
7777
* // client connection established (and authenticated)
7878
* },
7979
* function (Exception $e) {
80-
* // an error occured while trying to connect or authorize client
80+
* // an error occurred while trying to connect or authorize client
8181
* }
8282
* );
8383
* ```
@@ -285,7 +285,7 @@ public function createConnection(
285285
* From a consumer side this means that you can start sending queries to the
286286
* database right away while the underlying connection may still be
287287
* outstanding. Because creating this underlying connection may take some
288-
* time, it will enqueue all oustanding commands and will ensure that all
288+
* time, it will enqueue all outstanding commands and will ensure that all
289289
* commands will be executed in correct order once the connection is ready.
290290
* In other words, this "virtual" connection behaves just like a "real"
291291
* connection as described in the `ConnectionInterface` and frees you from

src/Io/Buffer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function readBuffer($len)
104104
* This method can be used instead of `read()` if you do not care about the
105105
* bytes that will be skipped.
106106
*
107-
* @param int $len length in bytes, must be positve and non-zero
107+
* @param int $len length in bytes, must be positive and non-zero
108108
* @return void
109109
* @throws \UnderflowException
110110
*/

src/Io/Connection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class Connection extends EventEmitter implements ConnectionInterface
2222
{
2323
const STATE_AUTHENTICATED = 5;
24-
const STATE_CLOSEING = 6;
24+
const STATE_CLOSING = 6;
2525
const STATE_CLOSED = 7;
2626

2727
/**
@@ -146,7 +146,7 @@ public function quit()
146146
$this->emit('close', [$this]);
147147
$resolve(null);
148148
});
149-
$this->state = self::STATE_CLOSEING;
149+
$this->state = self::STATE_CLOSING;
150150
});
151151
}
152152

@@ -199,7 +199,7 @@ public function handleConnectionError($err)
199199
*/
200200
public function handleConnectionClosed()
201201
{
202-
if ($this->state < self::STATE_CLOSEING) {
202+
if ($this->state < self::STATE_CLOSING) {
203203
$this->emit('error', [new \RuntimeException(
204204
'Connection closed by peer (ECONNRESET)',
205205
\defined('SOCKET_ECONNRESET') ? \SOCKET_ECONNRESET : 104

src/Io/Parser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Parser
8989
protected $insertId;
9090
protected $affectedRows;
9191

92-
public $protocalVersion = 0;
92+
public $protocolVersion = 0;
9393

9494
private $buffer;
9595

@@ -199,8 +199,8 @@ private function parsePacket(Buffer $packet)
199199
}
200200

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

205205
$options = &$this->connectOptions;
206206
$options['serverVersion'] = $packet->readStringNull();

src/Io/Query.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct($sql)
4747
}
4848

4949
/**
50-
* Binding params for the query, mutiple arguments support.
50+
* Binding params for the query, multiple arguments support.
5151
*
5252
* @param mixed $param
5353
* @return self
@@ -69,7 +69,7 @@ public function bindParamsFromArray(array $params)
6969
}
7070

7171
/**
72-
* Binding params for the query, mutiple arguments support.
72+
* Binding params for the query, multiple arguments support.
7373
*
7474
* @param mixed $param
7575
* @return self
@@ -116,7 +116,7 @@ protected function resolveValueForSql($value)
116116
$value = 'NULL';
117117
break;
118118
default:
119-
throw new \InvalidArgumentException(sprintf('Not supportted value type of %s.', $type));
119+
throw new \InvalidArgumentException(sprintf('Not supported value type of %s.', $type));
120120
break;
121121
}
122122

tests/ResultQueryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ public function testSelectCharsetDefaultsToUtf8()
366366
Loop::run();
367367
}
368368

369-
public function testSelectWithExplcitCharsetReturnsCharset()
369+
public function testSelectWithExplicitCharsetReturnsCharset()
370370
{
371371
$factory = new Factory();
372372

0 commit comments

Comments
 (0)