aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2023-02-14 13:06:27 +0000
committerJan-Hendrik Willms <tleilax+github@gmail.com>2023-02-16 08:48:34 +0100
commit10d11ab81527665c849db565c29b8b8db0ad2d9e (patch)
tree4d6c4acb03c216132090dc5b05f10f244dfb7888 /lib
parent25386853c1677342084505485ba6fae34de57c3c (diff)
fix type hints, closes #2162
Closes #2162 Merge request studip/studip!1396
Diffstat (limited to 'lib')
-rw-r--r--lib/models/Courseware/Instance.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/models/Courseware/Instance.php b/lib/models/Courseware/Instance.php
index c823a4e..2816182 100644
--- a/lib/models/Courseware/Instance.php
+++ b/lib/models/Courseware/Instance.php
@@ -243,7 +243,7 @@ class Instance
return StructuralElement::findUsersBookmarksByRange($user, $this->getRange());
}
- public function findAllStructuralElements(): iterable
+ public function findAllStructuralElements(): array
{
$sql = 'SELECT se.*
FROM cw_structural_elements se
@@ -259,7 +259,7 @@ class Instance
return $data;
}
- public function findAllBlocks(): iterable
+ public function findAllBlocks(): array
{
$sql = 'SELECT b.*
FROM cw_structural_elements se
@@ -283,10 +283,10 @@ class Instance
*
* @param ?callable(array $row): mixed $formatter Provide your own callable if you need something else instead of
* full-blown instances of \Courseware\Block.
- * @return iterable all the (optionally formatted) blocks grouped by the IDs of the structural element containing
+ * @return array all the (optionally formatted) blocks grouped by the IDs of the structural element containing
* that block.
*/
- public function findAllBlocksGroupedByStructuralElementId(callable $formatter = null): iterable
+ public function findAllBlocksGroupedByStructuralElementId(callable $formatter = null): array
{
if (!$formatter) {
$formatter = function ($row) {