diff --git a/core/lib/Drupal/Component/Gettext/PoItem.php b/core/lib/Drupal/Component/Gettext/PoItem.php index 94eb1b8fe3..7fae18b459 100644 --- a/core/lib/Drupal/Component/Gettext/PoItem.php +++ b/core/lib/Drupal/Component/Gettext/PoItem.php @@ -159,7 +159,7 @@ public function setPlural($plural) { /** * {@inheritdoc} */ - public function setPluralCount($pluralCount) { + public function setPluralCount(int $pluralCount) { $this->pluralCount = $pluralCount; return $this; } @@ -176,7 +176,7 @@ public function isPlural() { /** * {@inheritdoc} */ - public function getPluralCount() { + public function getPluralCount(): int { return $this->pluralCount; } diff --git a/core/lib/Drupal/Component/Gettext/PoPluralCountAwareInterface.php b/core/lib/Drupal/Component/Gettext/PoPluralCountAwareInterface.php index ca0a45fe18..f3cc92fccb 100644 --- a/core/lib/Drupal/Component/Gettext/PoPluralCountAwareInterface.php +++ b/core/lib/Drupal/Component/Gettext/PoPluralCountAwareInterface.php @@ -3,7 +3,7 @@ namespace Drupal\Component\Gettext; /** - * Shared interface definition for all Gettext PO elements that need to know about plurals. + * Interface for all Gettext PO elements that need to know about plurals. */ interface PoPluralCountAwareInterface { @@ -13,7 +13,7 @@ interface PoPluralCountAwareInterface { * @return int * The plural count. */ - public function getPluralCount(); + public function getPluralCount(): int; /** * Sets the plural count. @@ -23,6 +23,6 @@ public function getPluralCount(); * * @return self */ - public function setPluralCount($pluralCount); + public function setPluralCount(int $pluralCount); } diff --git a/core/lib/Drupal/Component/Gettext/PoStreamReader.php b/core/lib/Drupal/Component/Gettext/PoStreamReader.php index 513df9045e..8f4579d159 100644 --- a/core/lib/Drupal/Component/Gettext/PoStreamReader.php +++ b/core/lib/Drupal/Component/Gettext/PoStreamReader.php @@ -136,14 +136,14 @@ public function setHeader(PoHeader $header) { /** * {@inheritdoc} */ - public function getPluralCount() { + public function getPluralCount(): int { return $this->pluralCount; } /** * {@inheritdoc} */ - public function setPluralCount($pluralCount) { + public function setPluralCount(int $pluralCount) { $this->pluralCount = $pluralCount; return $this; } diff --git a/core/lib/Drupal/Component/Gettext/PoStreamWriter.php b/core/lib/Drupal/Component/Gettext/PoStreamWriter.php index 3da14cd911..1bb2abbe02 100644 --- a/core/lib/Drupal/Component/Gettext/PoStreamWriter.php +++ b/core/lib/Drupal/Component/Gettext/PoStreamWriter.php @@ -85,14 +85,14 @@ public function setLangcode($langcode) { /** * {@inheritdoc} */ - public function getPluralCount() { + public function getPluralCount(): int { return $this->pluralCount; } /** * {@inheritdoc} */ - public function setPluralCount($pluralCount) { + public function setPluralCount(int $pluralCount) { $this->pluralCount = $pluralCount; return $this; }