Completed
Push — master ( c6a753...e758eb )
by Mike
02:16
created

Type   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 27
rs 10
wmc 2
lcom 1
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register_type() 0 5 1
A set_type() 0 7 1
1
<?php
2
namespace testContent\Abstracts;
3
4
5
/**
6
 * Class to generate a type for the admin page.
7
 *
8
 * @abstract
9
 * @package    WordPress
10
 * @subpackage Test Content
11
 * @author     Old Town Media
12
 */
13
abstract class Type{
14
15
	/**
16
	 * type
17
	 * Type of objects we'll be dealing with i.e.: post or term.
18
	 *
19
	 * @var string
20
	 * @access protected
21
	 */
22
	protected $type;
23
24
25
	public function register_type(){
26
27
		add_action( 'tc_types', 'set_type' );
28
29
	}
30
31
	public function set_type( $types ){
32
33
		$types[] = $this->type;
34
35
		return $types;
36
37
	}
38
39
}
40