Completed
Pull Request — 3.1.x (#130)
by Matt
02:11
created

inactive   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A get_condition_type() 0 4 1
A get_condition_field() 0 4 1
A get_condition_type_name() 0 4 1
A ignore_user_types() 0 4 1
1
<?php
2
/**
3
*
4
* Auto Groups extension for the phpBB Forum Software package.
5
*
6
* @copyright (c) 2014 phpBB Limited <https://www.phpbb.com>
7
* @license GNU General Public License, version 2 (GPL-2.0)
8
*
9
*/
10
11
namespace phpbb\autogroups\conditions\type;
12
13
/**
14
 * Auto Groups Inactive users class
15
 */
16
class inactive extends \phpbb\autogroups\conditions\type\membership
17
{
18
	/**
19
	 * Get condition type
20
	 *
21
	 * @return string Condition type
22
	 * @access public
23
	 */
24
	public function get_condition_type()
25
	{
26
		return 'phpbb.autogroups.type.inactive';
27
	}
28
29
	/**
30
	 * Get condition field (this is the field to check)
31
	 *
32
	 * @return string Condition field name
33
	 * @access public
34
	 */
35
	public function get_condition_field()
36
	{
37
		return 'user_inactive_time';
38
	}
39
40
	/**
41
	 * Get condition type name
42
	 *
43
	 * @return string Condition type name
44
	 * @access public
45
	 */
46
	public function get_condition_type_name()
47
	{
48
		return $this->user->lang('AUTOGROUPS_TYPE_INACTIVE');
49
	}
50
51
	/**
52
	 * An array of user types to ignore when querying users
53
	 *
54
	 * @return array Array of user types
55
	 * @access protected
56
	 */
57
	protected function ignore_user_types()
58
	{
59
		return array(USER_IGNORE);
60
	}
61
}
62