Problem/Motivation

If you implement this interface the right way then PHPStan rightfully starts complaining

 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  184    Method Drupal\my_module\Plugin\search_api\datasource\MyDataSource::getViewModes() should return array<string> but returns array<string,  
         Drupal\Core\StringTranslation\TranslatableMarkup>.                                                                                                                       
         🪪  return.type                  

Steps to reproduce

Proposed resolution

Remaining tasks

Issue fork search_api-3522064

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mxr576 created an issue. See original summary.

mxr576’s picture

Status: Active » Needs review
drunken monkey’s picture

Status: Needs review » Fixed

Makes sense, thanks!
Merged.

drunken monkey’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.