Browse Source

Fix a bunch more API doc errors.

mark_story 11 years ago
parent
commit
e9aba0ffb6

+ 3 - 2
src/Database/Dialect/PostgresDialectTrait.php

@@ -62,7 +62,7 @@ trait PostgresDialectTrait {
  * Modifies the original insert query to append a "RETURNING *" epilogue
  * so that the latest insert id can be retrieved
  *
- * @param \Cake\Database\Query $query
+ * @param \Cake\Database\Query $query The query to translate.
  * @return \Cake\Database\Query
  */
 	protected function _insertQueryTranslator($query) {
@@ -89,7 +89,8 @@ trait PostgresDialectTrait {
  * Receives a FunctionExpression and changes it so that it conforms to this
  * SQL dialect.
  *
- * @param \Cake\Database\Expression\FunctionExpression
+ * @param \Cake\Database\Expression\FunctionExpression $expression The function expression to convert
+ *   to postgres SQL.
  * @return void
  */
 	protected function _transformFunctionExpression(FunctionExpression $expression) {

+ 2 - 1
src/Database/Dialect/SqliteDialectTrait.php

@@ -66,7 +66,8 @@ trait SqliteDialectTrait {
  * Receives a FunctionExpression and changes it so that it conforms to this
  * SQL dialect.
  *
- * @param \Cake\Database\Expression\FunctionExpression
+ * @param \Cake\Database\Expression\FunctionExpression $expression The function expression
+ *   to translate for SQLite.
  * @return void
  */
 	protected function _transformFunctionExpression(FunctionExpression $expression) {

+ 4 - 2
src/Database/Dialect/SqlserverDialectTrait.php

@@ -86,7 +86,7 @@ trait SqlserverDialectTrait {
  * Prior to SQLServer 2012 there was no equivalent to LIMIT OFFSET, so a subquery must
  * be used.
  *
- * @param \Cake\Database\Query $query The query to wrap in a subquery.
+ * @param \Cake\Database\Query $original The query to wrap in a subquery.
  * @param int $limit The number of rows to fetch.
  * @param int $offset The number of rows to offset.
  * @return \Cake\Database\Query Modified query object.
@@ -143,7 +143,7 @@ trait SqlserverDialectTrait {
  * Receives a FunctionExpression and changes it so that it conforms to this
  * SQL dialect.
  *
- * @param Cake\Database\Expression\FunctionExpression
+ * @param Cake\Database\Expression\FunctionExpression $expression The function expression to convert to TSQL.
  * @return void
  */
 	protected function _transformFunctionExpression(FunctionExpression $expression) {
@@ -213,6 +213,8 @@ trait SqlserverDialectTrait {
 
 /**
  * {@inheritDoc}
+ *
+ * @return \Cake\Database\SqlserverCompiler
  */
 	public function newCompiler() {
 		return new SqlserverCompiler();

+ 2 - 3
src/Database/Dialect/TupleComparisonTranslatorTrait.php

@@ -25,7 +25,6 @@ use Cake\Database\Query;
 trait TupleComparisonTranslatorTrait {
 
 /**
- *
  * Receives a TupleExpression and changes it so that it conforms to this
  * SQL dialect.
  *
@@ -40,8 +39,8 @@ trait TupleComparisonTranslatorTrait {
  *
  * 1 = (SELECT 1 FROM a_table WHERE (a = c) AND (b = d))
  *
- * @param \Cake\Database\Expression\TupleComparison $expression
- * @param \Cake\Database\Query $query
+ * @param \Cake\Database\Expression\TupleComparison $expression The expression to transform
+ * @param \Cake\Database\Query $query The query to update.
  * @return void
  */
 	protected function _transformTupleComparison(TupleComparison $expression, $query) {

+ 9 - 10
src/Database/IdentifierQuoter.php

@@ -21,7 +21,6 @@ use Cake\Database\Expression\OrderByExpression;
 
 /**
  * Contains all the logic related to quoting identifiers in a Query object
- *
  */
 class IdentifierQuoter {
 
@@ -35,7 +34,7 @@ class IdentifierQuoter {
 /**
  * Constructor
  *
- * @param \Cake\Database\Driver The driver instance used to do the identifier quoting
+ * @param \Cake\Database\Driver $driver The driver instance used to do the identifier quoting
  */
 	public function __construct(Driver $driver) {
 		$this->_driver = $driver;
@@ -45,8 +44,8 @@ class IdentifierQuoter {
  * Iterates over each of the clauses in a query looking for identifiers and
  * quotes them
  *
- * @param Query $query The query to have its identifiers quoted
- * @return Query
+ * @param \Cake\Database\Query $query The query to have its identifiers quoted
+ * @return \Cake\Database\Query
  */
 	public function quote(Query $query) {
 		$binder = $query->valueBinder();
@@ -66,7 +65,7 @@ class IdentifierQuoter {
 /**
  * Quotes identifiers inside expression objects
  *
- * @param \Cake\Database\ExpressionInterface $expression
+ * @param \Cake\Database\ExpressionInterface $expression The expression object to walk and quote.
  * @return void
  */
 	public function quoteExpression($expression) {
@@ -89,7 +88,7 @@ class IdentifierQuoter {
 /**
  * Quotes all identifiers in each of the clauses of a query
  *
- * @param Query
+ * @param \Cake\Database\Query $query The query to quote.
  * @return void
  */
 	protected function _quoteParts($query) {
@@ -133,7 +132,7 @@ class IdentifierQuoter {
  * Quotes both the table and alias for an array of joins as stored in a Query
  * object
  *
- * @param array $joins
+ * @param array $joins The joins to quote.
  * @return array
  */
 	protected function _quoteJoins($joins) {
@@ -158,7 +157,7 @@ class IdentifierQuoter {
 /**
  * Quotes the table name and columns for an insert query
  *
- * @param Query $query
+ * @param \Cake\Database\Query $query The insert query to quote.
  * @return void
  */
 	protected function _quoteInsert($query) {
@@ -175,7 +174,7 @@ class IdentifierQuoter {
 /**
  * Quotes identifiers in comparison expression objects
  *
- * @param \Cake\Database\Expression\Comparison $expression
+ * @param \Cake\Database\Expression\Comparison $expression The comparison expression to quote.
  * @return void
  */
 	protected function _quoteComparison(Comparison $expression) {
@@ -217,7 +216,7 @@ class IdentifierQuoter {
 /**
  * Quotes identifiers in "order by" expression objects
  *
- * @param \Cake\Database\Expression\IdentifierExpression $expression
+ * @param \Cake\Database\Expression\IdentifierExpression $expression The identifiers to quote.
  * @return void
  */
 	protected function _quoteIndetifierExpression(IdentifierExpression $expression) {

+ 1 - 1
src/Database/Log/QueryLogger.php

@@ -53,7 +53,7 @@ class QueryLogger {
  * Helper function used to replace query placeholders by the real
  * params used to execute the query
  *
- * @param LoggedQuery $query
+ * @param LoggedQuery $query The query to log
  * @return string
  */
 	protected function _interpolate($query) {

+ 11 - 0
src/Database/Statement/BufferedStatement.php

@@ -24,6 +24,7 @@ class BufferedStatement extends StatementDecorator {
 
 /**
  * Records count
+ *
  * @var int
  */
 	protected $_count = 0;
@@ -72,6 +73,9 @@ class BufferedStatement extends StatementDecorator {
 
 /**
  * {@inheritDoc}
+ *
+ * @param string $type The type to fetch.
+ * @return mixed
  */
 	public function fetch($type = 'num') {
 		if ($this->_allFetched) {
@@ -96,6 +100,9 @@ class BufferedStatement extends StatementDecorator {
 
 /**
  * {@inheritDoc}
+ *
+ * @param string $type The type to fetch.
+ * @return mixed
  */
 	public function fetchAll($type = 'num') {
 		if ($this->_allFetched) {
@@ -124,6 +131,8 @@ class BufferedStatement extends StatementDecorator {
 
 /**
  * Rewind the _counter property
+ *
+ * @return void
  */
 	public function rewind() {
 		$this->_counter = 0;
@@ -131,6 +140,8 @@ class BufferedStatement extends StatementDecorator {
 
 /**
  * Reset all properties
+ *
+ * @return void
  */
 	protected function _reset() {
 		$this->_count = $this->_counter = 0;

+ 8 - 6
src/Database/Statement/PDOStatement.php

@@ -26,8 +26,8 @@ class PDOStatement extends StatementDecorator {
 /**
  * Constructor
  *
- * @param \PDOStatement original statement to be decorated
- * @param \Cake\Database\Driver instance $driver
+ * @param \PDOStatement $statement Original statement to be decorated.
+ * @param \Cake\Database\Driver $driver Driver instance.
  */
 	public function __construct(Statement $statement = null, $driver = null) {
 		$this->_statement = $statement;
@@ -47,10 +47,12 @@ class PDOStatement extends StatementDecorator {
  *
  * ## Examples:
  *
- *	`$statement->bindValue(1, 'a title');`
- *	`$statement->bindValue(2, 5, PDO::INT);`
- *	`$statement->bindValue('active', true, 'boolean');`
- *	`$statement->bindValue(5, new \DateTime(), 'date');`
+ * {{{
+ * $statement->bindValue(1, 'a title');
+ * $statement->bindValue(2, 5, PDO::INT);
+ * $statement->bindValue('active', true, 'boolean');
+ * $statement->bindValue(5, new \DateTime(), 'date');
+ * }}}
  *
  * @param string|int $column name or param position to be bound
  * @param mixed $value The value to bind to variable in query

+ 2 - 2
src/Database/Statement/SqlserverStatement.php

@@ -24,10 +24,10 @@ use PDO;
 class SqlserverStatement extends PDOStatement {
 
 /**
- * {@inheritDoc}
- *
  * The SQL Server PDO driver requires that binary parameters be bound with the SQLSRV_ENCODING_BINARY attribute.
  * This overrides the PDOStatement::bindValue method in order to bind binary columns using the required attribute.
+ *
+ * {@inheritDoc}
  */
 	public function bindValue($column, $value, $type = 'string') {
 		if ($type === null) {

+ 1 - 1
src/Database/Type.php

@@ -107,7 +107,7 @@ class Type {
  * If $className is omitted it will return mapped class for $type
  *
  * @param string|array $type if string name of type to map, if array list of arrays to be mapped
- * @param string $className
+ * @param string $className The classname to register.
  * @return array|string|null if $type is null then array with current map, if $className is null string
  * configured class name for give $type, null otherwise
  */