Carbon_Pagination_Item_HTML   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 0
Metric Value
c 5
b 0
f 0
dl 0
loc 39
ccs 8
cts 8
cp 1
rs 10
wmc 3
lcom 1
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 5 1
A get_html() 0 3 1
A set_html() 0 3 1
1
<?php
2
/**
3
 * The Carbon Pagination HTML item class.
4
 * Responsible for inserting HTML items like wrappers and separators.
5
 *
6
 * @uses Carbon_Pagination_Item
7
 */
8
class Carbon_Pagination_Item_HTML extends Carbon_Pagination_Item {
9
10
	/**
11
	 * @var string
12
	 * 
13
	 * The HTML of the item.
14
	 */
15
	protected $html = '';
16
17
	/**
18
	 * Render the item.
19
	 *
20
	 * @return string $html The HTML of the item.
21
	 */
22 2
	public function render() {
23 2
		$html = apply_filters( 'carbon_pagination_html', $this->get_html(), $this );
24
25 2
		return $html;
26
	}
27
28
	/**
29
	 * Retrieve the item HTML.
30
	 *
31
	 * @return string $html The item HTML.
32
	 */
33 1
	public function get_html() {
34 1
		return $this->html;
35
	}
36
37
	/**
38
	 * Modify the item HTML.
39
	 *
40
	 * @param string $html The new item HTML.
41
	 */
42 1
	public function set_html( $html ) {
43 1
		$this->html = $html;
44 1
	}
45
46
}