Conditions | 2 |
Paths | 2 |
Total Lines | 23 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function buildForm(array $form, FormStateInterface $form_state) { |
||
21 | |||
22 | $styles = []; |
||
23 | |||
24 | foreach (\Drupal\image\Entity\ImageStyle::loadMultiple() as $name => $style) { |
||
25 | $styles[$name] = $style->label(); |
||
26 | } |
||
27 | |||
28 | $form['description'] = [ |
||
29 | '#markup' => '<p>' . t('Image derivatives can be created in bulk manually to remove the need for Drupal to create them on page load.') . '</p>', |
||
30 | ]; |
||
31 | $form['image_styles'] = [ |
||
32 | '#type' => 'checkboxes', |
||
33 | '#options' => $styles, |
||
34 | '#title' => $this->t('Which derivatives would you like to create?'), |
||
35 | '#description' => $this->t('Select all image styles that should be created. If none are selected, all image derivatives will be created.'), |
||
36 | ]; |
||
37 | $form['run'] = [ |
||
38 | '#type' => 'submit', |
||
39 | '#value' => t('Create derivatives'), |
||
40 | ]; |
||
41 | |||
42 | return $form; |
||
43 | } |
||
54 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.