Completed
Pull Request — staging (#840)
by
unknown
15:43
created

Hidden   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 11 1
1
<?php
2
/**
3
 * YIKES Inc. Easy Mailchimp Forms Plugin.
4
 *
5
 * @package YIKES\EasyForms
6
 * @author  Freddie Mixell
7
 * @license GPL2
8
 */
9
10
namespace YIKES\EasyForms\Field;
11
12
use YIKES\EasyForms\Exception\InvalidField;
13
14
/**
15
 * Class Hidden
16
 *
17
 * @since   %VERSION%
18
 * @package YIKES\EasyForms
19
 */
20
class Hidden extends BaseField {
21
22
	/**
23
	 * Render the field.
24
	 *
25
	 * @since %VERSION%
26
	 */
27
	public function render() {
28
		$classes = 'emf-field-hidden';
0 ignored issues
show
Unused Code introduced by
$classes is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

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.

Loading history...
29
		?>
30
		<input type="hidden"
31
			class=""
32
			name=""
33
			id=""
34
			value=""
35
		/>
36
		<?php
37
	}
38
}
39