Skip to content

Commit

Permalink
Fix doc blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
rockingeric committed Feb 4, 2014
1 parent 3a440ce commit 5f3781c
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Database/Dialect/SqliteDialectTrait.php
Expand Up @@ -149,7 +149,7 @@ protected function _transformTupleComparison(TupleComparison $expression, $query
*
* The way SQLite works with multi insert is by having multiple select statements
* joined with UNION.
*
* @param Cake\Database\Query $query The query to translate
* @return Query
*/
protected function _insertQueryTranslator($query) {
Expand Down
5 changes: 4 additions & 1 deletion src/Database/Driver.php
Expand Up @@ -78,6 +78,7 @@ public abstract function disconnect();
* Returns correct connection resource or object that is internally used
* If first argument is passed,
*
* @param null|PDO instance $connection
* @return void
*/
public abstract function connection($connection = null);
Expand Down Expand Up @@ -130,6 +131,8 @@ public function supportsSavePoints() {
/**
* Returns a value in a safe representation to be used in a query string
*
* @param mixed $value
* @param string $type Type to be used for determining kind of quoting to perform
* @return string
*/
public abstract function quote($value, $type);
Expand Down Expand Up @@ -208,7 +211,7 @@ public function schemaValue($value) {
* Returns last id generated for a table or sequence in database
*
* @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
* @param string $column the name of the column representing the primary key
* @return string|integer
*/
public function lastInsertId($table = null, $column = null) {
Expand Down
6 changes: 4 additions & 2 deletions src/Database/Driver/PDODriverTrait.php
Expand Up @@ -50,7 +50,7 @@ protected function _connect(array $config) {
* Returns correct connection resource or object that is internally used
* If first argument is passed, it will set internal conenction object or
* result to the value passed
*
* @param null|PDO instance $connection
* @return mixed connection object used internally
*/
public function connection($connection = null) {
Expand Down Expand Up @@ -122,7 +122,8 @@ public function rollbackTransaction() {

/**
* Returns a value in a safe representation to be used in a query string
*
* @param mixed $value
* @param string $type Type to be used for determining kind of quoting to perform
* @return string
*/
public function quote($value, $type) {
Expand All @@ -134,6 +135,7 @@ public function quote($value, $type) {
* Returns last id generated for a table or sequence in database
*
* @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
* @return string|integer
*/
public function lastInsertId($table = null, $column = null) {
Expand Down
2 changes: 2 additions & 0 deletions src/Database/Driver/Postgres.php
Expand Up @@ -96,6 +96,7 @@ public function enabled() {
/**
* Sets connection encoding
*
* @param string $encoding
* @return void
*/
public function setEncoding($encoding) {
Expand All @@ -107,6 +108,7 @@ public function setEncoding($encoding) {
* Sets connection default schema, if any relation defined in a query is not fully qualified
* postgres will fallback to looking the relation into defined default schema
*
* @param string $schema
* @return void
*/
public function setSchema($schema) {
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Expression/QueryExpression.php
Expand Up @@ -456,7 +456,7 @@ protected function _addConditions(array $conditions, array $types) {
* @param string $field The value from with the actual field and operator will
* be extracted.
* @param mixed $value The value to be bound to a placeholder for the field
* $param array $types List of types where the field can be found so the value
* @param array $types List of types where the field can be found so the value
* can be converted accordingly.
* @return string|QueryExpression
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Expression/TupleComparison.php
Expand Up @@ -160,7 +160,7 @@ public function traverse(callable $callable) {
* it is an ExpressionInterface
*
* @param mixed $value
* @Param callable $callable
* @param callable $callable
* @return void
*/
protected function _traverseValue($value, $callable) {
Expand Down
6 changes: 3 additions & 3 deletions src/Database/Log/LoggingStatement.php
Expand Up @@ -19,7 +19,7 @@
use Cake\Database\Statement\StatementDecorator;

/**
* Statement decorator used to
* Statement decorator used to
*
* @return void
*/
Expand All @@ -43,7 +43,7 @@ class LoggingStatement extends StatementDecorator {
* Wrapper for the execute function to calculate time spent
* and log the query afterwards.
*
* $param array $params list of values to be bound to query
* @param array $params list of values to be bound to query
* @return boolean true on success, false otherwise
*/
public function execute($params = null) {
Expand All @@ -67,7 +67,7 @@ public function execute($params = null) {
* @param string|integer $column name or param position to be bound
* @param mixed $value the value to bind to variable in query
* @param string|integer $type PDO type or name of configured Type class
* @return void
* @return void
*/
public function bindValue($column, $value, $type = 'string') {
parent::bindValue($column, $value, $type);
Expand Down
1 change: 1 addition & 0 deletions src/Database/Log/QueryLogger.php
Expand Up @@ -55,6 +55,7 @@ protected function _log($query) {
* Helper function used to replace query placeholders by the real
* params used to execute the query
*
* @param LoggedQuery $query
* @return string
*/
protected function _interpolate($query) {
Expand Down
4 changes: 4 additions & 0 deletions src/Database/Statement/BufferedStatement.php
Expand Up @@ -29,6 +29,7 @@ class BufferedStatement extends StatementDecorator {
/**
* Constructor
*
* @param Cake\Database\Driver instance $driver
* @param Statement implementation such as PDOStatement
* @return void
*/
Expand All @@ -37,6 +38,9 @@ public function __construct($statement = null, $driver = null) {
$this->_reset();
}

/**
* @param array $params list of values to be bound to query
*/
public function execute($params = null) {
$this->_reset();
return parent::execute($params);
Expand Down
1 change: 1 addition & 0 deletions src/Database/Statement/PDOStatement.php
Expand Up @@ -29,6 +29,7 @@ class PDOStatement extends StatementDecorator {
* Constructor
*
* @param \PDOStatement original statement to be decorated
* @param Cake\Database\Driver instance $driver
* @return void
*/
public function __construct(Statement $statement = null, $driver = null) {
Expand Down
3 changes: 2 additions & 1 deletion src/Database/Statement/StatementDecorator.php
Expand Up @@ -51,6 +51,7 @@ class StatementDecorator implements StatementInterface, \Countable, \IteratorAgg
* Constructor
*
* @param Statement implementation such as PDOStatement
* @param Cake\Database\Driver instance $driver
* @return void
*/
public function __construct($statement = null, $driver = null) {
Expand Down Expand Up @@ -147,7 +148,7 @@ public function errorInfo() {
* that binding parameters from this method will not perform any custom type conversion
* as it would normally happen when calling `bindValue`
*
* $param array $params list of values to be bound to query
* @param array $params list of values to be bound to query
* @return boolean true on success, false otherwise
*/
public function execute($params = null) {
Expand Down

0 comments on commit 5f3781c

Please sign in to comment.