Many missing returns

Created on 2 May 2025, 7 days ago

Problem/Motivation

phpstan reports, among other things,

------ --------------------------------------------------------------------------------------------------------------
Line src/DisplayBase.php
------ --------------------------------------------------------------------------------------------------------------
167 Method Drupal\entity_browser\DisplayBase::displayEntityBrowser() should return array but return statement is
missing.
------ --------------------------------------------------------------------------------------------------------------

------ -----------------------------------------------------------------------------------------------------------
Line src/Form/EntityBrowserEditForm.php
------ -----------------------------------------------------------------------------------------------------------
464 Method Drupal\entity_browser\Form\EntityBrowserEditForm::save() should return int but return statement is
missing.
------ -----------------------------------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------------------------------------
Line src/Plugin/EntityBrowser/Display/Standalone.php
------ ------------------------------------------------------------------------------------------------------------
50 Method Drupal\entity_browser\Plugin\EntityBrowser\Display\Standalone::displayEntityBrowser() should return
array but return statement is missing.
------ ------------------------------------------------------------------------------------------------------------

------ ----------------------------------------------------------------------------------------------------------
Line src/Plugin/EntityBrowser/WidgetSelector/Tabs.php
------ ----------------------------------------------------------------------------------------------------------
52 Method Drupal\entity_browser\Plugin\EntityBrowser\WidgetSelector\Tabs::submit() should return string but
return statement is missing.
------ ----------------------------------------------------------------------------------------------------------

------ ---------------------------------------------------------------------------------------------------------
Line src/SelectionDisplayBase.php
------ ---------------------------------------------------------------------------------------------------------
116 Method Drupal\entity_browser\SelectionDisplayBase::label() should return string but return statement is
missing.
------ ---------------------------------------------------------------------------------------------------------

------ --------------------------------------------------------------------------------------------------------
Line src/WidgetSelectorBase.php
------ --------------------------------------------------------------------------------------------------------
109 Method Drupal\entity_browser\WidgetSelectorBase::submit() should return string but return statement is
missing.
------ --------------------------------------------------------------------------------------------------------

------ ---------------------------------------------------------------------------------------------------------
Line src/WidgetValidationBase.php
------ ---------------------------------------------------------------------------------------------------------
65 Method Drupal\entity_browser\WidgetValidationBase::label() should return string but return statement is
missing.
------ ---------------------------------------------------------------------------------------------------------

------ ---------------------------------------------------------------------------------------------------------
Line tests/modules/entity_browser_test/src/Plugin/EntityBrowser/Widget/PagerTestWidget.php
------ ---------------------------------------------------------------------------------------------------------
77 Method Drupal\entity_browser_test\Plugin\EntityBrowser\Widget\PagerTestWidget::prepareEntities() should
return array but return statement is missing.
------ ---------------------------------------------------------------------------------------------------------

Steps to reproduce

phpstan -l0 entity_browser

Proposed resolution

Add return statements.

Remaining tasks

Make an MR.

πŸ“Œ Task
Status

Active

Version

2.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States BenStallings

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