Skip to content

Commit eb88917

Browse files
committed
docs: fix incorrect @return type
1 parent c36c1c5 commit eb88917

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

system/Database/BaseResult.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,15 @@ public function getRow($n = 0, string $type = 'object')
292292
/**
293293
* Returns a row as a custom class instance.
294294
*
295-
* If row doesn't exists, returns null.
295+
* If the row doesn't exist, returns null.
296296
*
297-
* @return array|null
297+
* @template T of object
298+
*
299+
* @param int $n The row number of the results
300+
* @phpstan-param class-string<T> $className
301+
*
302+
* @return object|null
303+
* @phpstan-return T|null
298304
*/
299305
public function getCustomRowObject(int $n, string $className)
300306
{

system/Database/ResultInterface.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,15 @@ public function getRow($n = 0, string $type = 'object');
6969
/**
7070
* Returns a row as a custom class instance.
7171
*
72-
* If row doesn't exists, returns null.
72+
* If the row doesn't exist, returns null.
7373
*
74-
* @return array|null
74+
* @template T of object
75+
*
76+
* @param int $n The row number of the results
77+
* @phpstan-param class-string<T> $className
78+
*
79+
* @return object|null
80+
* @phpstan-return T|null
7581
*/
7682
public function getCustomRowObject(int $n, string $className);
7783

0 commit comments

Comments
 (0)