Skip to content
Snippets Groups Projects
Commit e343ab9e authored by Elmar Ludwig's avatar Elmar Ludwig Committed by Jan-Hendrik Willms
Browse files

fix type hints, closes #2162

Closes #2162

Merge request studip/studip!1396
parent 69f9e311
No related branches found
No related tags found
1 merge request!4Draft: Icon creation
...@@ -95,7 +95,7 @@ class UserProgressesOfUnitsShow extends NonJsonApiController ...@@ -95,7 +95,7 @@ class UserProgressesOfUnitsShow extends NonJsonApiController
} }
private function getSelfProgresses( private function getSelfProgresses(
iterable &$allBlockIds, array &$allBlockIds,
string $elementId, string $elementId,
array &$userProgresses, array &$userProgresses,
array &$courseMemberIds array &$courseMemberIds
......
...@@ -412,7 +412,7 @@ class Instance ...@@ -412,7 +412,7 @@ class Instance
return StructuralElement::findUsersBookmarksByRange($user, $this->getRange()); return StructuralElement::findUsersBookmarksByRange($user, $this->getRange());
} }
public function findAllStructuralElements(): iterable public function findAllStructuralElements(): array
{ {
$sql = 'SELECT se.* $sql = 'SELECT se.*
FROM cw_structural_elements se FROM cw_structural_elements se
...@@ -428,7 +428,7 @@ class Instance ...@@ -428,7 +428,7 @@ class Instance
return $data; return $data;
} }
public function findAllBlocks(): iterable public function findAllBlocks(): array
{ {
$sql = 'SELECT b.* $sql = 'SELECT b.*
FROM cw_structural_elements se FROM cw_structural_elements se
...@@ -452,10 +452,10 @@ class Instance ...@@ -452,10 +452,10 @@ class Instance
* *
* @param ?callable(array $row): mixed $formatter Provide your own callable if you need something else instead of * @param ?callable(array $row): mixed $formatter Provide your own callable if you need something else instead of
* full-blown instances of \Courseware\Block. * 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. * that block.
*/ */
public function findAllBlocksGroupedByStructuralElementId(callable $formatter = null): iterable public function findAllBlocksGroupedByStructuralElementId(callable $formatter = null): array
{ {
if (!$formatter) { if (!$formatter) {
$formatter = function ($row) { $formatter = function ($row) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment