aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-02-14 12:43:31 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-02-14 12:43:31 +0100
commite62790cfe2408e6fb018e9848315bb400bcb8846 (patch)
tree4530a5918860fff0582ee730192a113910d00cbf /apps
parentd93a3665a06d40bdeeb70b9de9a990a93597fae5 (diff)
downloadnextcloud-server-e62790cfe2408e6fb018e9848315bb400bcb8846.tar.gz
nextcloud-server-e62790cfe2408e6fb018e9848315bb400bcb8846.zip
Add some closure return types
Found by psalm Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/accessibility/lib/Controller/ConfigController.php2
-rw-r--r--apps/dav/lib/AppInfo/Application.php8
-rw-r--r--apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php2
-rw-r--r--apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php2
4 files changed, 7 insertions, 7 deletions
diff --git a/apps/accessibility/lib/Controller/ConfigController.php b/apps/accessibility/lib/Controller/ConfigController.php
index 5f2f77ed3e1..b918b33f31b 100644
--- a/apps/accessibility/lib/Controller/ConfigController.php
+++ b/apps/accessibility/lib/Controller/ConfigController.php
@@ -117,7 +117,7 @@ class ConfigController extends OCSController {
$highcontrast = [$this->accessibilityProvider->getHighContrast()];
$fonts = $this->accessibilityProvider->getFonts();
- $availableOptions = array_map(function ($option) {
+ $availableOptions = array_map(function ($option): string {
return $option['id'];
}, array_merge($themes, $highcontrast, $fonts));
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php
index f1bf77c3285..9bc95124c22 100644
--- a/apps/dav/lib/AppInfo/Application.php
+++ b/apps/dav/lib/AppInfo/Application.php
@@ -143,7 +143,7 @@ class Application extends App implements IBootstrap {
}
});
- $birthdayListener = function ($event) use ($container) {
+ $birthdayListener = function ($event) use ($container): void {
if ($event instanceof GenericEvent) {
/** @var BirthdayService $b */
$b = $container->query(BirthdayService::class);
@@ -168,7 +168,7 @@ class Application extends App implements IBootstrap {
}
});
- $clearPhotoCache = function ($event) use ($container) {
+ $clearPhotoCache = function ($event) use ($container): void {
if ($event instanceof GenericEvent) {
/** @var PhotoCache $p */
$p = $container->query(PhotoCache::class);
@@ -240,7 +240,7 @@ class Application extends App implements IBootstrap {
);
});
- $listener = function (GenericEvent $event, $eventName) use ($container) {
+ $listener = function (GenericEvent $event, $eventName) use ($container): void {
/** @var Backend $backend */
$backend = $container->query(Backend::class);
@@ -336,7 +336,7 @@ class Application extends App implements IBootstrap {
}
);
- $eventHandler = function () use ($container, $serverContainer) {
+ $eventHandler = function () use ($container, $serverContainer): void {
try {
/** @var UpdateCalendarResourcesRoomsBackgroundJob $job */
$job = $container->query(UpdateCalendarResourcesRoomsBackgroundJob::class);
diff --git a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
index e394890e0eb..4ed4319d701 100644
--- a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
+++ b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
@@ -399,7 +399,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
->where($query->expr()->eq('backend_id', $query->createNamedParameter($backendId)));
$stmt = $query->execute();
- return array_map(function ($row) {
+ return array_map(function ($row): string {
return $row['resource_id'];
}, $stmt->fetchAll());
}
diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
index 481c576081e..bfe4e938a5d 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
@@ -309,7 +309,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
return $this->isAllowedToAccessResource($row, $usersGroups);
});
- $results[] = array_map(function ($row) {
+ $results[] = array_map(function ($row): string {
return $row['uri'];
}, $filteredRows);