main_module   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 28
rs 10
ccs 7
cts 7
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A main() 0 17 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\ucp;
12
13
/**
14
 * Advertisement management ACP module.
15
 */
16
class main_module
17
{
18
	public $page_title;
19
	public $tpl_name;
20
	public $u_action;
21
22
	/**
23
	 * Main UCP module
24
	 *
25
	 * @throws \Exception
26
	 */
27 1
	public function main()
28
	{
29 1
		global $phpbb_container;
30
31
		/** @var \phpbb\ads\controller\ucp_controller $ucp_controller */
32 1
		$ucp_controller = $phpbb_container->get('phpbb.ads.ucp.controller');
33
34
		// Make the $u_action url available in the UCP controller
35 1
		$ucp_controller->set_page_url($this->u_action);
36
37
		// Load a template
38 1
		$this->tpl_name = 'ucp_ads_stats';
39
40
		// Set the page title for our UCP page
41 1
		$this->page_title = 'UCP_PHPBB_ADS_STATS';
42
43 1
		$ucp_controller->main();
44 1
	}
45
}
46