Issue #3484349 by amateescu: Add missing @return types for StringTranslationTrait::formatPlural() and ::getNumberOfPlurals()
(cherry picked from commit bbfe778cb0
)
merge-requests/10256/head
parent
c9820e0e61
commit
8d08c0a6ca
File diff suppressed because it is too large
Load Diff
|
@ -75,6 +75,9 @@ trait StringTranslationTrait {
|
|||
* 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 @@ trait StringTranslationTrait {
|
|||
* 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')) {
|
||||
|
|
Loading…
Reference in New Issue