lastvisit   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 33
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get_condition_field() 0 3 1
A get_condition_type_name() 0 3 1
A get_condition_type() 0 3 1
1
<?php
2
/**
3
*
4
* Auto Groups extension for the phpBB Forum Software package.
5
*
6
* @copyright (c) 2018 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 Last Visited class
15
 */
16
class lastvisit 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.lastvisit';
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_lastvisit';
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->language->lang('AUTOGROUPS_TYPE_LASTVISIT');
49
	}
50
}
51