Conditions | 3 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
94 | 2 | private function createForm() { |
|
95 | |||
96 | 2 | if ( !$this->canUseForm() || !is_object( $this->formPrinter ) ) { |
|
97 | 2 | return; |
|
98 | } |
||
99 | |||
100 | 2 | $form = new \Article( $this->form ); |
|
101 | 2 | $form_definition = $form->getContent(); |
|
102 | |||
103 | list ( $form_text, $javascript_text, $data_text, $form_page_title, $generated_page_name ) = |
||
104 | 2 | $this->formPrinter->formHTML( $form_definition, $this->submitState, false ); |
|
105 | |||
106 | 2 | $this->formText = $form_text; |
|
107 | 2 | $this->dataText = $data_text; |
|
108 | 2 | } |
|
109 | |||
111 |
This checks looks for assignemnts to variables using the
list(...)
function, where not all assigned variables are subsequently used.Consider the following code example.
Only the variables
$a
and$c
are used. There was no need to assign$b
.Instead, the list call could have been.