diff --git a/src/Datasource/QueryTrait.php b/src/Datasource/QueryTrait.php index bcd17328873..aa99ec810f0 100644 --- a/src/Datasource/QueryTrait.php +++ b/src/Datasource/QueryTrait.php @@ -393,7 +393,7 @@ public function formatResults(callable $formatter = null, $mode = 0) * $singleUser = $query->select(['id', 'username'])->first(); * ``` * - * @return \Cake\Datasource\EntityInterface|null The first result from the ResultSet. + * @return \Cake\Datasource\EntityInterface|array|null The first result from the ResultSet. */ public function first() { @@ -408,7 +408,7 @@ public function first() * Get the first result from the executing query or raise an exception. * * @throws \Cake\Datasource\Exception\RecordNotFoundException When there is no first record. - * @return \Cake\Datasource\EntityInterface The first result from the ResultSet. + * @return \Cake\Datasource\EntityInterface|array The first result from the ResultSet. */ public function firstOrFail() {