after_posts   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 24
rs 10
ccs 6
cts 6
cp 1
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get_category() 0 3 1
A will_display() 0 3 1
A get_id() 0 3 1
1
<?php
2
/**
3
 *
4
 * Advertisement management. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2017 phpBB Limited <https://www.phpbb.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace phpbb\ads\location\type;
12
13
class after_posts extends base
14
{
15
	/**
16
	 * {@inheritDoc}
17
	 */
18 26
	public function get_id()
19
	{
20 26
		return 'after_posts';
21
	}
22
23
	/**
24
	 * {@inheritDoc}
25
	 */
26 26
	public function get_category()
27
	{
28 26
		return self::CAT_IN_POSTS;
29
	}
30
31
	/**
32
	 * {@inheritDoc}
33
	 */
34 8
	public function will_display()
35
	{
36 8
		return strpos($this->user->page['page_name'], 'viewtopic') !== false;
37
	}
38
}
39