Completed
Push — master ( aa04da...b6760c )
by J.D.
02:59
created

WordPoints_Hook_Arg_Current_Site   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get_value() 0 3 1
A get_title() 0 3 1
1
<?php
2
3
/**
4
 * Current Site hook arg class.
5
 *
6
 * @package wordpoints-hooks-api
7
 * @since   1.0.0
8
 */
9
10
/**
11
 * Represents the current Site as a hook arg.
12
 *
13
 * @since 1.0.0
14
 */
15
class WordPoints_Hook_Arg_Current_Site extends WordPoints_Hook_Arg {
16
17
	/**
18
	 * @since 1.0.0
19
	 */
20
	public function get_value() {
21
		return get_current_blog_id();
22
	}
23
24
	/**
25
	 * @since 1.0.0
26
	 */
27
	public function get_title() {
28
		return __( 'Site', 'wordpoints' );
29
	}
30
}
31
32
// EOF
33