From b66f35a091f89da2532c58df211f0b57a11836ed Mon Sep 17 00:00:00 2001 From: Oliver Bartsch <bo@cedev.de> Date: Sat, 22 Feb 2020 13:36:15 +0100 Subject: [PATCH] [BUGFIX] Fix some typos and improve PHPDoc comments Fixes several typos and improves readability of PHPDoc comments through ext:dashboard classes. Resolves: #90486 Releases: master Change-Id: I27cd1c0c2dd3c3b18bade0b50af41aa8d8bfd06e Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63368 Tested-by: Richard Haeser <richard@maxserv.com> Tested-by: Susanne Moog <look@susi.dev> Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Daniel Goerz <daniel.goerz@posteo.de> Reviewed-by: Richard Haeser <richard@maxserv.com> Reviewed-by: Susanne Moog <look@susi.dev> Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de> --- .../dashboard/Classes/Controller/DashboardController.php | 2 +- typo3/sysext/dashboard/Classes/Dashboard.php | 2 +- .../Classes/DependencyInjection/DashboardWidgetPass.php | 2 +- .../Classes/Exception/NoDashboardAvailableException.php | 2 +- .../dashboard/Classes/Widgets/AbstractCtaButtonWidget.php | 2 +- typo3/sysext/dashboard/Classes/Widgets/AbstractListWidget.php | 2 +- typo3/sysext/dashboard/Classes/Widgets/AbstractRssWidget.php | 2 +- typo3/sysext/dashboard/Classes/Widgets/AbstractWidget.php | 4 ++-- .../Classes/Widgets/DocumentationGettingStartedWidget.php | 2 +- .../Classes/Widgets/DocumentationTSconfigReferenceWidget.php | 2 +- .../Classes/Widgets/DocumentationTypoScriptReference.php | 2 +- .../Widgets/Interfaces/AdditionalJavaScriptInterface.php | 2 +- .../dashboard/Classes/Widgets/Interfaces/WidgetInterface.php | 2 +- .../sysext/dashboard/Classes/Widgets/T3GeneralInformation.php | 3 +++ typo3/sysext/dashboard/Classes/Widgets/T3NewsWidget.php | 4 ++-- typo3/sysext/dashboard/Configuration/Backend/AjaxRoutes.php | 2 +- 16 files changed, 20 insertions(+), 17 deletions(-) diff --git a/typo3/sysext/dashboard/Classes/Controller/DashboardController.php b/typo3/sysext/dashboard/Classes/Controller/DashboardController.php index b7bbc131e5f7..0ab83cad876b 100644 --- a/typo3/sysext/dashboard/Classes/Controller/DashboardController.php +++ b/typo3/sysext/dashboard/Classes/Controller/DashboardController.php @@ -431,7 +431,7 @@ class DashboardController extends AbstractController } /** - * Add the RequireJS modules some widgets need + * Add the RequireJS modules needed by some widgets * * @param RequireJsModuleInterface $widgetInstance */ diff --git a/typo3/sysext/dashboard/Classes/Dashboard.php b/typo3/sysext/dashboard/Classes/Dashboard.php index be57b5f8e622..e9ea58199151 100644 --- a/typo3/sysext/dashboard/Classes/Dashboard.php +++ b/typo3/sysext/dashboard/Classes/Dashboard.php @@ -99,7 +99,7 @@ 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 + * widgets and will add the initialized object of the widget itself */ public function initializeWidgets(): void { diff --git a/typo3/sysext/dashboard/Classes/DependencyInjection/DashboardWidgetPass.php b/typo3/sysext/dashboard/Classes/DependencyInjection/DashboardWidgetPass.php index 4a3a63cd8d38..47f0b475d7db 100644 --- a/typo3/sysext/dashboard/Classes/DependencyInjection/DashboardWidgetPass.php +++ b/typo3/sysext/dashboard/Classes/DependencyInjection/DashboardWidgetPass.php @@ -51,7 +51,7 @@ final class DashboardWidgetPass implements CompilerPassInterface foreach ($container->findTaggedServiceIds($this->tagName) as $serviceName => $tags) { $definition = $container->findDefinition($serviceName); $definition->setPublic(true); - // Widgets are handles like prototypes right now (will require state) + // Widgets are handled like prototypes right now (will require state) // @todo: Widgets should preferably be services, but that will require WidgetInterface // to change $definition->setShared(false); diff --git a/typo3/sysext/dashboard/Classes/Exception/NoDashboardAvailableException.php b/typo3/sysext/dashboard/Classes/Exception/NoDashboardAvailableException.php index 4ea3312fdc51..267769c35ab8 100644 --- a/typo3/sysext/dashboard/Classes/Exception/NoDashboardAvailableException.php +++ b/typo3/sysext/dashboard/Classes/Exception/NoDashboardAvailableException.php @@ -19,7 +19,7 @@ namespace TYPO3\CMS\Dashboard\Exception; use TYPO3\CMS\Core\Exception; /** - * Exception thrown if no dashboard is available for the current user + * Exception is thrown if no dashboard is available for the current user */ class NoDashboardAvailableException extends Exception { diff --git a/typo3/sysext/dashboard/Classes/Widgets/AbstractCtaButtonWidget.php b/typo3/sysext/dashboard/Classes/Widgets/AbstractCtaButtonWidget.php index 1766e27b7bad..e622e3ba7746 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/AbstractCtaButtonWidget.php +++ b/typo3/sysext/dashboard/Classes/Widgets/AbstractCtaButtonWidget.php @@ -17,7 +17,7 @@ namespace TYPO3\CMS\Dashboard\Widgets; /** * The AbstractCtaButtonWidget class is the basic widget class for simple CTA widgets. - * Is it possible to extends this class for own widgets. + * It is possible to extend this class for custom widgets. * Simply overwrite $this->link and $this->label to make use of this widget type. */ abstract class AbstractCtaButtonWidget extends AbstractWidget diff --git a/typo3/sysext/dashboard/Classes/Widgets/AbstractListWidget.php b/typo3/sysext/dashboard/Classes/Widgets/AbstractListWidget.php index 0cdb6319c356..bbe9c66242f9 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/AbstractListWidget.php +++ b/typo3/sysext/dashboard/Classes/Widgets/AbstractListWidget.php @@ -17,7 +17,7 @@ namespace TYPO3\CMS\Dashboard\Widgets; /** * The AbstractListWidget class is the basic widget class for structured content. - * Is it possible to extends this class for own widgets. + * It is possible to extend this class for custom widgets. * In your class you have to set $this->items with the data to display. */ abstract class AbstractListWidget extends AbstractWidget diff --git a/typo3/sysext/dashboard/Classes/Widgets/AbstractRssWidget.php b/typo3/sysext/dashboard/Classes/Widgets/AbstractRssWidget.php index c3bada116876..f0430c9e52d2 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/AbstractRssWidget.php +++ b/typo3/sysext/dashboard/Classes/Widgets/AbstractRssWidget.php @@ -23,7 +23,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; /** * The AbstractRssWidget class is the basic widget class to display items from a RSS feed. - * Is it possible to extends this class for own widgets. + * It is possible to extend this class for custom widgets. * In your class you have to set $this->rssFile with the URL to the feed. */ abstract class AbstractRssWidget extends AbstractListWidget diff --git a/typo3/sysext/dashboard/Classes/Widgets/AbstractWidget.php b/typo3/sysext/dashboard/Classes/Widgets/AbstractWidget.php index d97e98ad50d8..f19a2d88971c 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/AbstractWidget.php +++ b/typo3/sysext/dashboard/Classes/Widgets/AbstractWidget.php @@ -22,8 +22,8 @@ use TYPO3\CMS\Fluid\View\StandaloneView; use TYPO3Fluid\Fluid\View\ViewInterface; /** - * The AbstractWidget class is the basic widget class for all widgets - * It is possible to extends this class for own widgets, but EXT:dashboard provides + * The AbstractWidget class is the basic widget class for all widgets. + * It is possible to extend this class for custom widgets, but EXT:dashboard provides * some more specific types of widgets to extend from. For more details, please check: * @see AbstractCtaButtonWidget * @see AbstractListWidget diff --git a/typo3/sysext/dashboard/Classes/Widgets/DocumentationGettingStartedWidget.php b/typo3/sysext/dashboard/Classes/Widgets/DocumentationGettingStartedWidget.php index f3f438b889c2..f90d794c87bb 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/DocumentationGettingStartedWidget.php +++ b/typo3/sysext/dashboard/Classes/Widgets/DocumentationGettingStartedWidget.php @@ -17,7 +17,7 @@ namespace TYPO3\CMS\Dashboard\Widgets; /** * This widget will show a link to the documentation of TYPO3 to make it easier for people - * to find the right documentation + * to find the right documentation. */ class DocumentationGettingStartedWidget extends AbstractCtaButtonWidget { diff --git a/typo3/sysext/dashboard/Classes/Widgets/DocumentationTSconfigReferenceWidget.php b/typo3/sysext/dashboard/Classes/Widgets/DocumentationTSconfigReferenceWidget.php index 5b1018d477e4..89bba82a1262 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/DocumentationTSconfigReferenceWidget.php +++ b/typo3/sysext/dashboard/Classes/Widgets/DocumentationTSconfigReferenceWidget.php @@ -17,7 +17,7 @@ namespace TYPO3\CMS\Dashboard\Widgets; /** * This widget will show a link to the documentation of TYPO3 to make it easier for people - * to find the right documentation + * to find the right documentation. */ class DocumentationTSconfigReferenceWidget extends AbstractCtaButtonWidget { diff --git a/typo3/sysext/dashboard/Classes/Widgets/DocumentationTypoScriptReference.php b/typo3/sysext/dashboard/Classes/Widgets/DocumentationTypoScriptReference.php index 9e272d3c430e..c3c20343945f 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/DocumentationTypoScriptReference.php +++ b/typo3/sysext/dashboard/Classes/Widgets/DocumentationTypoScriptReference.php @@ -17,7 +17,7 @@ namespace TYPO3\CMS\Dashboard\Widgets; /** * This widget will show a link to the documentation of TYPO3 to make it easier for people - * to find the right documentation + * to find the right documentation. */ class DocumentationTypoScriptReference extends AbstractCtaButtonWidget { diff --git a/typo3/sysext/dashboard/Classes/Widgets/Interfaces/AdditionalJavaScriptInterface.php b/typo3/sysext/dashboard/Classes/Widgets/Interfaces/AdditionalJavaScriptInterface.php index a7ba56997da4..194b6ee80195 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/Interfaces/AdditionalJavaScriptInterface.php +++ b/typo3/sysext/dashboard/Classes/Widgets/Interfaces/AdditionalJavaScriptInterface.php @@ -5,7 +5,7 @@ namespace TYPO3\CMS\Dashboard\Widgets\Interfaces; /** * Interface AdditionalJavaScriptInterface - * In case a widget should provide additional JavaScript files, the widget must be implemented. + * In case a widget should provide additional JavaScript files, the widget must implement this interface. */ interface AdditionalJavaScriptInterface { diff --git a/typo3/sysext/dashboard/Classes/Widgets/Interfaces/WidgetInterface.php b/typo3/sysext/dashboard/Classes/Widgets/Interfaces/WidgetInterface.php index 1c0aa89d3fc6..7c4baa7e9dd9 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/Interfaces/WidgetInterface.php +++ b/typo3/sysext/dashboard/Classes/Widgets/Interfaces/WidgetInterface.php @@ -42,7 +42,7 @@ interface WidgetInterface public function getWidth(): int; /** - * This method return the content of a widget. The returned markup will be delivered + * This method returns the content of a widget. The returned markup will be delivered * by an AJAX call and will not be escaped. * Be aware of XSS and ensure that the content is well encoded. * @return string diff --git a/typo3/sysext/dashboard/Classes/Widgets/T3GeneralInformation.php b/typo3/sysext/dashboard/Classes/Widgets/T3GeneralInformation.php index 3b6736750387..7de1798a3820 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/T3GeneralInformation.php +++ b/typo3/sysext/dashboard/Classes/Widgets/T3GeneralInformation.php @@ -18,6 +18,9 @@ namespace TYPO3\CMS\Dashboard\Widgets; use TYPO3\CMS\Core\Information\Typo3Information; use TYPO3\CMS\Core\Information\Typo3Version; +/** + * This widget will show general information regarding TYPO3 + */ class T3GeneralInformation extends AbstractWidget { protected $title = 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.t3information.title'; diff --git a/typo3/sysext/dashboard/Classes/Widgets/T3NewsWidget.php b/typo3/sysext/dashboard/Classes/Widgets/T3NewsWidget.php index 34afb0cee8e8..20fc71dc4a1a 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/T3NewsWidget.php +++ b/typo3/sysext/dashboard/Classes/Widgets/T3NewsWidget.php @@ -16,8 +16,8 @@ namespace TYPO3\CMS\Dashboard\Widgets; */ /** - * This class will make it possible for users to show the latest news from the TYPO3 news RSS feed right on the - * dashboard. + * This widget will show the latest news from the TYPO3 news RSS feed right + * on the dashboard. */ class T3NewsWidget extends AbstractRssWidget { diff --git a/typo3/sysext/dashboard/Configuration/Backend/AjaxRoutes.php b/typo3/sysext/dashboard/Configuration/Backend/AjaxRoutes.php index 2a6e1a110d76..c5c9221f59d7 100644 --- a/typo3/sysext/dashboard/Configuration/Backend/AjaxRoutes.php +++ b/typo3/sysext/dashboard/Configuration/Backend/AjaxRoutes.php @@ -1,6 +1,6 @@ <?php return [ - // Get the content of a widgets + // Get the content of a widget 'ext-dashboard-get-widget-content' => [ 'path' => '/ext/dashboard/widget/content', 'target' => TYPO3\CMS\Dashboard\Controller\WidgetAjaxController::class . '::getContent' -- GitLab