Add int return type queryScalar and scalar method docs

This commit is contained in:
flight643
2020-12-07 18:48:24 +03:00
committed by GitHub
parent f450760449
commit 7c5fcf32b4
2 changed files with 2 additions and 2 deletions

View File

@ -424,7 +424,7 @@ class Command extends Component
/**
* Executes the SQL statement and returns the value of the first column in the first row of data.
* This method is best used when only a single value is needed for a query.
* @return string|null|false the value of the first column in the first row of the query result.
* @return string|int|null|false the value of the first column in the first row of the query result.
* False is returned if there is no value.
* @throws Exception execution failed
*/

View File

@ -290,7 +290,7 @@ class Query extends Component implements QueryInterface, ExpressionInterface
* The value returned will be the first column in the first row of the query results.
* @param Connection $db the database connection used to generate the SQL statement.
* If this parameter is not given, the `db` application component will be used.
* @return string|null|false the value of the first column in the first row of the query result.
* @return string|int|null|false the value of the first column in the first row of the query result.
* False is returned if the query result is empty.
*/
public function scalar($db = null)