From f326ace90006bb00efeda0d67298da23caf543da Mon Sep 17 00:00:00 2001 From: Alexander Killing Date: Thu, 17 Mar 2022 09:48:39 +0100 Subject: [PATCH] fixed a number of type issues --- Modules/Portfolio/Page/class.ilPCConsultationHoursGUI.php | 2 +- Modules/Portfolio/Page/class.ilPCMyCoursesGUI.php | 2 +- Modules/Wiki/classes/class.ilPCAMDPageListGUI.php | 2 +- Services/COPage/classes/class.ilPCBlogGUI.php | 2 +- Services/COPage/classes/class.ilPCContentIncludeGUI.php | 2 +- Services/COPage/classes/class.ilPCContentTemplateGUI.php | 2 +- Services/COPage/classes/class.ilPCFileItemGUI.php | 2 +- Services/COPage/classes/class.ilPCFileListGUI.php | 2 +- Services/COPage/classes/class.ilPCGridCellGUI.php | 2 +- Services/COPage/classes/class.ilPCInteractiveImageGUI.php | 2 +- Services/COPage/classes/class.ilPCListGUI.php | 2 +- Services/COPage/classes/class.ilPCListItemGUI.php | 2 +- Services/COPage/classes/class.ilPCLoginPageElementGUI.php | 2 +- Services/COPage/classes/class.ilPCMapGUI.php | 2 +- Services/COPage/classes/class.ilPCMediaObjectGUI.php | 2 +- Services/COPage/classes/class.ilPCParagraphGUI.php | 2 +- Services/COPage/classes/class.ilPCPlaceHolderGUI.php | 2 +- Services/COPage/classes/class.ilPCPluggedGUI.php | 2 +- Services/COPage/classes/class.ilPCProfileGUI.php | 2 +- Services/COPage/classes/class.ilPCQuestionGUI.php | 2 +- Services/COPage/classes/class.ilPCQuestionOverviewGUI.php | 2 +- Services/COPage/classes/class.ilPCResourcesGUI.php | 2 +- Services/COPage/classes/class.ilPCSkillsGUI.php | 2 +- Services/COPage/classes/class.ilPCSourceCodeGUI.php | 2 +- Services/COPage/classes/class.ilPCTableDataGUI.php | 2 +- Services/COPage/classes/class.ilPCTableGUI.php | 2 +- Services/COPage/classes/class.ilPCTabsGUI.php | 2 +- Services/COPage/classes/class.ilPageEditorGUI.php | 4 ++-- Services/Container/Content/class.ilContainerContentGUI.php | 2 +- .../LearningHistory/classes/class.ilPCLearningHistoryGUI.php | 2 +- 30 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Modules/Portfolio/Page/class.ilPCConsultationHoursGUI.php b/Modules/Portfolio/Page/class.ilPCConsultationHoursGUI.php index 7f4f61623833..0b1b435d0a65 100644 --- a/Modules/Portfolio/Page/class.ilPCConsultationHoursGUI.php +++ b/Modules/Portfolio/Page/class.ilPCConsultationHoursGUI.php @@ -24,7 +24,7 @@ class ilPCConsultationHoursGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Modules/Portfolio/Page/class.ilPCMyCoursesGUI.php b/Modules/Portfolio/Page/class.ilPCMyCoursesGUI.php index 18ed12de1ad2..22119de9e839 100644 --- a/Modules/Portfolio/Page/class.ilPCMyCoursesGUI.php +++ b/Modules/Portfolio/Page/class.ilPCMyCoursesGUI.php @@ -21,7 +21,7 @@ class ilPCMyCoursesGUI extends ilPageContentGUI { public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Modules/Wiki/classes/class.ilPCAMDPageListGUI.php b/Modules/Wiki/classes/class.ilPCAMDPageListGUI.php index 9bd11eef53d6..25efe8468a4e 100644 --- a/Modules/Wiki/classes/class.ilPCAMDPageListGUI.php +++ b/Modules/Wiki/classes/class.ilPCAMDPageListGUI.php @@ -23,7 +23,7 @@ class ilPCAMDPageListGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCBlogGUI.php b/Services/COPage/classes/class.ilPCBlogGUI.php index 063d09512469..392953c4ef3a 100644 --- a/Services/COPage/classes/class.ilPCBlogGUI.php +++ b/Services/COPage/classes/class.ilPCBlogGUI.php @@ -27,7 +27,7 @@ class ilPCBlogGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCContentIncludeGUI.php b/Services/COPage/classes/class.ilPCContentIncludeGUI.php index 8db813f105d4..ce559eec1024 100644 --- a/Services/COPage/classes/class.ilPCContentIncludeGUI.php +++ b/Services/COPage/classes/class.ilPCContentIncludeGUI.php @@ -27,7 +27,7 @@ class ilPCContentIncludeGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCContentTemplateGUI.php b/Services/COPage/classes/class.ilPCContentTemplateGUI.php index 2ce589c396f6..3c019d04b2fb 100755 --- a/Services/COPage/classes/class.ilPCContentTemplateGUI.php +++ b/Services/COPage/classes/class.ilPCContentTemplateGUI.php @@ -25,7 +25,7 @@ class ilPCContentTemplateGUI extends ilPageContentGUI { public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCFileItemGUI.php b/Services/COPage/classes/class.ilPCFileItemGUI.php index 430103549912..b1a93e7cc04f 100755 --- a/Services/COPage/classes/class.ilPCFileItemGUI.php +++ b/Services/COPage/classes/class.ilPCFileItemGUI.php @@ -29,7 +29,7 @@ class ilPCFileItemGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCFileListGUI.php b/Services/COPage/classes/class.ilPCFileListGUI.php index edd681026e29..e59833377f94 100755 --- a/Services/COPage/classes/class.ilPCFileListGUI.php +++ b/Services/COPage/classes/class.ilPCFileListGUI.php @@ -30,7 +30,7 @@ class ilPCFileListGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCGridCellGUI.php b/Services/COPage/classes/class.ilPCGridCellGUI.php index 9556947193c9..77dc7a78e5a8 100755 --- a/Services/COPage/classes/class.ilPCGridCellGUI.php +++ b/Services/COPage/classes/class.ilPCGridCellGUI.php @@ -22,7 +22,7 @@ class ilPCGridCellGUI extends ilPageContentGUI { public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCInteractiveImageGUI.php b/Services/COPage/classes/class.ilPCInteractiveImageGUI.php index 2f899cfc4a2a..79e2dce7b136 100755 --- a/Services/COPage/classes/class.ilPCInteractiveImageGUI.php +++ b/Services/COPage/classes/class.ilPCInteractiveImageGUI.php @@ -26,7 +26,7 @@ class ilPCInteractiveImageGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCListGUI.php b/Services/COPage/classes/class.ilPCListGUI.php index aff48243d5d9..9dac237c26b9 100755 --- a/Services/COPage/classes/class.ilPCListGUI.php +++ b/Services/COPage/classes/class.ilPCListGUI.php @@ -26,7 +26,7 @@ class ilPCListGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCListItemGUI.php b/Services/COPage/classes/class.ilPCListItemGUI.php index 0774148f0759..a6c45cade076 100755 --- a/Services/COPage/classes/class.ilPCListItemGUI.php +++ b/Services/COPage/classes/class.ilPCListItemGUI.php @@ -22,7 +22,7 @@ class ilPCListItemGUI extends ilPageContentGUI { public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCLoginPageElementGUI.php b/Services/COPage/classes/class.ilPCLoginPageElementGUI.php index 48c43702f71a..57cd8afc03c3 100644 --- a/Services/COPage/classes/class.ilPCLoginPageElementGUI.php +++ b/Services/COPage/classes/class.ilPCLoginPageElementGUI.php @@ -25,7 +25,7 @@ class ilPCLoginPageElementGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCMapGUI.php b/Services/COPage/classes/class.ilPCMapGUI.php index 9ee705cddb96..da3907250cd4 100755 --- a/Services/COPage/classes/class.ilPCMapGUI.php +++ b/Services/COPage/classes/class.ilPCMapGUI.php @@ -24,7 +24,7 @@ class ilPCMapGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCMediaObjectGUI.php b/Services/COPage/classes/class.ilPCMediaObjectGUI.php index 22a8bd694b03..f66c70481f3a 100755 --- a/Services/COPage/classes/class.ilPCMediaObjectGUI.php +++ b/Services/COPage/classes/class.ilPCMediaObjectGUI.php @@ -36,7 +36,7 @@ class ilPCMediaObjectGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCParagraphGUI.php b/Services/COPage/classes/class.ilPCParagraphGUI.php index 2c488424b8b9..e6c67c9e890f 100755 --- a/Services/COPage/classes/class.ilPCParagraphGUI.php +++ b/Services/COPage/classes/class.ilPCParagraphGUI.php @@ -26,7 +26,7 @@ class ilPCParagraphGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCPlaceHolderGUI.php b/Services/COPage/classes/class.ilPCPlaceHolderGUI.php index 2ecbb3453212..a657f6aa28b5 100644 --- a/Services/COPage/classes/class.ilPCPlaceHolderGUI.php +++ b/Services/COPage/classes/class.ilPCPlaceHolderGUI.php @@ -29,7 +29,7 @@ class ilPCPlaceHolderGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCPluggedGUI.php b/Services/COPage/classes/class.ilPCPluggedGUI.php index ab04878d3d53..ee29fff35919 100755 --- a/Services/COPage/classes/class.ilPCPluggedGUI.php +++ b/Services/COPage/classes/class.ilPCPluggedGUI.php @@ -28,7 +28,7 @@ class ilPCPluggedGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_plugin_name = "", string $a_pc_id = "" diff --git a/Services/COPage/classes/class.ilPCProfileGUI.php b/Services/COPage/classes/class.ilPCProfileGUI.php index d2d77e914461..45fa74557ff4 100644 --- a/Services/COPage/classes/class.ilPCProfileGUI.php +++ b/Services/COPage/classes/class.ilPCProfileGUI.php @@ -24,7 +24,7 @@ class ilPCProfileGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCQuestionGUI.php b/Services/COPage/classes/class.ilPCQuestionGUI.php index 219ff76aa846..4360b8d68b73 100755 --- a/Services/COPage/classes/class.ilPCQuestionGUI.php +++ b/Services/COPage/classes/class.ilPCQuestionGUI.php @@ -31,7 +31,7 @@ class ilPCQuestionGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCQuestionOverviewGUI.php b/Services/COPage/classes/class.ilPCQuestionOverviewGUI.php index d44127947e37..5ddb3a03de5e 100755 --- a/Services/COPage/classes/class.ilPCQuestionOverviewGUI.php +++ b/Services/COPage/classes/class.ilPCQuestionOverviewGUI.php @@ -22,7 +22,7 @@ class ilPCQuestionOverviewGUI extends ilPageContentGUI { public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCResourcesGUI.php b/Services/COPage/classes/class.ilPCResourcesGUI.php index fa0240c543e8..4ce1f7fd2a6d 100755 --- a/Services/COPage/classes/class.ilPCResourcesGUI.php +++ b/Services/COPage/classes/class.ilPCResourcesGUI.php @@ -25,7 +25,7 @@ class ilPCResourcesGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCSkillsGUI.php b/Services/COPage/classes/class.ilPCSkillsGUI.php index e0871f75f762..5a2edb08edfb 100644 --- a/Services/COPage/classes/class.ilPCSkillsGUI.php +++ b/Services/COPage/classes/class.ilPCSkillsGUI.php @@ -24,7 +24,7 @@ class ilPCSkillsGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCSourceCodeGUI.php b/Services/COPage/classes/class.ilPCSourceCodeGUI.php index 523bac4bc82f..70687aa977ec 100755 --- a/Services/COPage/classes/class.ilPCSourceCodeGUI.php +++ b/Services/COPage/classes/class.ilPCSourceCodeGUI.php @@ -31,7 +31,7 @@ class ilPCSourceCodeGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCTableDataGUI.php b/Services/COPage/classes/class.ilPCTableDataGUI.php index 1884ceba77a4..45c564ac6dde 100755 --- a/Services/COPage/classes/class.ilPCTableDataGUI.php +++ b/Services/COPage/classes/class.ilPCTableDataGUI.php @@ -22,7 +22,7 @@ class ilPCTableDataGUI extends ilPageContentGUI { public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCTableGUI.php b/Services/COPage/classes/class.ilPCTableGUI.php index 6a18f8c7fce7..c0739386e52c 100755 --- a/Services/COPage/classes/class.ilPCTableGUI.php +++ b/Services/COPage/classes/class.ilPCTableGUI.php @@ -26,7 +26,7 @@ class ilPCTableGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPCTabsGUI.php b/Services/COPage/classes/class.ilPCTabsGUI.php index bffafc5c68d1..53a6f927be61 100755 --- a/Services/COPage/classes/class.ilPCTabsGUI.php +++ b/Services/COPage/classes/class.ilPCTabsGUI.php @@ -26,7 +26,7 @@ class ilPCTabsGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPageContent $a_content_obj, + ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id = "" ) { diff --git a/Services/COPage/classes/class.ilPageEditorGUI.php b/Services/COPage/classes/class.ilPageEditorGUI.php index c16d8da7fd23..3ad40ab43964 100755 --- a/Services/COPage/classes/class.ilPageEditorGUI.php +++ b/Services/COPage/classes/class.ilPageEditorGUI.php @@ -225,7 +225,7 @@ public function executeCommand() : string if ($com[0] == "insert" || $com[0] == "create") { // Step CM (creation mode handling) $cmd = $com[0]; - $ctype = $com[1]; // note ctype holds type if cmdclass is empty, but also subcommands if not (e.g. applyFilter in ilpcmediaobjectgui) + $ctype = $com[1] ?? ""; // note ctype holds type if cmdclass is empty, but also subcommands if not (e.g. applyFilter in ilpcmediaobjectgui) $add_type = $this->request->getString("pluginName"); if ($ctype == "mob") { $ctype = "media"; @@ -444,7 +444,7 @@ public function executeCommand() : string $this->log->debug("end ---"); - return $ret; + return (string) $ret; } public function activatePage() : void diff --git a/Services/Container/Content/class.ilContainerContentGUI.php b/Services/Container/Content/class.ilContainerContentGUI.php index f62be4e68928..444443ff4544 100644 --- a/Services/Container/Content/class.ilContainerContentGUI.php +++ b/Services/Container/Content/class.ilContainerContentGUI.php @@ -629,7 +629,7 @@ public function renderItem( $a_item_data['ref_id'], $a_item_data['obj_id'], $a_item_data['title'], - $a_item_data['description'], + (string) $a_item_data['description'], $asynch, false, $asynch_url diff --git a/Services/LearningHistory/classes/class.ilPCLearningHistoryGUI.php b/Services/LearningHistory/classes/class.ilPCLearningHistoryGUI.php index fe1f772e7198..65da7d7fca99 100644 --- a/Services/LearningHistory/classes/class.ilPCLearningHistoryGUI.php +++ b/Services/LearningHistory/classes/class.ilPCLearningHistoryGUI.php @@ -26,7 +26,7 @@ class ilPCLearningHistoryGUI extends ilPageContentGUI public function __construct( ilPageObject $a_pg_obj, - ilPCLearningHistory $a_content_obj = null, + ?ilPCLearningHistory $a_content_obj = null, string $a_hier_id = "", string $a_pc_id = "" ) {