Add missing @return types for StringTranslationTrait::formatPlural() and ::getNumberOfPlurals()

Created on 29 October 2024, about 2 months ago

Problem/Motivation

Since ✨ Enforce return types in all new methods and functions RTBC , any new code that wants to use \Drupal\Core\StringTranslation\StringTranslationTrait has to add two new entries to the PHPStan baseline file.

Steps to reproduce

Observe the pipeline failure for https://git.drupalcode.org/issue/drupal-3425081/-/jobs/3143353, which was executed for this MR: https://git.drupalcode.org/project/drupal/-/merge_requests/9116

Proposed resolution

Add missing doxygen type hint to ::formatPlural() and ::getNumberOfPlurals().

Remaining tasks

Review.

User interface changes

Nope.

Introduced terminology

Nope.

API changes

Nope.

Data model changes

Nope.

Release notes snippet

Nope.

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

base system

Created by

πŸ‡·πŸ‡΄Romania amateescu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024