From: Matthias Schmidt Date: Sat, 21 Jul 2018 09:09:42 +0000 (+0200) Subject: Remove scalar type hints from PIP GUI API X-Git-Tag: 5.2.0_Alpha_1~689 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef6d8b4f242a1fab35f4ad5af5ce3eb63c4252e1;p=GitHub%2FWoltLab%2FWCF.git Remove scalar type hints from PIP GUI API See #2545 See #2720 --- diff --git a/wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPipEntryList.class.php b/wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPipEntryList.class.php index 9b7f966d09..bfc43d0cb3 100644 --- a/wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPipEntryList.class.php +++ b/wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPipEntryList.class.php @@ -29,7 +29,7 @@ class DevtoolsPipEntryList implements IDevtoolsPipEntryList { /** * @inheritDoc */ - public function addEntry(string $id, array $entry) { + public function addEntry($id, array $entry) { if ($this->keys === null) { throw new \BadMethodCallException("No keys have been set."); } diff --git a/wcfsetup/install/files/lib/system/devtools/pip/IDevtoolsPipEntryList.class.php b/wcfsetup/install/files/lib/system/devtools/pip/IDevtoolsPipEntryList.class.php index 320667482c..15aec49c37 100644 --- a/wcfsetup/install/files/lib/system/devtools/pip/IDevtoolsPipEntryList.class.php +++ b/wcfsetup/install/files/lib/system/devtools/pip/IDevtoolsPipEntryList.class.php @@ -17,11 +17,11 @@ interface IDevtoolsPipEntryList { * * Before adding entries, the keys must be set. * - * @param string $identifier unique entry ident + * @param string $id unique entry identifier * @param array $entry entry data * @throws \BadMethodCallException if no keys have been set */ - public function addEntry(string $id, array $entry); + public function addEntry($id, array $entry); /** * Returns all entries in the list. diff --git a/wcfsetup/install/files/lib/system/devtools/pip/IGuiPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/devtools/pip/IGuiPackageInstallationPlugin.class.php index 569ac1996c..f02fde3282 100644 --- a/wcfsetup/install/files/lib/system/devtools/pip/IGuiPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/devtools/pip/IGuiPackageInstallationPlugin.class.php @@ -38,21 +38,21 @@ interface IGuiPackageInstallationPlugin extends IIdempotentPackageInstallationPl * @param string $identifier * @return string new identifier */ - public function editEntry(IFormDocument $form, string $identifier): string; + public function editEntry(IFormDocument $form, $identifier); /** * Returns additional template code for the form to add and edit entries. * * @return string */ - public function getAdditionalTemplateCode(): string; + public function getAdditionalTemplateCode(); /** * Returns a list of all pip entries of this pip. * * @return IDevtoolsPipEntryList */ - public function getEntryList(): IDevtoolsPipEntryList; + public function getEntryList(); /** * Informs the pip of the identifier of the edited entry if the form to @@ -62,7 +62,7 @@ interface IGuiPackageInstallationPlugin extends IIdempotentPackageInstallationPl * * @throws \InvalidArgumentException if no such entry exists */ - public function setEditedEntryIdentifier(string $identifier); + public function setEditedEntryIdentifier($identifier); /** * Adds the data of the pip entry with the given identifier into the @@ -73,7 +73,7 @@ interface IGuiPackageInstallationPlugin extends IIdempotentPackageInstallationPl * @param IFormDocument $document * @return bool */ - public function setEntryData(string $identifier, IFormDocument $document): bool; + public function setEntryData($identifier, IFormDocument $document); /** * Returns the list of available entry types. If only one entry type is @@ -84,7 +84,7 @@ interface IGuiPackageInstallationPlugin extends IIdempotentPackageInstallationPl * * @return string[] */ - public function getEntryTypes(): array; + public function getEntryTypes(); /** * Sets the type of the currently handled pip entries. @@ -93,5 +93,5 @@ interface IGuiPackageInstallationPlugin extends IIdempotentPackageInstallationPl * * @throws \InvalidArgumentException if the given entry type is invalid (see `getEntryTypes()` method) */ - public function setEntryType(string $entryType); + public function setEntryType($entryType); } diff --git a/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php index 937763bc03..9256e7d775 100644 --- a/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php @@ -71,7 +71,7 @@ trait TXmlGuiPackageInstallationPlugin { * @param string $identifier * @return string new identifier */ - public function editEntry(IFormDocument $form, string $identifier) { + public function editEntry(IFormDocument $form, $identifier) { $xml = $this->getProjectXml(); $document = $xml->getDocument(); @@ -112,7 +112,7 @@ trait TXmlGuiPackageInstallationPlugin { * @param string $value * @return string */ - protected function getAutoCdataValue(string $value) { + protected function getAutoCdataValue($value) { if (strpos('<', $value) !== false || strpos('>', $value) !== false || strpos('&', $value) !== false) { $value = ''; } @@ -127,7 +127,7 @@ trait TXmlGuiPackageInstallationPlugin { * @param string $identifier * @return \DOMElement|null */ - protected function getElementByIdentifier(XML $xml, string $identifier) { + protected function getElementByIdentifier(XML $xml, $identifier) { foreach ($this->getImportElements($xml->xpath()) as $element) { if ($this->getElementIdentifier($element) === $identifier) { return $element; @@ -144,7 +144,7 @@ trait TXmlGuiPackageInstallationPlugin { * @param bool $saveData is `true` if data is intended to be saved and otherwise `false` * @return array */ - abstract protected function getElementData(\DOMElement $element, bool $saveData = false); + abstract protected function getElementData(\DOMElement $element, $saveData = false); /** * Returns the identifier of the given `import` element. @@ -307,7 +307,7 @@ XML; * * @throws \InvalidArgumentException if no such entry exists */ - public function setEditedEntryIdentifier(string $identifier) { + public function setEditedEntryIdentifier($identifier) { $this->editedEntry = $this->getElementByIdentifier($this->getProjectXml(), $identifier); if ($this->editedEntry === null) { @@ -324,7 +324,7 @@ XML; * @param IFormDocument $document * @return bool */ - public function setEntryData(string $identifier, IFormDocument $document) { + public function setEntryData($identifier, IFormDocument $document) { $xml = $this->getProjectXml(); $element = $this->getElementByIdentifier($xml, $identifier); @@ -377,7 +377,7 @@ XML; * * @throws \InvalidArgumentException if the given entry type is invalid (see `getEntryTypes()` method) */ - public function setEntryType(string $entryType) { + public function setEntryType($entryType) { if (!in_array($entryType, $this->getEntryTypes())) { throw new \InvalidArgumentException("Unknown entry type '{$entryType}'."); } diff --git a/wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php index aa4b3e898e..58a6322909 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php @@ -477,7 +477,7 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'name' => $element->getAttribute('name'), 'packageID' => $this->installation->getPackage()->packageID, diff --git a/wcfsetup/install/files/lib/system/package/plugin/ACPMenuPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ACPMenuPackageInstallationPlugin.class.php index 0c1f6b7557..172d793e59 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ACPMenuPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ACPMenuPackageInstallationPlugin.class.php @@ -66,7 +66,7 @@ class ACPMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationPl // icons are only available for menu items on the first or fourth level // thus the parent menu item must be on zeroth level (no parent menu item) // or on the third level - $iconParentMenuItems = array_keys(array_filter($menuItemLevels, function(int $value) { + $iconParentMenuItems = array_keys(array_filter($menuItemLevels, function($value) { return $value === 0 || $value == 3; })); @@ -110,7 +110,7 @@ class ACPMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationPl // menu items on the first and second level do not support links, // thus the parent menu item must be at least on the second level // for the menu item to support links - $menuItemsSupportingLinks = array_keys(array_filter($menuItemLevels, function(int $menuItemLevel) { + $menuItemsSupportingLinks = array_keys(array_filter($menuItemLevels, function($menuItemLevel) { return $menuItemLevel >= 2; })); @@ -129,7 +129,7 @@ class ACPMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationPl * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = parent::getElementData($element); $icon = $element->getElementsByTagName('icon')->item(0); diff --git a/wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php index 32b1adb14d..3feb3ab649 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php @@ -113,7 +113,7 @@ class ACPSearchProviderPackageInstallationPlugin extends AbstractXMLPackageInsta * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue, 'packageID' => $this->installation->getPackage()->packageID, diff --git a/wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php index e7a8a8a7e8..8bd346e5a3 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php @@ -168,7 +168,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI 'value' => '' ]]; - $buildOptions = function(string $parent = '', int $depth = 0) use ($menuStructure, &$buildOptions) { + $buildOptions = function($parent = '', $depth = 0) use ($menuStructure, &$buildOptions) { // only consider menu items until the third level (thus only parent // menu items until the second level) as potential parent menu items if ($depth > 2) { @@ -272,7 +272,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'menuItem' => $element->getAttribute('name'), 'packageID' => $this->installation->getPackage()->packageID @@ -396,7 +396,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI // build array containing the ACP menu items saved in the database // in the order as they would be displayed in the ACP - $buildPositions = function(string $parent = '') use ($menuItemStructure, &$buildPositions) { + $buildPositions = function($parent = '') use ($menuItemStructure, &$buildPositions) { $positions = []; foreach ($menuItemStructure[$parent] as $menuItem) { // only consider menu items of the current package for positions diff --git a/wcfsetup/install/files/lib/system/package/plugin/ClipboardActionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ClipboardActionPackageInstallationPlugin.class.php index c49c5b8fe8..a8cf996d9f 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ClipboardActionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ClipboardActionPackageInstallationPlugin.class.php @@ -245,7 +245,7 @@ class ClipboardActionPackageInstallationPlugin extends AbstractXMLPackageInstall * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'actionClassName' => $element->getElementsByTagName('actionclassname')->item(0)->nodeValue, 'actionName' => $element->getAttribute('name'), diff --git a/wcfsetup/install/files/lib/system/package/plugin/CoreObjectPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/CoreObjectPackageInstallationPlugin.class.php index ce5383f148..5ce39cde38 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/CoreObjectPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/CoreObjectPackageInstallationPlugin.class.php @@ -127,7 +127,7 @@ class CoreObjectPackageInstallationPlugin extends AbstractXMLPackageInstallation * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { return [ 'objectName' => $element->getElementsByTagName('objectname')->item(0)->nodeValue, 'packageID' => $this->installation->getPackage()->packageID diff --git a/wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php index c5cd1a0ae6..fc4c84a9d4 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php @@ -250,7 +250,7 @@ class CronjobPackageInstallationPlugin extends AbstractXMLPackageInstallationPlu * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue, 'cronjobName' => $element->getAttribute('name'), diff --git a/wcfsetup/install/files/lib/system/package/plugin/EventListenerPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/EventListenerPackageInstallationPlugin.class.php index 7eb92c497f..ab70324a85 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/EventListenerPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/EventListenerPackageInstallationPlugin.class.php @@ -286,7 +286,7 @@ class EventListenerPackageInstallationPlugin extends AbstractXMLPackageInstallat * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'eventClassName' => $element->getElementsByTagName('eventclassname')->item(0)->nodeValue, 'eventName' => StringUtil::normalizeCsv($element->getElementsByTagName('eventname')->item(0)->nodeValue), diff --git a/wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php index 91853ce4a6..e515682e57 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php @@ -182,7 +182,7 @@ class MediaProviderPackageInstallationPlugin extends AbstractXMLPackageInstallat * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'name' => $element->getAttribute('name'), 'packageID' => $this->installation->getPackage()->packageID, diff --git a/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php index dae6e4a2d0..cffba3373f 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php @@ -166,7 +166,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl * @param string $identifier * @return null|int */ - protected function getMenuID(string $identifier) { + protected function getMenuID($identifier) { $sql = "SELECT menuID FROM wcf" . WCF_N . "_menu WHERE identifier = ?"; @@ -183,7 +183,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl * @param string $identifier * @return null|int */ - protected function getPageID(string $identifier) { + protected function getPageID($identifier) { $sql = "SELECT pageID FROM wcf" . WCF_N . "_page WHERE identifier = ?"; @@ -439,7 +439,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'identifier' => $element->getAttribute('identifier'), 'packageID' => $this->installation->getPackageID(), diff --git a/wcfsetup/install/files/lib/system/package/plugin/MenuPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/MenuPackageInstallationPlugin.class.php index d5f48d6b1e..9df987dee5 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/MenuPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/MenuPackageInstallationPlugin.class.php @@ -407,7 +407,7 @@ class MenuPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'identifier' => $element->getAttribute('identifier'), 'packageID' => $this->installation->getPackageID(), diff --git a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php index f2d969047e..2728d5fa54 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php @@ -172,7 +172,7 @@ class ObjectTypeDefinitionPackageInstallationPlugin extends AbstractXMLPackageIn * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'definitionName' => $element->getElementsByTagName('name')->item(0)->nodeValue, 'packageID' => $this->installation->getPackage()->packageID diff --git a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php index 45d4b2d7ac..a670181d12 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php @@ -169,7 +169,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'definitionID' => $this->getDefinitionID($element->getElementsByTagName('definitionname')->item(0)->nodeValue), 'objectType' => $element->getElementsByTagName('name')->item(0)->nodeValue, @@ -659,7 +659,7 @@ XML; * @return FormContainer * @since 3.2 */ - public function getObjectTypeDefinitionDataContainer(IFormDocument $form, string $definitionName) { + public function getObjectTypeDefinitionDataContainer(IFormDocument $form, $definitionName) { /** @var SingleSelectionFormField $definitionNameField */ $definitionIDField = $form->getNodeById('definitionID'); @@ -765,7 +765,7 @@ XML; * @param IFormDocument $form * @param string $objectTypeDefinition */ - public function addBulkProcessingActionFields(IFormDocument $form, string $objectTypeDefinition) { + public function addBulkProcessingActionFields(IFormDocument $form, $objectTypeDefinition) { $definitionPieces = explode('.', $objectTypeDefinition); $definitionIdString = implode('', array_map('ucfirst', $definitionPieces)); @@ -812,7 +812,7 @@ XML; * @param bool $addConditionGroup * @since 3.2 */ - public function addConditionFields(IFormContainer $dataContainer, bool $addConditionObject = true, bool $addConditionGroup = true) { + public function addConditionFields(IFormContainer $dataContainer, $addConditionObject = true, $addConditionGroup = true) { $prefix = preg_replace('~Fields$~', '', $dataContainer->getId()); if ($addConditionObject) { @@ -959,7 +959,7 @@ XML; * @param string $databaseTableName name of the database table that stores the conditioned objects * @return TextFormField */ - public function getIntegerConditionPropertyNameField(TextFormField $classNameField, string $conditionClass, string $id, string $languageItemPrefix, string $databaseTableName) { + public function getIntegerConditionPropertyNameField(TextFormField $classNameField, $conditionClass, $id, $languageItemPrefix, $databaseTableName) { return TextFormField::create($id) ->objectProperty('propertyname') ->label($languageItemPrefix . '.propertyName') @@ -1002,7 +1002,7 @@ XML; * @param int $minimumSegmentCount minimum number of dot-separated segments * @return FormFieldValidator */ - public static function getObjectTypeAlikeValueValidator(string $languageItemPrefix, int $minimumSegmentCount = 4) { + public static function getObjectTypeAlikeValueValidator($languageItemPrefix, $minimumSegmentCount = 4) { return new FormFieldValidator('format', function(TextFormField $formField) use ($languageItemPrefix, $minimumSegmentCount) { if ($formField->getValue()) { $segments = explode('.', $formField->getValue()); diff --git a/wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php index 1e188829ac..c5b1e98d2e 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php @@ -144,7 +144,7 @@ class PIPPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { return [ 'className' => $element->nodeValue, 'pluginName' => $element->getAttribute('name'), diff --git a/wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php index 7ed1649b54..9169758221 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php @@ -636,7 +636,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'identifier' => $element->getAttribute('identifier'), 'originIsSystem' => 1, @@ -668,7 +668,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin } } - $readData = function(int $languageID, \DOMElement $content) use (&$data) { + $readData = function($languageID, \DOMElement $content) use (&$data) { foreach (['title', 'content', 'customURL', 'metaDescription', 'metaKeywords'] as $contentElementName) { $contentElement = $content->getElementsByTagName($contentElementName)->item(0); if ($contentElement) { diff --git a/wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php index 2b786d45a5..f5f2a8b99c 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php @@ -324,7 +324,7 @@ class TemplateListenerPackageInstallationPlugin extends AbstractXMLPackageInstal * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { return [ 'environment' => $element->getElementsByTagName('environment')->item(0)->nodeValue, 'eventName' => $element->getElementsByTagName('eventname')->item(0)->nodeValue, diff --git a/wcfsetup/install/files/lib/system/package/plugin/UserMenuPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/UserMenuPackageInstallationPlugin.class.php index 53afd19c24..1529d617fe 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/UserMenuPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/UserMenuPackageInstallationPlugin.class.php @@ -107,7 +107,7 @@ class UserMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP // menu items on the first and second level do not support links, // thus the parent menu item must be at least on the second level // for the menu item to support links - $menuItemsSupportingLinks = array_keys(array_filter($menuItemLevels, function(int $menuItemLevel) { + $menuItemsSupportingLinks = array_keys(array_filter($menuItemLevels, function($menuItemLevel) { return $menuItemLevel >= 2; })); @@ -126,7 +126,7 @@ class UserMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = parent::getElementData($element); $className = $element->getElementsByTagName('classname')->item(0); diff --git a/wcfsetup/install/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php index 2ae02cc090..07abbe635c 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php @@ -280,7 +280,7 @@ class UserNotificationEventPackageInstallationPlugin extends AbstractXMLPackageI * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue, 'objectTypeID' => $this->getObjectTypeID($element->getElementsByTagName('objecttype')->item(0)->nodeValue), diff --git a/wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php index 5879b9e688..dbc609a20b 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php @@ -178,7 +178,7 @@ class UserProfileMenuPackageInstallationPlugin extends AbstractXMLPackageInstall * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false) { + protected function getElementData(\DOMElement $element, $saveData = false) { $data = [ 'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue, 'menuItem' => $element->getAttribute('name'),