Completed
Pull Request — develop (#1328)
by
unknown
03:09
created

Term_Count_Factory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A get_instance() 0 6 2
1
<?php
2
namespace Wordlift\Vocabulary\Data\Term_Count;
3
/**
4
 * This is the factory class for creating different term count objects.
5
 * @since 3.30.0
6
 * @author Naveen Muthusamy <[email protected]>
7
 */
8
class Term_Count_Factory {
9
10
	const CACHED_TERM_COUNT = 'cached_term_count';
11
12
	public static function get_instance( $type ) {
13
		if  ($type === self::CACHED_TERM_COUNT) {
14
			return new Cached_Term_Count( new Default_Term_Count() );
15
		}
16
		return null;
17
	}
18
19
20
21
}