Completed
Pull Request — develop (#1328)
by Naveen
02:57
created

Entity_List   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
get_jsonld_data() 0 1 ?
save_jsonld_data() 0 1 ?
clear_data() 0 1 ?
remove_entity_by_id() 0 1 ?
1
<?php
2
namespace Wordlift\Vocabulary\Data\Entity_List;
3
/**
4
 * @since 3.30.0
5
 * @author Naveen Muthusamy <[email protected]>
6
 */
7
8
abstract class Entity_List {
9
	/**
10
	 * @var int
11
	 */
12
	protected $term_id;
13
14
	/**
15
	 * Entity constructor.
16
	 *
17
	 * @param $term_id int
18
	 */
19
	public function __construct( $term_id ) {
20
		$this->term_id = $term_id;
21
	}
22
23
	/**
24
	 * Return a structure of jsonld data.
25
	 * @return array
26
	 */
27
	abstract  public function get_jsonld_data();
28
29
	/**
30
	 * @param $entity_data array
31
	 *
32
	 * @return bool
33
	 */
34
	abstract  public function save_jsonld_data( $entity_data );
35
36
	/**
37
	 * Clear the data on the meta.
38
	 * @return bool
39
	 */
40
	abstract public function clear_data();
41
42
	abstract public function remove_entity_by_id( $entity_id );
43
}