- Issue created by @pdureau
- Issue was unassigned.
- Status changed to Needs work
about 1 year ago 6:18pm 1 July 2024 - π«π·France pdureau Paris
- run prettier on YML files >> DONE
- run twig linter on Twig files >> DONE
- update module descriptions in info files >> DONE
- check if all phpunit tests are running
- fix some PHPCS or PHPMD feedbacks
Can you do the rest? Especially PHPMD unused local variables:
modules/ui_patterns_blocks/src/Plugin/Derivative/EntityComponentBlock.php:17 UnusedLocalVariable Avoid unused local variables such as '$component_id'. modules/ui_patterns_devel/tests/src/Unit/TwigValidatorRulePluginTest.php:282 UnusedPrivateMethod Avoid unused private methods such as 'processNodeWithPrivateFunc'. modules/ui_patterns_field_formatters/src/Plugin/Field/FieldFormatter/ComponentFormatterBase.php:292 UnusedLocalVariable Avoid unused local variables such as '$prop_id'. modules/ui_patterns_field_formatters/src/Plugin/Field/FieldFormatter/ComponentFormatterBase.php:299 UnusedLocalVariable Avoid unused local variables such as '$slots_id'. modules/ui_patterns_field_formatters/src/Plugin/Field/FieldFormatter/ComponentFormatterBase.php:303 UnusedLocalVariable Avoid unused local variables such as '$source_id'. modules/ui_patterns_views/src/Plugin/views/row/ComponentRow.php:98 UnusedFormalParameter Avoid unused parameters such as '$form'. modules/ui_patterns_views/src/Plugin/views/row/ComponentRow.php:98 UnusedFormalParameter Avoid unused parameters such as '$form_state'. modules/ui_patterns_views/src/Plugin/views/style/ComponentStyle.php:108 UnusedLocalVariable Avoid unused local variables such as '$delta_group'. modules/ui_patterns_views/src/Plugin/views/style/ComponentStyle.php:131 UnusedLocalVariable Avoid unused local variables such as '$group_fields'. modules/ui_patterns_views/src/Plugin/views/style/ComponentStyle.php:140 UnusedLocalVariable Avoid unused local variables such as '$delta_group'. modules/ui_patterns_views/src/Plugin/views/style/ComponentStyle.php:208 UnusedFormalParameter Avoid unused parameters such as '$form_state'.
Mosty of them are caused by the combination between key => value loops and reference:
foreach ($form['grouping'] as $delta_group => &$group) {
- First commit to issue fork.
- π«π·France pdureau Paris
thanks.
Why do we have empty methods in src/Plugin/Derivative/EntityFieldSourceDeriverBase.php :
/** * Get derivative definitions per entity bundle field. * * @param string $entity_type_id * The entity type id. * @param string $bundle * The bundle. * @param string $field_name * The field name. * @param array $base_plugin_derivative * The base plugin derivative. */ protected function getDerivativeDefinitionsForEntityBundleField(string $entity_type_id, string $bundle, string $field_name, array $base_plugin_derivative): void { } /** * Get derivative definitions per entity field storage. * * @param string $entity_type_id * The entity type id. * @param string $field_name * The field name. * @param array $base_plugin_derivative * The base plugin derivative. */ protected function getDerivativeDefinitionsForEntityStorageField(string $entity_type_id, string $field_name, array $base_plugin_derivative): void { } /** * Get derivative definitions per entity field storage. * * @param string $entity_type_id * The entity type id. * @param string $field_name * The field name. * @param string $property * The property. * @param array $base_plugin_derivative * The base plugin derivative. */ protected function getDerivativeDefinitionsForEntityStorageFieldProperty(string $entity_type_id, string $field_name, string $property, array $base_plugin_derivative): void { }
- Assigned to just_like_good_vibes
- π«π·France just_like_good_vibes PARIS
The Empty methods you have pinpointed are the default behavior for plugin derivers that will derive the class. instead of turning all methods abstract and forcing child classes to define an empty method when not used, i have preferred to set an empty method by default and child classes derive and override the implementation they need.
- π©πͺGermany Christian.wiedemann
Christian.wiedemann β made their first commit to this issueβs fork.
- Assigned to pdureau
- π«π·France pdureau Paris
Thanks, i take the ticket for some linting.
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 8:07am 3 July 2024 - Assigned to just_like_good_vibes
- Status changed to Needs work
about 1 year ago 8:38am 3 July 2024 - Status changed to RTBC
about 1 year ago 9:48am 3 July 2024 - π«π·France just_like_good_vibes PARIS
seems ok, i reviewed the changes (without re-tesing the UI)
- π«π·France just_like_good_vibes PARIS
i just did a few UI tests, seems ok
-
pdureau β
committed bffa0c4d on 2.0.x
Issue #3458364 by pdureau, just_like_good_vibes, Christian.wiedemann:...
-
pdureau β
committed bffa0c4d on 2.0.x
- Issue was unassigned.
- Status changed to Fixed
about 1 year ago 11:23am 3 July 2024 - Status changed to Fixed
about 1 year ago 1:44pm 3 July 2024