Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More dots added, some removed. Also a typo was removed.

  • Loading branch information...
commit ff980a336fa0fd984a1389984f703e292bc338b3 1 parent 3f162b3
@bar bar authored
View
66 src/Database/Connection.php
@@ -25,14 +25,14 @@
use Cake\Database\Query;
/**
- * Represents a connection with a database server
+ * Represents a connection with a database server.
*/
class Connection {
use TypeConverterTrait;
/**
- * Contains the configuration params for this connection
+ * Contains the configuration params for this connection.
*
* @var array
*/
@@ -40,21 +40,21 @@ class Connection {
/**
* Driver object, responsible for creating the real connection
- * and provide specific SQL dialect
+ * and provide specific SQL dialect.
*
* @var \Cake\Database\Driver
*/
protected $_driver;
/**
- * Contains how many nested transactions have been started
+ * Contains how many nested transactions have been started.
*
* @var int
*/
protected $_transactionLevel = 0;
/**
- * Whether a transaction is active in this connection
+ * Whether a transaction is active in this connection.
*
* @var int
*/
@@ -62,28 +62,28 @@ class Connection {
/**
* Whether this connection can and should use savepoints for nested
- * transactions
+ * transactions.
*
* @var boolean
*/
protected $_useSavePoints = false;
/**
- * Whether to log queries generated during this connection
+ * Whether to log queries generated during this connection.
*
* @var boolean
*/
protected $_logQueries = false;
/**
- * Logger object instance
+ * Logger object instance.
*
* @var QueryLogger
*/
protected $_logger = null;
/**
- * Constructor
+ * Constructor.
*
* @param array $config configuration for connecting to database
*/
@@ -133,7 +133,7 @@ public function configName() {
* Sets the driver instance. If an string is passed it will be treated
* as a class name and will be instantiated.
*
- * If no params are passed it will return the current driver instance
+ * If no params are passed it will return the current driver instance.
*
* @param string|Driver $driver
* @param array|null $config Either config for a new driver or null.
@@ -158,7 +158,7 @@ public function driver($driver = null, $config = null) {
}
/**
- * Connects to the configured database
+ * Connects to the configured database.
*
* @throws \Cake\Database\Exception\MissingConnectionException if credentials are invalid
* @return boolean true on success or false if already connected.
@@ -173,7 +173,7 @@ public function connect() {
}
/**
- * Disconnects from database server
+ * Disconnects from database server.
*
* @return void
*/
@@ -182,7 +182,7 @@ public function disconnect() {
}
/**
- * Returns whether connection to database server was already stablished
+ * Returns whether connection to database server was already established.
*
* @return boolean
*/
@@ -191,7 +191,7 @@ public function isConnected() {
}
/**
- * Prepares a sql statement to be executed
+ * Prepares a SQL statement to be executed.
*
* @param string|\Cake\Database\Query $sql
* @return \Cake\Database\Statement
@@ -208,7 +208,7 @@ public function prepare($sql) {
/**
* Executes a query using $params for interpolating values and $types as a hint for each
- * those params
+ * those params.
*
* @param string $query SQL to be executed and interpolated with $params
* @param array $params list or associative array of params to be interpolated in $query as values
@@ -227,7 +227,7 @@ public function execute($query, array $params = [], array $types = []) {
}
/**
- * Executes a SQL statement and returns the Statement object as result
+ * Executes a SQL statement and returns the Statement object as result.
*
* @param string $sql
* @return \Cake\Database\Statement
@@ -257,7 +257,7 @@ public function schemaCollection() {
}
/**
- * Executes an INSERT query on the specified table
+ * Executes an INSERT query on the specified table.
*
* @param string $table the table to update values in
* @param array $data values to be inserted
@@ -273,7 +273,7 @@ public function insert($table, array $data, array $types = []) {
}
/**
- * Executes an UPDATE statement on the specified table
+ * Executes an UPDATE statement on the specified table.
*
* @param string $table the table to delete rows from
* @param array $data values to be updated
@@ -291,7 +291,7 @@ public function update($table, array $data, array $conditions = [], $types = [])
}
/**
- * Executes a DELETE statement on the specified table
+ * Executes a DELETE statement on the specified table.
*
* @param string $table the table to delete rows from
* @param array $conditions conditions to be set for delete statement
@@ -305,7 +305,7 @@ public function delete($table, $conditions = [], $types = []) {
}
/**
- * Starts a new transaction
+ * Starts a new transaction.
*
* @return void
*/
@@ -327,7 +327,7 @@ public function begin() {
}
/**
- * Commits current transaction
+ * Commits current transaction.
*
* @return boolean true on success, false otherwise
*/
@@ -352,7 +352,7 @@ public function commit() {
}
/**
- * Rollback current transaction
+ * Rollback current transaction.
*
* @return boolean
*/
@@ -384,7 +384,7 @@ public function rollback() {
* only if driver the allows it.
*
* If you are trying to enable this feature, make sure you check the return value of this
- * function to verify it was enabled successfully
+ * function to verify it was enabled successfully.
*
* ## Example:
*
@@ -408,7 +408,7 @@ public function useSavePoints($enable = null) {
}
/**
- * Creates a new save point for nested transactions
+ * Creates a new save point for nested transactions.
*
* @param string $name
* @return void
@@ -418,7 +418,7 @@ public function createSavePoint($name) {
}
/**
- * Releases a save point by its name
+ * Releases a save point by its name.
*
* @param string $name
* @return void
@@ -428,7 +428,7 @@ public function releaseSavePoint($name) {
}
/**
- * Rollback a save point by its name
+ * Rollback a save point by its name.
*
* @param string $name
* @return void
@@ -442,9 +442,9 @@ public function rollbackSavepoint($name) {
* while executing the passed callable, the transaction will be rolled back
* If the result of the callable function is ``false``, the transaction will
* also be rolled back. Otherwise the transaction is committed after executing
- * the callback
+ * the callback.
*
- * The callback will receive the connection instance as its first argument..
+ * The callback will receive the connection instance as its first argument.
*
* ### Example:
*
@@ -479,7 +479,7 @@ public function transactional(callable $callback) {
}
/**
- * Quotes value to be used safely in database query
+ * Quotes value to be used safely in database query.
*
* @param mixed $value
* @param string $type Type to be used for determining kind of quoting to perform
@@ -491,7 +491,7 @@ public function quote($value, $type = null) {
}
/**
- * Checks if the driver supports quoting
+ * Checks if the driver supports quoting.
*
* @return boolean
*/
@@ -501,7 +501,7 @@ public function supportsQuoting() {
/**
* Quotes a database identifier (a column name, table name, etc..) to
- * be used safely in queries without the risk of using reserved words
+ * be used safely in queries without the risk of using reserved words.
*
* @param string $identifier
* @return string
@@ -522,7 +522,7 @@ public function logQueries($enable) {
/**
* Sets the logger object instance. When called with no arguments
- * it returns the currently setup logger instance
+ * it returns the currently setup logger instance.
*
* @param object $instance logger object instance
* @return object logger instance
@@ -538,7 +538,7 @@ public function logger($instance = null) {
}
/**
- * Logs a Query string using the configured logger object
+ * Logs a Query string using the configured logger object.
*
* @param string $sql string to be logged
* @return void
View
4 src/Database/Query.php
@@ -188,7 +188,7 @@ public function connection($connection = null) {
* to actually be executed. Immediately after, literal values are passed to the
* connection so they are bound to the query in a safe way. Finally, the resulting
* statement is decorated with custom objects to execute callbacks for each row
- * is retrieved if necessary.
+ * retrieved if necessary.
*
* Resulting statement is traversable, so it can be used in any loop as you would
* with an array.
@@ -219,7 +219,7 @@ public function execute() {
* values when the query is executed, hence it is most suitable to use with
* prepared statements.
*
- * @param ValueBinder $generator A placeholder a value binder object that will hold
+ * @param ValueBinder $generator A placeholder object that will hold
* associated values for expressions
* @return string
*/
View
30 src/Database/Statement/StatementDecorator.php
@@ -34,14 +34,14 @@ class StatementDecorator implements StatementInterface, \Countable, \IteratorAgg
/**
* Statement instance implementation, such as PDOStatement
- * or any other custom implementation
+ * or any other custom implementation.
*
* @var mixed
*/
protected $_statement;
/**
- * Reference to the driver object associated to this statement
+ * Reference to the driver object associated to this statement.
*
* @var \Cake\Database\Driver
*/
@@ -59,7 +59,7 @@ public function __construct($statement = null, $driver = null) {
}
/**
- * Magic getter to return $queryString as read-only
+ * Magic getter to return $queryString as read-only.
*
* @param string $property internal property to get
* @return mixed
@@ -75,7 +75,7 @@ public function __get($property) {
* positional variables you need to start with index one, if using named params then
* just use the name in any order.
*
- * It is not allowed to combine positional and named variables in the same statement
+ * It is not allowed to combine positional and named variables in the same statement.
*
* ## Examples:
*
@@ -106,7 +106,7 @@ public function closeCursor() {
}
/**
- * Returns the number of columns this statement's results will contain
+ * Returns the number of columns this statement's results will contain.
*
* ## Example:
*
@@ -123,7 +123,7 @@ public function columnCount() {
}
/**
- * Returns the error code for the last error that occurred when executing this statement
+ * Returns the error code for the last error that occurred when executing this statement.
*
* @return integer|string
*/
@@ -133,7 +133,7 @@ public function errorCode() {
/**
* Returns the error information for the last error that occurred when executing
- * this statement
+ * this statement.
*
* @return array
*/
@@ -145,7 +145,7 @@ public function errorInfo() {
* Executes the statement by sending the SQL query to the database. It can optionally
* take an array or arguments to be bound to the query variables. Please note
* that binding parameters from this method will not perform any custom type conversion
- * as it would normally happen when calling `bindValue`
+ * as it would normally happen when calling `bindValue`.
*
* @param array $params list of values to be bound to query
* @return boolean true on success, false otherwise
@@ -157,7 +157,7 @@ public function execute($params = null) {
/**
* Returns the next row for the result set after executing this statement.
* Rows can be fetched to contain columns as names or positions. If no
- * rows are left in result set, this method will return false
+ * rows are left in result set, this method will return false.
*
* ## Example:
*
@@ -176,7 +176,7 @@ public function fetch($type = 'num') {
}
/**
- * Returns an array with all rows resulting from executing this statement
+ * Returns an array with all rows resulting from executing this statement.
*
* ## Example:
*
@@ -194,7 +194,7 @@ public function fetchAll($type = 'num') {
}
/**
- * Returns the number of rows affected by this SQL statement
+ * Returns the number of rows affected by this SQL statement.
*
* ## Example:
*
@@ -231,8 +231,8 @@ public function getIterator() {
}
/**
- * Statements can be passed as argument for count()
- * to return the number for affected rows from last execution
+ * Statements can be passed as argument for count() to return the number
+ * for affected rows from last execution.
*
* @return integer
*/
@@ -241,7 +241,7 @@ public function count() {
}
/**
- * Binds a set of values to statement object with corresponding type
+ * Binds a set of values to statement object with corresponding type.
*
* @param array $params list of values to be bound
* @param array $types list of types to be used, keys should match those in $params
@@ -267,7 +267,7 @@ public function bind($params, $types) {
}
/**
- * Returns the latest primary inserted using this statement
+ * Returns the latest primary inserted using this statement.
*
* @param string $table table name or sequence to get last insert value from
* @param string column the name of the column representing the primary key
Please sign in to comment.
Something went wrong with that request. Please try again.