| Conditions | 4 |
| Paths | 8 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | function df_tools_content_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { |
||
| 13 | |||
| 14 | if ($form_id = 'dcd_import_form') { |
||
| 15 | $form['force-update']['#title'] = t('Override existing entities (force-update)'); |
||
| 16 | $form['force-update']['#description'] = t('The old entity will be deleted and a new entity with the same ID will be created from the imported JSON file.'); |
||
| 17 | $form['force-update']['#default_value'] = FALSE; |
||
| 18 | } |
||
| 19 | |||
| 20 | if ($form_id = 'dcd_export_form') { |
||
| 21 | $form['advanced']['tar']['#default_value'] = TRUE; |
||
| 22 | } |
||
| 23 | |||
| 24 | if ($form_id = 'dcd_export_entity_form') { |
||
| 25 | $form['tar']['#default_value'] = TRUE; |
||
| 26 | } |
||
| 28 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.