Fix return type of `count()` for the remaining classes implementing \Countable
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 20 Sep 2021 13:48:03 +0000 (15:48 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 20 Sep 2021 13:48:03 +0000 (15:48 +0200)
see 3f6b343d10b044ab08d41fec525f69ffe0a95e49

13 files changed:
wcfsetup/install/files/lib/data/comment/StructuredComment.class.php
wcfsetup/install/files/lib/data/label/group/ViewableLabelGroup.class.php
wcfsetup/install/files/lib/data/menu/item/MenuItemNode.class.php
wcfsetup/install/files/lib/data/page/PageNode.class.php
wcfsetup/install/files/lib/data/smiley/category/SmileyCategory.class.php
wcfsetup/install/files/lib/system/MetaTagHandler.class.php
wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php
wcfsetup/install/files/lib/system/breadcrumb/Breadcrumbs.class.php
wcfsetup/install/files/lib/system/html/toc/HtmlTocItem.class.php
wcfsetup/install/files/lib/system/label/object/type/LabelObjectTypeContainer.class.php
wcfsetup/install/files/lib/system/message/quote/QuotedMessage.class.php
wcfsetup/install/files/lib/system/search/acp/ACPSearchResultList.class.php
wcfsetup/install/files/lib/system/user/GroupedUserList.class.php

index b225d41c59e0c36858953b879868d621f200d933..786c73d55de59c0291118ddef4ad90f0ab508b15 100644 (file)
@@ -166,7 +166,7 @@ class StructuredComment extends DatabaseObjectDecorator implements \Countable, \
     /**
      * @inheritDoc
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->responses);
     }
index 3e57254224614ae940351ce95c3315d89bba0ebd..f9923c7b0e969709cb8c274941ed79bce71dfaa6 100644 (file)
@@ -171,7 +171,7 @@ class ViewableLabelGroup extends DatabaseObjectDecorator implements \Countable,
     /**
      * @inheritDoc
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->labels);
     }
index 42531c79090e00801b62a47a037a5607d01c6392..47ea28c62cf2854da3a29ff9304f413335ea6c66 100644 (file)
@@ -93,10 +93,8 @@ class MenuItemNode extends DatabaseObjectDecorator implements \Countable, \Recur
 
     /**
      * Returns the number of children.
-     *
-     * @return  int
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->children);
     }
index 5e18aae9ed460c9e2f55981c699efcd2caa8c420..8279740f63e63038fe09b7a24de6824e28b3b9a7 100644 (file)
@@ -87,10 +87,8 @@ class PageNode extends DatabaseObjectDecorator implements \Countable, \Recursive
 
     /**
      * Returns the number of children.
-     *
-     * @return  int
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->children);
     }
index 53ceb156f4c9ce17dc7b9f2a1ea721f0a2b7bead..ac43aed81c6b4015414e976556388b974a2caaf8 100644 (file)
@@ -57,7 +57,7 @@ class SmileyCategory extends AbstractDecoratedCategory implements \Countable, IT
     /**
      * @inheritDoc
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->smilies);
     }
index 36c74c2857317b54e474d4b3fe996e55d883f593..68ed3f1bd963f5e40470d671919e1f1c62dec58b 100644 (file)
@@ -100,7 +100,7 @@ class MetaTagHandler extends SingletonFactory implements \Countable, \Iterator
     /**
      * @inheritDoc
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->objects);
     }
index b6c6d06202bdad464ea13c587accb1c45373db34..f74b5b5921a89463fb428258b121dac66c691ee0 100644 (file)
@@ -111,7 +111,7 @@ class AttachmentHandler implements \Countable
     /**
      * @inheritDoc
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->getAttachmentList());
     }
index 781edc9e2b6eea9dff73ef92d4380934a0ff1ee7..27bc9f50af3729d6660a642f8f2695896ed93c80 100644 (file)
@@ -123,7 +123,7 @@ class Breadcrumbs extends SingletonFactory implements \Countable, \Iterator
     /**
      * @inheritDoc
      */
-    public function count()
+    public function count(): int
     {
         if ($this->items === null) {
             $this->loadBreadcrumbs();
index a1912fa90155b5ba0f71e5b4250cced88c95e97e..8f9d08e23ff0bb8bf6438bc3beaef4b4ed80ce4e 100644 (file)
@@ -94,10 +94,8 @@ class HtmlTocItem implements \Countable, \RecursiveIterator
 
     /**
      * Returns the number of children.
-     *
-     * @return        int
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->children);
     }
index ac6c2d9e057f241493e61819b2350eab97eb5edb..7b797c05fa5cedc9a9a8e9fbcfe228e0066f840a 100644 (file)
@@ -116,7 +116,7 @@ class LabelObjectTypeContainer implements \Countable, \Iterator
     /**
      * @inheritDoc
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->objectTypes);
     }
index 94f3cf87efd2f635e858ccc4f359cb5be8bcebb3..c38c57993c7b543883b542225bcf621c60f3bee1 100644 (file)
@@ -160,7 +160,7 @@ class QuotedMessage implements \Countable, \Iterator
     /**
      * @inheritDoc
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->quotes);
     }
index 5e8c2b6f313cad2846856f1b6df8ffe491eea045..81611b87a00310daac306791484fe086eb3afdbc 100644 (file)
@@ -120,7 +120,7 @@ class ACPSearchResultList implements \Countable, \Iterator
     /**
      * @inheritDoc
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->results);
     }
index ffff722a4d6108db81985607d89a3b0b249b2c73..6a7dcc5c970154f69083d1466a9ec2e71e395a34 100644 (file)
@@ -132,7 +132,7 @@ class GroupedUserList implements \Countable, \Iterator
     /**
      * @inheritDoc
      */
-    public function count()
+    public function count(): int
     {
         return \count($this->userIDs);
     }