1 | <?php |
||
20 | class EntityBrowserWizard extends EntityFormWizardBase { |
||
21 | |||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | public function getWizardLabel() { |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | public function getMachineLabel() { |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | public function getEntityType() { |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function exists() { |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function getOperations($cached_values) { |
||
54 | $a = 1; |
||
|
|||
55 | return [ |
||
56 | 'general' => [ |
||
57 | 'title' => $this->t('General information'), |
||
58 | 'form' => GeneralInfoConfig::class, |
||
59 | ], |
||
60 | 'display' => [ |
||
61 | 'title' => $this->t('Display'), |
||
62 | 'form' => DisplayConfig::class, |
||
63 | ], |
||
64 | 'widget_selector' => [ |
||
65 | 'title' => $this->t('Widget selector'), |
||
66 | 'form' => WidgetSelectorConfig::class, |
||
67 | ], |
||
68 | 'selection_display' => [ |
||
69 | 'title' => $this->t('Selection display'), |
||
70 | 'form' => SelectionDisplayConfig::class, |
||
71 | ], |
||
72 | 'widgets' => [ |
||
73 | 'title' => $this->t('Widgets'), |
||
74 | 'form' => WidgetsConfig::class, |
||
75 | ], |
||
76 | ]; |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | public function finish(array &$form, FormStateInterface $form_state) { |
||
86 | |||
87 | } |
||
88 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.