Various::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
namespace DummyPress\Views;
3
use DummyPress\Abstracts as Abs;
4
5
/**
6
 * Generate view for other various test content action
7
 *
8
 * @abstract
9
 * @package    WordPress
10
 * @subpackage Test Content
11
 * @author     Mike Selander
12
 */
13
class Various extends Abs\View {
14
15
	public function __construct() {
16
17
		$this->title	= __( 'Various', 'dummybot' );
18
		$this->type		= 'all';
19
		$this->priority	= 10;
20
21
	}
22
23
24
	/**
25
	 * Our sections action block - button to create and delete.
26
	 *
27
	 * @access protected
28
	 *
29
	 * @return string HTML content.
30
	 */
31 View Code Duplication
	protected function actions_section() {
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
32
		$html = '';
33
34
		$html .= "<div class='test-data-cpt'>";
35
36
			$html .= "<h3>";
37
38
				$html .= "<span class='label'>" . esc_html__( 'Clean Site', 'dummybot' ) . "</span>";
39
				$html .= $this->build_button( 'delete', 'all', __( 'Delete All Test Data', 'dummybot' ) );
40
41
			$html .= "</h3>";
42
43
		$html .= "</div>";
44
45
		return $html;
46
	}
47
48
49
	/**
50
	 * We don't need any options on this page, so returning it empty
51
	 *
52
	 * @access protected
53
	 *
54
	 * @param string $html Existing HTML content.
55
	 * @return string HTML section content.
56
	 */
57
	protected function options_section( $html = '' ) {
58
		return $html;
59
	}
60
61
}
62