Skip to content

Commit 3e19f69

Browse files
shamalorenzo
authored andcommitted
Fix typos
1 parent cc6f27e commit 3e19f69

File tree

7 files changed

+47
-47
lines changed

7 files changed

+47
-47
lines changed

lib/Cake/Model/Datasource/Database/Connection.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Cake\Model\Datasource\Database\Exception\MissingConnectionException;
99

1010
/**
11-
* Represents a conection with a database server
11+
* Represents a connection with a database server
1212
*
1313
**/
1414
class Connection {
@@ -22,7 +22,7 @@ class Connection {
2222

2323
/**
2424
* Driver object, responsible for creating the real connection
25-
* and provide specific SQL dialact
25+
* and provide specific SQL dialect
2626
*
2727
* @var Cake\Model\Datasource\Database\Driver
2828
**/
@@ -60,7 +60,7 @@ class Connection {
6060
/**
6161
* Constructor
6262
*
63-
* @param array $config configuration for conencting to database
63+
* @param array $config configuration for connecting to database
6464
* @throws \Cake\Model\Datasource\Database\Exception\MissingDriverException if driver class can not be found
6565
* @throws \Cake\Model\Datasource\Database\Exception\MissingExtensionException if driver cannot be used
6666
* @return void
@@ -78,7 +78,7 @@ public function __construct($config) {
7878
}
7979

8080
/**
81-
* Connects to the configured databatase
81+
* Connects to the configured database
8282
*
8383
* @throws \Cake\Model\Datasource\Database\Exception\MissingConnectionException if credentials are invalid
8484
* @return boolean true on success or false if already connected
@@ -105,7 +105,7 @@ public function disconnect() {
105105
}
106106

107107
/**
108-
* Returns wheter connection to database server was already stablished
108+
* Returns whether connection to database server was already stablished
109109
*
110110
* @return boolean
111111
**/
@@ -131,7 +131,7 @@ public function prepare($sql) {
131131
* @param string $query SQL to be executed and interpolated with $params
132132
* @param array $params list or associative array of params to be interpolated in $query as values
133133
* @param array $types list or associative array of types to be used for casting values in query
134-
* @return Cake\Model\Datasource\Database\Statement executed statament
134+
* @return Cake\Model\Datasource\Database\Statement executed statement
135135
**/
136136
public function execute($query, array $params = array(), array $types = array()) {
137137
$this->connect();
@@ -146,7 +146,7 @@ public function execute($query, array $params = array(), array $types = array())
146146
}
147147

148148
/**
149-
* Executes a SQL statament and returns the Statement object as result
149+
* Executes a SQL statement and returns the Statement object as result
150150
*
151151
* @return Cake\Model\Datasource\Database\Statement
152152
**/
@@ -274,7 +274,7 @@ public function commit() {
274274
}
275275

276276
/**
277-
* Rollsback current transaction
277+
* Rollback current transaction
278278
*
279279
* @return void
280280
**/
@@ -360,7 +360,7 @@ public function rollbackSavepoint($name) {
360360
*
361361
* @param mixed $value
362362
* @param Type to be used for determining kind of quoting to perform
363-
* @return mixed queted value
363+
* @return mixed quoted value
364364
**/
365365
public function quote($value, $type = null) {
366366

@@ -380,7 +380,7 @@ public function quoteIdentifier($identifier) {
380380
/**
381381
* Returns last id generated for a table or sequence in database
382382
*
383-
* @param strin $table table name or sequence to get last insert value from
383+
* @param string $table table name or sequence to get last insert value from
384384
* @return string|integer
385385
**/
386386
public function lastInsertId($table) {
@@ -401,7 +401,7 @@ public function charset($collation) {
401401
*
402402
* @param \Cake\Model\Datasource\Database\Statement The statement objet to bind values to
403403
* @param array $params list of values to be bound
404-
* @param array $types list of types to be used, kesy should match those in $params
404+
* @param array $types list of types to be used, keys should match those in $params
405405
* @return void
406406
**/
407407
protected function _bindValues($statement, $params, $types) {
@@ -443,7 +443,7 @@ protected function _mapTypes($columns, $types) {
443443
}
444444

445445
/**
446-
* Simple condtions parser joind by AND
446+
* Simple conditions parser joined by AND
447447
*
448448
* @param array conditions key value array or list of conditions to be joined
449449
* to construct a WHERE clause

lib/Cake/Model/Datasource/Database/Driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
abstract class Driver {
1111

1212
/**
13-
* Establishes a conenction to the databse server
13+
* Establishes a connection to the database server
1414
*
15-
* @param array $config configuretion to be used for creating connection
15+
* @param array $config configuration to be used for creating connection
1616
* @return boolean true con success
1717
**/
1818
public abstract function connect(array $config);
@@ -25,7 +25,7 @@ public abstract function connect(array $config);
2525
public abstract function disconnect();
2626

2727
/**
28-
* Returns wheter php is able to use this driver for connecting to database
28+
* Returns whether php is able to use this driver for connecting to database
2929
*
3030
* @return boolean true if it is valid to use this driver
3131
**/

lib/Cake/Model/Datasource/Database/Driver/Mysql.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Mysql extends \Cake\Model\Datasource\Database\Driver {
2626
/**
2727
* Establishes a connection to the databse server
2828
*
29-
* @param array $config configuretion to be used for creating connection
29+
* @param array $config configuration to be used for creating connection
3030
* @return boolean true on success
3131
**/
3232
public function connect(array $config) {
@@ -64,7 +64,7 @@ public function disconnect() {
6464
}
6565

6666
/**
67-
* Returns wheter php is able to use this driver for connecting to database
67+
* Returns whether php is able to use this driver for connecting to database
6868
*
6969
* @return boolean true if it is valid to use this driver
7070
**/

lib/Cake/Model/Datasource/Database/Statement.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ public function closeCursor() {
109109
*
110110
* {{{
111111
* $statement = $connection->prepare('SELECT id, title from articles');
112-
* $stamement->execute();
113-
* echo $stamement->columnCount(); // outputs 2
112+
* $statement->execute();
113+
* echo $statement->columnCount(); // outputs 2
114114
* }}}
115115
*
116-
* @return int
116+
* @return integer
117117
**/
118118
public function columnCount() {
119119
return $this->_statement->columnCount();
@@ -122,14 +122,14 @@ public function columnCount() {
122122
/**
123123
* Returns the error code for the last error that occurred when executing this statement
124124
*
125-
* @return int|string
125+
* @return integer|string
126126
**/
127127
public function errorCode() {
128128
return $this->_statement->errorCode();
129129
}
130130

131131
/**
132-
* Returens the error information for the last error that occurred when executing
132+
* Returns the error information for the last error that occurred when executing
133133
* this statement
134134
*
135135
* @return array
@@ -144,7 +144,7 @@ public function errorInfo() {
144144
* that binding parameters from this method will not perform any custom type conversion
145145
* as it would normally happen when calling `bindValue`
146146
*
147-
* $param array $params lsit of values to be bound to query
147+
* $param array $params list of values to be bound to query
148148
* @return boolean true on success, false otherwise
149149
**/
150150
public function execute($params = null) {
@@ -160,11 +160,11 @@ public function execute($params = null) {
160160
*
161161
* {{{
162162
* $statement = $connection->prepare('SELECT id, title from articles');
163-
* $stamement->execute();
164-
* print_r($stamement->fetch('assoc')); // will show array('id' => 1, 'title' => 'a title')
163+
* $statement->execute();
164+
* print_r($statement->fetch('assoc')); // will show array('id' => 1, 'title' => 'a title')
165165
* }}}
166166
*
167-
* @param string $type 'num' for positional columns, assoc for named calumns
167+
* @param string $type 'num' for positional columns, assoc for named columns
168168
* @return mixed|boolean result array containing columns and values or false if no results
169169
* are left
170170
**/
@@ -184,8 +184,8 @@ public function fetch($type = 'num') {
184184
*
185185
* {{{
186186
* $statement = $connection->prepare('SELECT id, title from articles');
187-
* $stamement->execute();
188-
* print_r($stamement->fetchAll('assoc')); // will show array(0 => array('id' => 1, 'title' => 'a title'))
187+
* $statement->execute();
188+
* print_r($statement->fetchAll('assoc')); // will show array(0 => array('id' => 1, 'title' => 'a title'))
189189
* }}}
190190
*
191191
* @param string $type num for fetching columns as positional keys or assoc for column names as keys
@@ -207,11 +207,11 @@ public function fetchAll($type = 'num') {
207207
*
208208
* {{{
209209
* $statement = $connection->prepare('SELECT id, title from articles');
210-
* $stamement->execute();
211-
* print_r($stamement->rowCout()); // will show 1
210+
* $statement->execute();
211+
* print_r($statement->rowCount()); // will show 1
212212
* }}}
213213
*
214-
* @return int
214+
* @return integer
215215
**/
216216
public function rowCount() {
217217
return $this->_statement->rowCount();
@@ -225,7 +225,7 @@ public function rowCount() {
225225
*
226226
* {{{
227227
* $statement = $connection->prepare('SELECT id, title from articles');
228-
* $stamement->execute();
228+
* $statement->execute();
229229
* foreach ($statement as $row) {
230230
* //do stuff
231231
* }
@@ -241,7 +241,7 @@ public function getIterator() {
241241
* Statements can be passed as argument for count()
242242
* to return the number for affected rows from last execution
243243
*
244-
* @return int
244+
* @return integer
245245
**/
246246
public function count() {
247247
return $this->rowCount();

lib/Cake/Model/Datasource/Database/Type.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
Cake\Model\Datasource\Database\Driver;
88

99
/**
10-
* Encapsultes all conversion functions for values coming from database into PHP and
10+
* Encapsulates all conversion functions for values coming from database into PHP and
1111
* going from PHP into database.
1212
**/
1313
class Type {
1414

1515
/**
16-
* List of supported database types . A humand readable
16+
* List of supported database types. A human readable
1717
* identifier is used as key and a complete namespaced class name as value
1818
* representing the class that will do actual type conversions.
1919
*
@@ -28,7 +28,7 @@ class Type {
2828
);
2929

3030
/**
31-
* List of mbasic type mappings, used to avoid having to instantiate a class
31+
* List of basic type mappings, used to avoid having to instantiate a class
3232
* for doing conversion on these
3333
*
3434
* @var array
@@ -65,7 +65,7 @@ public function __construct($name = null) {
6565
}
6666

6767
/**
68-
* Returns a Type object capable of converting a type identifyed by $name
68+
* Returns a Type object capable of converting a type identified by $name
6969
*
7070
* @param string $name type identifier
7171
* @return Type
@@ -86,7 +86,7 @@ public static function build($name) {
8686
/**
8787
* Registers a new type identifier and maps it to a fully namespaced classname,
8888
* If called with no arguments it will return current types map array
89-
* If $className is ommited it will return mapped class for $type
89+
* If $className is omitted it will return mapped class for $type
9090
*
9191
* @param string|array $type if string name of type to map, if array list of arrays to be mapped
9292
* @param string $className
@@ -108,7 +108,7 @@ public static function map($type = null, $className = null) {
108108
}
109109

110110
/**
111-
* Clears out all created intences and mapped types classes, useful for testing
111+
* Clears out all created instances and mapped types classes, useful for testing
112112
*
113113
* @return void
114114
**/

lib/Cake/Test/TestCase/Model/Datasource/Database/ConnectionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function testExecuteWithMissingType() {
158158
}
159159

160160
/**
161-
* Tests executing a qury with no params also works
161+
* Tests executing a query with no params also works
162162
*
163163
* @return void
164164
**/
@@ -213,7 +213,7 @@ public function testInsertWithPositionalTypes() {
213213
}
214214

215215
/**
216-
* Auxiliary function to insert a couple rows in a newly creted table
216+
* Auxiliary function to insert a couple rows in a newly created table
217217
*
218218
* @return void
219219
**/
@@ -256,7 +256,7 @@ public function testStatementReusing() {
256256
}
257257

258258
/**
259-
* Tests rows can be updated without specifying any coditions nor types
259+
* Tests rows can be updated without specifying any conditions nor types
260260
*
261261
* @return void
262262
**/
@@ -284,7 +284,7 @@ public function testUpdateWithConditionsNoTypes() {
284284
}
285285

286286
/**
287-
* Tests it is possible to use key => value and stirng conditions for update
287+
* Tests it is possible to use key => value and string conditions for update
288288
*
289289
* @return void
290290
**/

lib/Cake/Test/TestCase/Model/Datasource/Database/TypeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class TypeTest extends \Cake\TestSuite\TestCase {
4242
protected $_originalMap = array();
4343

4444
/**
45-
* Backsup original Type class state
45+
* Backup original Type class state
4646
*
4747
* @return void
4848
**/
@@ -73,7 +73,7 @@ public function testBuildBasicTypes($name) {
7373
}
7474

7575
/**
76-
* provides a basics type list to be used as data proviced for a test
76+
* provides a basics type list to be used as data provided for a test
7777
*
7878
* @return void
7979
**/
@@ -87,7 +87,7 @@ public function basicTypesProvider() {
8787
}
8888

8989
/**
90-
* Tests trying to build an uknown type throws exception
90+
* Tests trying to build an unknown type throws exception
9191
*
9292
* @expectedException InvalidArgumentException
9393
* @return void
@@ -129,7 +129,7 @@ public function testMapAndBuild() {
129129
}
130130

131131
/**
132-
* Tests clear function in conjuntion with map
132+
* Tests clear function in conjunction with map
133133
*
134134
* @return void
135135
**/

0 commit comments

Comments
 (0)