content_module::main()   A
last analyzed

Complexity

Conditions 2
Paths 3

Size

Total Lines 18
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 9
nc 3
nop 0
dl 0
loc 18
ccs 0
cts 9
cp 0
crap 6
rs 9.9666
c 0
b 0
f 0
1
<?php
2
/**
3
 *
4
 * @package sitemaker
5
 * @copyright (c) 2013 Daniel A. (blitze)
6
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
 *
8
 */
9
10
namespace blitze\content\mcp;
11
12
class content_module
13
{
14
	/** @var string */
15
	public $tpl_name;
16
17
	/** @var string */
18
	public $page_title;
19
20
	/** @var string */
21
	public $u_action;
22
23
	public function main()
24
	{
25
		global $phpbb_container, $request;
26
27
		$action = $request->variable('do', 'index');
28
29
		try
30
		{
31
			$controller = $phpbb_container->get('blitze.content.mcp.controller');
32
			$controller->handle($action, $this->u_action);
33
		}
34
		catch (\Exception $e)
35
		{
36
			trigger_error($e->getMessage());
37
		}
38
39
		$this->tpl_name = 'cp_content';
40
		$this->page_title = 'CONTENT_TYPES';
41
	}
42
}
43