-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed as not planned
Description
Description
Hi there!
I would like to propose following syntax sugar:
/** @var SurveyTemplate[] $templates */
$templateIds = array_map(SurveyTemplate::getId(...), $templates);
As the replacement for more verbose instance method call:
/** @var SurveyTemplate[] $templates */
$templateIds = array_map(static fn (SurveyTemplate $surveyTemplate): Uuid => $surveyTemplate->getId(), $templates);
Currently, first class callable methods allow to wrap only static method, while in current place non-static method is suggested to use.
Please, let me know what you think about it.