Remove explicit return types
authorMatthias Schmidt <gravatronics@live.com>
Fri, 27 Jul 2018 13:47:46 +0000 (15:47 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 27 Jul 2018 13:47:46 +0000 (15:47 +0200)
See #2720

wcfsetup/install/files/lib/data/article/Article.class.php
wcfsetup/install/files/lib/data/object/type/ObjectType.class.php
wcfsetup/install/files/lib/data/page/Page.class.php
wcfsetup/install/files/lib/data/search/ICustomIconSearchResultObject.class.php
wcfsetup/install/files/lib/system/article/discussion/CommentArticleDiscussionProvider.class.php
wcfsetup/install/files/lib/system/article/discussion/IArticleDiscussionProvider.class.php
wcfsetup/install/files/lib/system/article/discussion/VoidArticleDiscussionProvider.class.php
wcfsetup/install/files/lib/system/html/toc/HtmlToc.class.php
wcfsetup/install/files/lib/system/html/toc/HtmlTocItem.class.php
wcfsetup/install/files/lib/system/log/modification/IExtendedModificationLogHandler.class.php

index 49e91efdd6dc4f116c1727f264331318332871bc..9ce4ee39164ba5a2285170190b508c086d109337 100644 (file)
@@ -290,7 +290,7 @@ class Article extends DatabaseObject implements ILinkableObject {
         * @return      string[]
         * @since       3.2
         */
-       public static function getAllDiscussionProviders(): array {
+       public static function getAllDiscussionProviders() {
                /** @var string[] $discussionProviders */
                static $discussionProviders;
                
index 69e0fbebc81d9e886a0be9699233c7fe1431b676..1102bf279c0dfa0f56fe49d9f7432169a719b206 100644 (file)
@@ -122,7 +122,7 @@ class ObjectType extends ProcessibleDatabaseObject {
         * @return      Package
         * @since       3.2
         */
-       public function getPackage(): Package {
+       public function getPackage() {
                return PackageCache::getInstance()->getPackage($this->packageID);
        }
 }
index 3d00dae34d014c9758c3a1cfb4a588b4fd845ac1..c141e667d93e908393011dd245015cf6bd4bd2a1 100644 (file)
@@ -359,7 +359,7 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject {
         * @return      bool
         * @since       3.2
         */
-       public function showShareButtons(): bool {
+       public function showShareButtons() {
                return $this->enableShareButtons && $this->pageType !== 'system';
        }
        
index 1a778e92c566c1be78aef472da5d8827ff7d7108..2cb4419f21fc02516525c5cc4cfdefef396ee448 100644 (file)
@@ -19,5 +19,5 @@ interface ICustomIconSearchResultObject extends ISearchResultObject {
         * 
         * @return      string
         */
-       public function getCustomSearchResultIcon(): string;
+       public function getCustomSearchResultIcon();
 }
index 1bc3f0cdb8cad74a580e1ca236a44c6856e0ab29..95eac42a36f4aa43a03750b5e953e8a61261a154 100644 (file)
@@ -17,21 +17,21 @@ class CommentArticleDiscussionProvider extends AbstractArticleDiscussionProvider
        /**
         * @inheritDoc
         */
-       public function getDiscussionCount(): int {
+       public function getDiscussionCount() {
                return $this->article->comments;
        }
        
        /**
         * @inheritDoc
         */
-       public function getDiscussionCountPhrase(): string {
+       public function getDiscussionCountPhrase() {
                return WCF::getLanguage()->getDynamicVariable('wcf.article.articleComments', ['article' => $this->article]);
        }
        
        /**
         * @inheritDoc
         */
-       public function renderDiscussions(): string {
+       public function renderDiscussions() {
                $commentCanAdd = WCF::getSession()->getPermission('user.article.canAddComment');
                $commentObjectTypeID = CommentHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.articleComment');
                $commentManager = CommentHandler::getInstance()->getObjectType($commentObjectTypeID)->getProcessor();
@@ -51,7 +51,7 @@ class CommentArticleDiscussionProvider extends AbstractArticleDiscussionProvider
        /**
         * @inheritDoc
         */
-       public static function isResponsible(Article $article): bool {
+       public static function isResponsible(Article $article) {
                return !!$article->enableComments;
        }
 }
index ef4b342d4b3596a275dfd93dab18b275757cfcdb..797f68fc00d4a125d2c4cffc19ddda673209ac84 100644 (file)
@@ -18,7 +18,7 @@ interface IArticleDiscussionProvider {
         * 
         * @return      int
         */
-       public function getDiscussionCount(): int;
+       public function getDiscussionCount();
        
        /**
         * Returns the simple phrase "X <discussions>" that is used for both the statistics
@@ -26,14 +26,14 @@ interface IArticleDiscussionProvider {
         * 
         * @return      string
         */
-       public function getDiscussionCountPhrase(): string;
+       public function getDiscussionCountPhrase();
        
        /**
         * Renders the input and display section of the associated discussion.
         * 
         * @return      string
         */
-       public function renderDiscussions(): string;
+       public function renderDiscussions();
        
        /**
         * Sets the content object required for the separate discussions per article language.
@@ -49,5 +49,5 @@ interface IArticleDiscussionProvider {
         * @param       Article         $article
         * @return      bool
         */
-       public static function isResponsible(Article $article): bool;
+       public static function isResponsible(Article $article);
 }
index a1dbffaec08440563f6c8680036a2058f187e604..37aebb865ffa7b0ef4f0954b96f53246c7505a10 100644 (file)
@@ -16,28 +16,28 @@ class VoidArticleDiscussionProvider extends AbstractArticleDiscussionProvider {
        /**
         * @inheritDoc
         */
-       public function getDiscussionCount(): int {
+       public function getDiscussionCount() {
                return 0;
        }
        
        /**
         * @inheritDoc
         */
-       public function getDiscussionCountPhrase(): string {
+       public function getDiscussionCountPhrase() {
                return '';
        }
        
        /**
         * @inheritDoc
         */
-       public function renderDiscussions(): string {
+       public function renderDiscussions() {
                return '';
        }
        
        /**
         * @inheritDoc
         */
-       public static function isResponsible(Article $article): bool {
+       public static function isResponsible(Article $article) {
                return true;
        }
 }
index ad5b4fe54a7385b96dd4df18b55189d95e3aa6e0..07fb5af4f58f9cb334c4219a725d7c1d0345ba89 100644 (file)
@@ -19,7 +19,7 @@ class HtmlToc {
         * @param       string $idPrefix prefix for all generated ids, must not end with a delimiter
         * @return      string          the HTML of the generated table of contents or an empty string if there are too few headings
         */
-       public static function forMessage(\DOMDocument $document, string $idPrefix): string {
+       public static function forMessage(\DOMDocument $document, string $idPrefix) {
                $titleRegex = new Regex('[^\p{L}\p{N}]+', Regex::UTF_8);
                
                // fetch all headings in their order of appearance
index 566d720ff77207117bc5307633a261d1555806dd..a8a4d2ef464cadf8811a83fda82b11b957daabae 100644 (file)
@@ -37,15 +37,15 @@ class HtmlTocItem implements \Countable, \RecursiveIterator {
                $this->title = $title;
        }
        
-       public function getID(): string {
+       public function getID() {
                return $this->id;
        }
        
-       public function getLevel(): int {
+       public function getLevel() {
                return $this->level;
        }
        
-       public function getTitle(): string {
+       public function getTitle() {
                return $this->title;
        }
        
@@ -69,7 +69,7 @@ class HtmlTocItem implements \Countable, \RecursiveIterator {
                $this->depth = $depth;
        }
        
-       public function getDepth(): int {
+       public function getDepth() {
                return $this->depth;
        }
        
@@ -78,7 +78,7 @@ class HtmlTocItem implements \Countable, \RecursiveIterator {
         *
         * @return        integer
         */
-       public function count(): int {
+       public function count() {
                return count($this->children);
        }
        
@@ -87,7 +87,7 @@ class HtmlTocItem implements \Countable, \RecursiveIterator {
         *
         * @return        bool
         */
-       public function isLastSibling(): bool {
+       public function isLastSibling() {
                foreach ($this->getParent() as $key => $child) {
                        if ($child === $this) {
                                return ($key === count($this->getParent()) - 1);
@@ -102,7 +102,7 @@ class HtmlTocItem implements \Countable, \RecursiveIterator {
         *
         * @return        int
         */
-       public function getOpenParentNodes(): int {
+       public function getOpenParentNodes() {
                $element = $this;
                $i = 0;
                
@@ -124,7 +124,7 @@ class HtmlTocItem implements \Countable, \RecursiveIterator {
        /**
         * @inheritDoc
         */
-       public function valid(): bool {
+       public function valid() {
                return isset($this->children[$this->position]);
        }
        
@@ -138,32 +138,32 @@ class HtmlTocItem implements \Countable, \RecursiveIterator {
        /**
         * @inheritDoc
         */
-       public function current(): HtmlTocItem {
+       public function current() {
                return $this->children[$this->position];
        }
        
        /**
         * @inheritDoc
         */
-       public function key(): int {
+       public function key() {
                return $this->position;
        }
        
        /**
         * @inheritDoc
         */
-       public function getChildren(): HtmlTocItem {
+       public function getChildren() {
                return $this->children[$this->position];
        }
        
        /**
         * @inheritDoc
         */
-       public function hasChildren(): bool {
+       public function hasChildren() {
                return count($this->children) > 0;
        }
        
-       public function getIterator(): \RecursiveIteratorIterator {
+       public function getIterator() {
                return new \RecursiveIteratorIterator($this, \RecursiveIteratorIterator::SELF_FIRST);
        }
 }
index 15d2cdb0f97378ac111b2e93153521fffebecefb..eebbefcadb688c95e1d2eaeb71568ce27d3da6a8 100644 (file)
@@ -19,7 +19,7 @@ interface IExtendedModificationLogHandler {
         *
         * @return string[]
         */
-       public function getAvailableActions(): array;
+       public function getAvailableActions();
        
        /**
         * Processes a list of items by converting them into IViewableModificationLog
@@ -28,5 +28,5 @@ interface IExtendedModificationLogHandler {
         * @param ModificationLog[] $items
         * @return IViewableModificationLog[]
         */
-       public function processItems(array $items): array;
+       public function processItems(array $items);
 }