Skip to content

Commit f93e31b

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.5
2 parents 9dab5f1 + e346a6f commit f93e31b

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

system/Database/BaseResult.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,16 @@ public function getResultObject(): array
254254
*
255255
* If row doesn't exist, returns null.
256256
*
257-
* @param int $n The index of the results to return
258-
* @param string $type The type of result object. 'array', 'object' or class name.
257+
* @param int|string $n The index of the results to return, or column name.
258+
* @param string $type The type of result object. 'array', 'object' or class name.
259+
* @phpstan-param class-string|'array'|'object' $type
259260
*
260261
* @return array|object|stdClass|null
261262
* @phpstan-return ($type is 'object' ? stdClass|null : ($type is 'array' ? array|null : object|null))
262263
*/
263264
public function getRow($n = 0, string $type = 'object')
264265
{
266+
// $n is a column name.
265267
if (! is_numeric($n)) {
266268
// We cache the row data for subsequent uses
267269
if (! is_array($this->rowData)) {

system/Database/ResultInterface.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ public function getResultObject(): array;
5757
*
5858
* If row doesn't exist, returns null.
5959
*
60-
* @param int $n The index of the results to return
61-
* @param string $type The type of result object. 'array', 'object' or class name.
60+
* @param int|string $n The index of the results to return, or column name.
61+
* @param string $type The type of result object. 'array', 'object' or class name.
62+
* @phpstan-param class-string|'array'|'object' $type
6263
*
6364
* @return array|object|stdClass|null
6465
* @phpstan-return ($type is 'object' ? stdClass|null : ($type is 'array' ? array|null : object|null))

system/Email/Email.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ public function setHeader($header, $value)
731731
}
732732

733733
/**
734-
* @param string $email
734+
* @param array|string $email
735735
*
736736
* @return array
737737
*/

system/HTTP/Files/FileCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getFile(string $name)
7777
/**
7878
* Verify if a file exist in the collection of uploaded files and is have been uploaded with multiple option.
7979
*
80-
* @return array|null
80+
* @return list<UploadedFile>|null
8181
*/
8282
public function getFileMultiple(string $name)
8383
{
@@ -245,7 +245,7 @@ protected function fixFilesArray(array $data): array
245245
* @param array $index The index sequence we are navigating down
246246
* @param array $value The portion of the array to process
247247
*
248-
* @return UploadedFile|null
248+
* @return list<UploadedFile>|UploadedFile|null
249249
*/
250250
protected function getValueDotNotationSyntax(array $index, array $value)
251251
{

0 commit comments

Comments
 (0)