Commit 8d08c0a6 authored by catch's avatar catch
Browse files

Issue #3484349 by amateescu: Add missing @return types for...

Issue #3484349 by amateescu: Add missing @return types for StringTranslationTrait::formatPlural() and ::getNumberOfPlurals()

(cherry picked from commit bbfe778c)
parent c9820e0e
Loading
Loading
Loading
Loading
Loading
+0 −2328

File changed.

Preview size limit exceeded, changes collapsed.

+6 −0
Original line number Diff line number Diff line
@@ -75,6 +75,9 @@ protected function t($string, array $args = [], array $options = []) {
   * Formats a string containing a count of items.
   *
   * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural()
   *
   * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup
   *   An object that, when cast to a string, returns the translated string.
   */
  protected function formatPlural($count, $singular, $plural, array $args = [], array $options = []) {
    return new PluralTranslatableMarkup($count, $singular, $plural, $args, $options, $this->getStringTranslation());
@@ -84,6 +87,9 @@ protected function formatPlural($count, $singular, $plural, array $args = [], ar
   * Returns the number of plurals supported by a given language.
   *
   * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals()
   *
   * @return int
   *   The number of plurals supported.
   */
  protected function getNumberOfPlurals($langcode = NULL) {
    if (\Drupal::hasService('locale.plural.formula')) {