- Issue created by @sidharth_soman
- Status changed to Needs work
over 1 year ago 6:44pm 10 April 2023 - ๐ฎ๐ณIndia sidharth_soman Bangalore
Finding coding standard issues as detailed in the issue summary. I will work on fixing them.
- ๐ฎ๐ณIndia sidharth_soman Bangalore
I have fixed all of the issues except for those relating to documentation. I have issued the MR against the 8.x-1.x branch.
Please review. - Issue was unassigned.
- Status changed to RTBC
over 1 year ago 5:51pm 26 April 2023 - ๐ต๐ญPhilippines kenyoOwen
Hi sidharth_soman
I applied your MR and confirmed that it resolved the issues except for those related to documentation. Please see the screenshots attached.
For your review.
Thank you. - Status changed to Needs work
over 1 year ago 7:13pm 26 April 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
* @param $form - * @param FormStateInterface $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * @param $form_id */ function field_config_cardinality_form_alter(&$form, FormStateInterface $form_state, $form_id) {
What the report says is that for hook implementation, parameters are not described. In fact, the short description for a hook implementation and sole part of its documentation comment is totally different.
- * @param FormStateInterface $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state */ -function field_config_cardinality_form_builder($entity_type, \Drupal\field\Entity\FieldConfig $config, &$form, FormStateInterface $form_state) { +function field_config_cardinality_form_builder($entity_type, FieldConfig $config, &$form, FormStateInterface $form_state) { if ($form_state->getValue('cardinality') === 'number' && $form_state->getValue('cardinality_number')) { $cardinality_config = $form_state->getValue('cardinality_number'); }
The same holds true here.
/** - * Implements hook_form_alter(). + * Implements hook_form_FORM_ID_alter(). * * @param $elements - * @param FormStateInterface $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * @param $context */ function field_config_cardinality_field_widget_multivalue_form_alter(&$elements, FormStateInterface $form_state, $context) {
Those
@param
tags are not necessary.- // Implementation for multi managed_file + // Implementation for multi managed_file. if (!empty($elements['#type']) && $elements['#type'] == 'managed_file') { if (!empty($cardinality_config) && $cardinality_config >= 1) { if ($elements['#delta'] > $cardinality_config - 1) { @@ -215,7 +216,7 @@ function field_config_cardinality_field_widget_multivalue_form_alter(&$elements, } } - // Implementation for multi select type + // Implementation for multi select type. if (!empty($elements['#type']) && $elements['#type'] == 'select') {
I would rather remove those comments, since they describe something that is already clear from the code.
+/** + * + */ class CardinalityMediaLibraryWidget extends MediaLibraryWidget {
Either the documentation comment is not empty or it is not added.
- ๐ฎ๐ณIndia zkhan.aamir
zkhan.aamir โ made their first commit to this issueโs fork.
- First commit to issue fork.
- First commit to issue fork.
- Status changed to Needs review
9 months ago 11:24am 29 February 2024