diff --git a/typo3/sysext/dashboard/Classes/Dashboard.php b/typo3/sysext/dashboard/Classes/Dashboard.php index 8199927931ec61f921808411e671c1bf480aafd4..be57b5f8e62228ba479dda4726fb4604b3b2188a 100644 --- a/typo3/sysext/dashboard/Classes/Dashboard.php +++ b/typo3/sysext/dashboard/Classes/Dashboard.php @@ -100,8 +100,6 @@ class Dashboard /** * This will return a list of all widgets of the current dashboard object. It will only include available * widgets and will add the initialised object of the widget itself - * - * @return array */ public function initializeWidgets(): void { diff --git a/typo3/sysext/dashboard/Classes/DashboardRepository.php b/typo3/sysext/dashboard/Classes/DashboardRepository.php index a217bc0c29d1881097f7ba9cb8a02fdc9029c5b3..72cf1d58417c8bac1dda2bf7788b78287bc435a9 100644 --- a/typo3/sysext/dashboard/Classes/DashboardRepository.php +++ b/typo3/sysext/dashboard/Classes/DashboardRepository.php @@ -20,6 +20,7 @@ use Psr\Container\ContainerInterface; use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Database\Query\QueryBuilder; use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Dashboard\Widgets\Interfaces\WidgetInterface; class DashboardRepository { @@ -78,7 +79,7 @@ class DashboardRepository return $results; } - public function create(DashboardPreset $dashboardPreset, int $userId, string $title = '') + public function create(DashboardPreset $dashboardPreset, int $userId, string $title = ''): ?Dashboard { $widgets = []; $title = $title ?: $dashboardPreset->getTitle(); @@ -139,7 +140,7 @@ class DashboardRepository { $allowedFields = []; foreach ($values as $field => $value) { - if (!empty($value) && in_array($field, $this->allowedFields)) { + if (!empty($value) && in_array((string)$field, $this->allowedFields, true)) { $allowedFields[$field] = $value; } } diff --git a/typo3/sysext/dashboard/Classes/DependencyInjection/DashboardWidgetPass.php b/typo3/sysext/dashboard/Classes/DependencyInjection/DashboardWidgetPass.php index 0ae86bec21900b87bd1b61360057145d90bdcc31..4a3a63cd8d383bfcb3f302a816056650ca6db217 100644 --- a/typo3/sysext/dashboard/Classes/DependencyInjection/DashboardWidgetPass.php +++ b/typo3/sysext/dashboard/Classes/DependencyInjection/DashboardWidgetPass.php @@ -41,7 +41,7 @@ final class DashboardWidgetPass implements CompilerPassInterface /** * @param ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { $widgetRegistryDefinition = $container->findDefinition(WidgetRegistry::class); if (!$widgetRegistryDefinition) { diff --git a/typo3/sysext/dashboard/Classes/WidgetRegistry.php b/typo3/sysext/dashboard/Classes/WidgetRegistry.php index fe817b5ce40f4861186f02cc34d8fcc842562211..f5cd73138292acd75db4197b87e45253e577d589 100644 --- a/typo3/sysext/dashboard/Classes/WidgetRegistry.php +++ b/typo3/sysext/dashboard/Classes/WidgetRegistry.php @@ -80,7 +80,7 @@ class WidgetRegistry implements SingletonInterface return $GLOBALS['BE_USER']; } - public function widgetItemsProcFunc(array $parameters) + public function widgetItemsProcFunc(array $parameters): void { foreach ($this->widgets as $identifier => $widget) { $widgetObject = $this->container->get($widget);