diff --git a/src/Action/SelectEntries.php b/src/Action/SelectEntries.php index 6eed023..bcfeac3 100644 --- a/src/Action/SelectEntries.php +++ b/src/Action/SelectEntries.php @@ -102,7 +102,9 @@ public function blocking(bool $active = true): self /** * Execute SELECT query and return a list of objects that matched it * - * @return object[] + * Returns object[] (from the entity class), we avoid the return type hint + * here to code analyzers don't get confused by generated repositories + * and their different type hint */ public function getAllEntries(): array { @@ -119,7 +121,9 @@ public function getAllEntries(): array /** * Execute SELECT query and return exactly one entry, if one was found at all * - * @return object|null + * Returns object (from the entity class) or null if no entry was found, we avoid + * the return type hint here to code analyzers don't get confused by + * generated repositories and their different type hint */ public function getOneEntry() { diff --git a/src/Action/SelectIteratorTrait.php b/src/Action/SelectIteratorTrait.php index eded518..696d811 100644 --- a/src/Action/SelectIteratorTrait.php +++ b/src/Action/SelectIteratorTrait.php @@ -33,7 +33,11 @@ trait SelectIteratorTrait private $lastResult; /** - * @return object|array|null + * SelectEntries: Returns the entity object or null + * MultiSelectEntries: Return an array with a result entry or null + * + * We avoid the return type hint here so code analyzers don't get + * confused by generated repositories and their different type hint */ public function current() {