From bf42c0ad9da7678dd735342273e8b6e890a8b235 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 21 Jul 2018 11:02:33 +0200 Subject: [PATCH] Remove return types from PIP GUI API See #2545 See #2720 --- .../pip/DevtoolsPipEntryList.class.php | 4 +-- .../pip/IDevtoolsPipEntryList.class.php | 4 +-- ...TXmlGuiPackageInstallationPlugin.class.php | 26 +++++++++---------- .../builder/field/OptionFormField.class.php | 6 ++--- .../field/UserGroupOptionFormField.class.php | 6 ++--- ...LOptionPackageInstallationPlugin.class.php | 10 +++---- ...ACPMenuPackageInstallationPlugin.class.php | 8 +++--- ...roviderPackageInstallationPlugin.class.php | 6 ++--- ...actMenuPackageInstallationPlugin.class.php | 14 +++++----- ...dActionPackageInstallationPlugin.class.php | 6 ++--- ...eObjectPackageInstallationPlugin.class.php | 6 ++--- ...CronjobPackageInstallationPlugin.class.php | 6 ++--- ...istenerPackageInstallationPlugin.class.php | 6 ++--- ...roviderPackageInstallationPlugin.class.php | 6 ++--- ...enuItemPackageInstallationPlugin.class.php | 12 ++++----- .../MenuPackageInstallationPlugin.class.php | 10 +++---- ...initionPackageInstallationPlugin.class.php | 6 ++--- ...ectTypePackageInstallationPlugin.class.php | 18 ++++++------- .../PIPPackageInstallationPlugin.class.php | 6 ++--- .../PagePackageInstallationPlugin.class.php | 8 +++--- ...istenerPackageInstallationPlugin.class.php | 6 ++--- ...serMenuPackageInstallationPlugin.class.php | 6 ++--- ...onEventPackageInstallationPlugin.class.php | 8 +++--- ...ileMenuPackageInstallationPlugin.class.php | 6 ++--- 24 files changed, 100 insertions(+), 100 deletions(-) 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 dd814a3e2d..9b7f966d09 100644 --- a/wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPipEntryList.class.php +++ b/wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPipEntryList.class.php @@ -56,14 +56,14 @@ class DevtoolsPipEntryList implements IDevtoolsPipEntryList { /** * @inheritDoc */ - public function getEntries(): array { + public function getEntries() { return $this->entries; } /** * @inheritDoc */ - public function getKeys(): array { + public function getKeys() { 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 2c50d853ba..320667482c 100644 --- a/wcfsetup/install/files/lib/system/devtools/pip/IDevtoolsPipEntryList.class.php +++ b/wcfsetup/install/files/lib/system/devtools/pip/IDevtoolsPipEntryList.class.php @@ -28,7 +28,7 @@ interface IDevtoolsPipEntryList { * * @return array */ - public function getEntries(): array; + public function getEntries(); /** * Returns the expected keys of the entries that can be used to display the @@ -40,7 +40,7 @@ interface IDevtoolsPipEntryList { * @return array * @throws \BadMethodCallException if no keys have been set */ - public function getKeys(): array; + public function getKeys(); /** * Sets the keys of the entries that can be used to display the entry list 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 8c8bd947c1..937763bc03 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): string { + public function editEntry(IFormDocument $form, string $identifier) { $xml = $this->getProjectXml(); $document = $xml->getDocument(); @@ -101,7 +101,7 @@ trait TXmlGuiPackageInstallationPlugin { * * @return string */ - public function getAdditionalTemplateCode(): string { + public function getAdditionalTemplateCode() { return ''; } @@ -112,7 +112,7 @@ trait TXmlGuiPackageInstallationPlugin { * @param string $value * @return string */ - protected function getAutoCdataValue(string $value): string { + protected function getAutoCdataValue(string $value) { if (strpos('<', $value) !== false || strpos('>', $value) !== false || strpos('&', $value) !== false) { $value = ''; } @@ -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): array; + abstract protected function getElementData(\DOMElement $element, bool $saveData = false); /** * Returns the identifier of the given `import` element. @@ -152,7 +152,7 @@ trait TXmlGuiPackageInstallationPlugin { * @param \DOMElement $element * @return string */ - abstract protected function getElementIdentifier(\DOMElement $element): string; + abstract protected function getElementIdentifier(\DOMElement $element); /** * Returns the xml code of an empty xml file with the appropriate structure @@ -161,7 +161,7 @@ trait TXmlGuiPackageInstallationPlugin { * * @return string */ - protected function getEmptyXml(): string { + protected function getEmptyXml() { $xsdFilename = $this->getXsdFilename(); return <<getProjectXml(); $xpath = $xml->xpath(); @@ -216,7 +216,7 @@ XML; * * @return string[] */ - public function getEntryTypes(): array { + public function getEntryTypes() { return []; } @@ -243,7 +243,7 @@ XML; * * @return XML */ - protected function getProjectXml(): XML { + protected function getProjectXml() { $fileLocation = $this->getXmlFileLocation(); $xml = new XML(); @@ -262,7 +262,7 @@ XML; * * @return string */ - protected function getXmlFileLocation(): string { + protected function getXmlFileLocation() { /** @var DevtoolsProject $project */ $project = $this->installation->getProject(); @@ -324,7 +324,7 @@ XML; * @param IFormDocument $document * @return bool */ - public function setEntryData(string $identifier, IFormDocument $document): bool { + public function setEntryData(string $identifier, IFormDocument $document) { $xml = $this->getProjectXml(); $element = $this->getElementByIdentifier($xml, $identifier); @@ -471,5 +471,5 @@ XML; * @param IFormDocument $form * @return \DOMElement */ - abstract protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement; + abstract protected function writeEntry(\DOMDocument $document, IFormDocument $form); } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/OptionFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/OptionFormField.class.php index c1c1ecdf77..4c46f1c333 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/OptionFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/OptionFormField.class.php @@ -40,7 +40,7 @@ class OptionFormField extends ItemListFormField { * * @return int[] */ - public function getPackageIDs(): array { + public function getPackageIDs() { return $this->__packageIDs; } @@ -53,7 +53,7 @@ class OptionFormField extends ItemListFormField { * * @throws \InvalidArgumentException if the given package ids are invalid */ - public function packageIDs(array $packageIDs): OptionFormField { + public function packageIDs(array $packageIDs) { foreach ($packageIDs as $packageID) { if (PackageCache::getInstance()->getPackage($packageID) === null) { throw new \InvalidArgumentException("Unknown package with id '{$packageID}'."); @@ -102,7 +102,7 @@ class OptionFormField extends ItemListFormField { /** * @inheritDoc */ - protected static function getDefaultId(): string { + protected static function getDefaultId() { return 'options'; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/UserGroupOptionFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/UserGroupOptionFormField.class.php index 35d9b605d4..89850e330a 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/UserGroupOptionFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/UserGroupOptionFormField.class.php @@ -40,7 +40,7 @@ class UserGroupOptionFormField extends ItemListFormField { * * @return int[] */ - public function getPackageIDs(): array { + public function getPackageIDs() { return $this->__packageIDs; } @@ -53,7 +53,7 @@ class UserGroupOptionFormField extends ItemListFormField { * * @throws \InvalidArgumentException if the given package ids are invalid */ - public function packageIDs(array $packageIDs): UserGroupOptionFormField { + public function packageIDs(array $packageIDs) { foreach ($packageIDs as $packageID) { if (PackageCache::getInstance()->getPackage($packageID) === null) { throw new \InvalidArgumentException("Unknown package with id '{$packageID}'."); @@ -102,7 +102,7 @@ class UserGroupOptionFormField extends ItemListFormField { /** * @inheritDoc */ - protected static function getDefaultId(): string { + protected static function getDefaultId() { return 'permissions'; } } 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 ec9d398755..aa4b3e898e 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php @@ -469,7 +469,7 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati * @inheritDoc * @since 3.2 */ - public function getEntryTypes(): array { + public function getEntryTypes() { return ['options', 'categories']; } @@ -477,7 +477,7 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'name' => $element->getAttribute('name'), 'packageID' => $this->installation->getPackage()->packageID, @@ -498,7 +498,7 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { $elementData = $this->getElementData($element); return sha1($elementData['objectType'] . '/' . $elementData['name']); @@ -508,7 +508,7 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati * @inheritDoc * @since 3.2 */ - protected function getXsdFilename(): string { + protected function getXsdFilename() { return 'aclOption'; } @@ -660,7 +660,7 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $formData = $form->getData()['data']; switch ($this->entryType) { 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 4a2e752e40..0c1f6b7557 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): bool { + $iconParentMenuItems = array_keys(array_filter($menuItemLevels, function(int $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): bool { + $menuItemsSupportingLinks = array_keys(array_filter($menuItemLevels, function(int $menuItemLevel) { return $menuItemLevel >= 2; })); @@ -129,7 +129,7 @@ class ACPMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationPl * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = parent::getElementData($element); $icon = $element->getElementsByTagName('icon')->item(0); @@ -144,7 +144,7 @@ class ACPMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationPl * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $formData = $form->getData()['data']; $menuItem = parent::writeEntry($document, $form); 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 f8a3a3f135..32b1adb14d 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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue, 'packageID' => $this->installation->getPackage()->packageID, @@ -132,7 +132,7 @@ class ACPSearchProviderPackageInstallationPlugin extends AbstractXMLPackageInsta * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getAttribute('name'); } @@ -234,7 +234,7 @@ class ACPSearchProviderPackageInstallationPlugin extends AbstractXMLPackageInsta * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $data = $form->getData()['data']; $acpSearchProvider = $document->createElement('acpsearchprovider'); 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 27f30f783f..e7a8a8a7e8 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php @@ -159,7 +159,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI ->objectProperty('parent') ->label('wcf.acp.pip.abstractMenu.parentMenuItem') ->filterable() - ->options(function(): array { + ->options(function() { $menuStructure = $this->getMenuStructureData()['structure']; $options = [[ @@ -168,7 +168,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI 'value' => '' ]]; - $buildOptions = function(string $parent = '', int $depth = 0) use ($menuStructure, &$buildOptions): array { + $buildOptions = function(string $parent = '', int $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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'menuItem' => $element->getAttribute('name'), 'packageID' => $this->installation->getPackage()->packageID @@ -315,7 +315,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getAttribute('name'); } @@ -324,7 +324,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI * * @return array */ - protected function getMenuStructureData(): array { + protected function getMenuStructureData() { // replace `Editor` with `List` $listClassName = substr($this->className, 0, -6) . 'List'; @@ -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): array { + $buildPositions = function(string $parent = '') use ($menuItemStructure, &$buildPositions) { $positions = []; foreach ($menuItemStructure[$parent] as $menuItem) { // only consider menu items of the current package for positions @@ -429,7 +429,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $formData = $form->getData()['data']; $menuItem = $document->createElement($this->tagName); 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 a74ac2db27..c49c5b8fe8 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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'actionClassName' => $element->getElementsByTagName('actionclassname')->item(0)->nodeValue, 'actionName' => $element->getAttribute('name'), @@ -276,7 +276,7 @@ class ClipboardActionPackageInstallationPlugin extends AbstractXMLPackageInstall * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return sha1( $element->getElementsByTagName('actionclassname')->item(0)->nodeValue . '/' . $element->getAttribute('name') @@ -343,7 +343,7 @@ class ClipboardActionPackageInstallationPlugin extends AbstractXMLPackageInstall * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $formData = $form->getData(); $data = $formData['data']; 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 f9f82c5c84..ce5383f148 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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { return [ 'objectName' => $element->getElementsByTagName('objectname')->item(0)->nodeValue, 'packageID' => $this->installation->getPackage()->packageID @@ -138,7 +138,7 @@ class CoreObjectPackageInstallationPlugin extends AbstractXMLPackageInstallation * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return sha1($element->getElementsByTagName('objectname')->item(0)->nodeValue); } @@ -164,7 +164,7 @@ class CoreObjectPackageInstallationPlugin extends AbstractXMLPackageInstallation * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $data = $form->getData()['data']; $coreObject = $document->createElement($this->tagName); 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 48b959ffd5..c5cd1a0ae6 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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue, 'cronjobName' => $element->getAttribute('name'), @@ -316,7 +316,7 @@ class CronjobPackageInstallationPlugin extends AbstractXMLPackageInstallationPlu * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getAttribute('name'); } @@ -367,7 +367,7 @@ class CronjobPackageInstallationPlugin extends AbstractXMLPackageInstallationPlu * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $data = $form->getData(); $formData = $form->getData()['data']; 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 e6e24ef32e..7eb92c497f 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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'eventClassName' => $element->getElementsByTagName('eventclassname')->item(0)->nodeValue, 'eventName' => StringUtil::normalizeCsv($element->getElementsByTagName('eventname')->item(0)->nodeValue), @@ -309,7 +309,7 @@ class EventListenerPackageInstallationPlugin extends AbstractXMLPackageInstallat * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getAttribute('name'); } @@ -347,7 +347,7 @@ class EventListenerPackageInstallationPlugin extends AbstractXMLPackageInstallat * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $data = $form->getData()['data']; $eventListener = $document->createElement($this->tagName); 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 6a9be2a007..91853ce4a6 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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'name' => $element->getAttribute('name'), 'packageID' => $this->installation->getPackage()->packageID, @@ -207,7 +207,7 @@ class MediaProviderPackageInstallationPlugin extends AbstractXMLPackageInstallat * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getAttribute('name'); } @@ -244,7 +244,7 @@ class MediaProviderPackageInstallationPlugin extends AbstractXMLPackageInstallat * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $data = $form->getData()['data']; $provider = $document->createElement($this->tagName); 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 e79ad25113..dae6e4a2d0 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php @@ -304,7 +304,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl ->label('wcf.acp.pip.menuItem.menu') ->description('wcf.acp.pip.menuItem.menu.description') ->required() - ->options(function() use ($menuList): array { + ->options(function() use ($menuList) { $options = []; foreach ($menuList as $menu) { $options[$menu->identifier] = $menu->identifier; @@ -330,7 +330,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl ->description('wcf.acp.pip.menuItem.page.description') ->required() ->filterable() - ->options(function(): array { + ->options(function() { $pageNodeList = (new PageNodeTree())->getNodeList(); $nestedOptions = [[ @@ -380,7 +380,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl SingleSelectionFormField::create('parentMenuItem' . $menu->menuID) ->objectProperty('parent') ->label('wcf.acp.pip.menuItem.parentMenuItem') - ->options(function() use($menu): array { + ->options(function() use($menu) { $options = [[ 'depth' => 0, 'label' => 'wcf.global.noSelection', @@ -439,7 +439,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'identifier' => $element->getAttribute('identifier'), 'packageID' => $this->installation->getPackageID(), @@ -512,7 +512,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getAttribute('identifier'); } @@ -575,7 +575,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $formData = $form->getData(); $data = $formData['data']; 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 c4161426b2..d5f48d6b1e 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/MenuPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/MenuPackageInstallationPlugin.class.php @@ -298,7 +298,7 @@ class MenuPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - public function getAdditionalTemplateCode(): string { + public function getAdditionalTemplateCode() { return WCF::getTPL()->fetch('__menuPipGui'); } @@ -364,7 +364,7 @@ class MenuPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin MultipleSelectionFormField::create('boxVisibilityExceptions') ->label('wcf.acp.pip.menu.boxVisibilityExceptions.hiddenEverywhere') ->filterable() - ->options(function(): array { + ->options(function() { $pageNodeList = (new PageNodeTree())->getNodeList(); $nestedOptions = []; @@ -407,7 +407,7 @@ class MenuPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'identifier' => $element->getAttribute('identifier'), 'packageID' => $this->installation->getPackageID(), @@ -503,7 +503,7 @@ class MenuPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getAttribute('identifier'); } @@ -539,7 +539,7 @@ class MenuPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $formData = $form->getData(); if ($formData['data']['identifier'] === 'com.woltlab.wcf.MainMenu') { 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 d84a522550..f2d969047e 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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'definitionName' => $element->getElementsByTagName('name')->item(0)->nodeValue, 'packageID' => $this->installation->getPackage()->packageID @@ -190,7 +190,7 @@ class ObjectTypeDefinitionPackageInstallationPlugin extends AbstractXMLPackageIn * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getElementsByTagName('name')->item(0)->nodeValue; } @@ -231,7 +231,7 @@ class ObjectTypeDefinitionPackageInstallationPlugin extends AbstractXMLPackageIn * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $data = $form->getData()['data']; $definition = $document->createElement('definition'); 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 73f03c694f..45d4b2d7ac 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php @@ -158,7 +158,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation * @inheritDoc * @since 3.2 */ - public function getAdditionalTemplateCode(): string { + public function getAdditionalTemplateCode() { return WCF::getTPL()->fetch('__objectTypePipGui', 'wcf', [ 'definitionNames' => $this->definitionNames, 'definitionInterfaces' => $this->definitionInterfaces @@ -169,7 +169,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'definitionID' => $this->getDefinitionID($element->getElementsByTagName('definitionname')->item(0)->nodeValue), 'objectType' => $element->getElementsByTagName('name')->item(0)->nodeValue, @@ -593,7 +593,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return sha1( $element->getElementsByTagName('name')->item(0)->nodeValue . '/' . $element->getElementsByTagName('definitionname')->item(0)->nodeValue @@ -604,7 +604,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation * @inheritDoc * @since 3.2 */ - protected function getEmptyXml(): string { + protected function getEmptyXml() { return << @@ -617,7 +617,7 @@ XML; * @inheritDoc * @since 3.2 */ - public function getEntryList(): IDevtoolsPipEntryList { + public function getEntryList() { $xml = $this->getProjectXml(); $xpath = $xml->xpath(); @@ -659,7 +659,7 @@ XML; * @return FormContainer * @since 3.2 */ - public function getObjectTypeDefinitionDataContainer(IFormDocument $form, string $definitionName): FormContainer { + public function getObjectTypeDefinitionDataContainer(IFormDocument $form, string $definitionName) { /** @var SingleSelectionFormField $definitionNameField */ $definitionIDField = $form->getNodeById('definitionID'); @@ -735,7 +735,7 @@ XML; * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $type = $document->createElement('type'); foreach ($form->getData()['data'] as $key => $value) { if ($key === 'definitionID') { @@ -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): TextFormField { + public function getIntegerConditionPropertyNameField(TextFormField $classNameField, string $conditionClass, string $id, string $languageItemPrefix, string $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): FormFieldValidator { + public static function getObjectTypeAlikeValueValidator(string $languageItemPrefix, int $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 c64dbbb301..1e188829ac 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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { return [ 'className' => $element->nodeValue, 'pluginName' => $element->getAttribute('name'), @@ -156,7 +156,7 @@ class PIPPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getAttribute('name'); } @@ -190,7 +190,7 @@ class PIPPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { /** @var TextFormField $className */ $className = $form->getNodeById('className'); /** @var TextFormField $pluginName */ 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 8873e1882a..7ed1649b54 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php @@ -498,7 +498,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin ->label('wcf.acp.pip.page.parent') ->required() ->filterable() - ->options(function(): array { + ->options(function() { $pageNodeList = (new PageNodeTree())->getNodeList(); $nestedOptions = [[ @@ -636,7 +636,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'identifier' => $element->getAttribute('identifier'), 'originIsSystem' => 1, @@ -732,7 +732,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getAttribute('identifier'); } @@ -769,7 +769,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $formData = $form->getData(); $data = $formData['data']; 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 37d8e9058d..2b786d45a5 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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { return [ 'environment' => $element->getElementsByTagName('environment')->item(0)->nodeValue, 'eventName' => $element->getElementsByTagName('eventname')->item(0)->nodeValue, @@ -339,7 +339,7 @@ class TemplateListenerPackageInstallationPlugin extends AbstractXMLPackageInstal * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return sha1( $element->getElementsByTagName('templatename')->item(0)->nodeValue . '/' . $element->getElementsByTagName('eventname')->item(0)->nodeValue . '/' . @@ -397,7 +397,7 @@ class TemplateListenerPackageInstallationPlugin extends AbstractXMLPackageInstal * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $data = $form->getData()['data']; $listener = $document->createElement($this->tagName); 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 e43a0ae0ab..53afd19c24 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): bool { + $menuItemsSupportingLinks = array_keys(array_filter($menuItemLevels, function(int $menuItemLevel) { return $menuItemLevel >= 2; })); @@ -126,7 +126,7 @@ class UserMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = parent::getElementData($element); $className = $element->getElementsByTagName('classname')->item(0); @@ -146,7 +146,7 @@ class UserMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $formData = $form->getData()['data']; $menuItem = parent::writeEntry($document, $form); 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 8cea9da1b7..2ae02cc090 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php @@ -206,7 +206,7 @@ class UserNotificationEventPackageInstallationPlugin extends AbstractXMLPackageI ->label('wcf.acp.pip.userNotificationEvent.objectType') ->description('wcf.acp.pip.userNotificationEvent.objectType.description') ->required() - ->options(function(): array { + ->options(function() { $options = []; foreach (ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.notification.objectType') as $objectType) { $options[$objectType->objectType] = $objectType->objectType; @@ -280,7 +280,7 @@ class UserNotificationEventPackageInstallationPlugin extends AbstractXMLPackageI * @inheritDoc * @since 3.2 */ - protected function getElementData(\DOMElement $element, bool $saveData = false): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue, 'objectTypeID' => $this->getObjectTypeID($element->getElementsByTagName('objecttype')->item(0)->nodeValue), @@ -316,7 +316,7 @@ class UserNotificationEventPackageInstallationPlugin extends AbstractXMLPackageI * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return sha1( $element->getElementsByTagName('name')->item(0)->nodeValue . '/' . $element->getElementsByTagName('objecttype')->item(0)->nodeValue @@ -363,7 +363,7 @@ class UserNotificationEventPackageInstallationPlugin extends AbstractXMLPackageI * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $data = $form->getData()['data']; $event = $document->createElement($this->tagName); 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 2532a3fa9d..5879b9e688 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): array { + protected function getElementData(\DOMElement $element, bool $saveData = false) { $data = [ 'className' => $element->getElementsByTagName('classname')->item(0)->nodeValue, 'menuItem' => $element->getAttribute('name'), @@ -210,7 +210,7 @@ class UserProfileMenuPackageInstallationPlugin extends AbstractXMLPackageInstall * @inheritDoc * @since 3.2 */ - public function getElementIdentifier(\DOMElement $element): string { + public function getElementIdentifier(\DOMElement $element) { return $element->getAttribute('name'); } @@ -261,7 +261,7 @@ class UserProfileMenuPackageInstallationPlugin extends AbstractXMLPackageInstall * @inheritDoc * @since 3.2 */ - protected function writeEntry(\DOMDocument $document, IFormDocument $form): \DOMElement { + protected function writeEntry(\DOMDocument $document, IFormDocument $form) { $data = $form->getData()['data']; $userProfileMenuItem = $document->createElement('userprofilemenuitem'); -- 2.20.1