Passed
Pull Request — master (#8)
by
unknown
12:51
created

akismet_module::main()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 16
rs 10
c 0
b 0
f 0
ccs 9
cts 9
cp 1
crap 1
1
<?php
2
/**
3
 *
4
 * Akismet. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2018 Jakub Senko <[email protected]>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace senky\akismet\acp;
12
13
/**
14
 * ACP page for configuring Gothick Akismet: API key, Akismet, etc.
15
 *
16
 * @author matt
17
 *
18
 */
19
class akismet_module
20
{
21
	public $page_title;
22
	public $tpl_name;
23
	public $u_action;
24
25 1
	public function main()
26
	{
27 1
		global $phpbb_container;
28
29
		/** @var \phpbb\language\language $language */
30 1
		$language = $phpbb_container->get('language');
31 1
		$language->add_lang('akismet_acp', 'senky/akismet');
32
33
		/* @var $admin_controller \senky\akismet\controller\admin_controller */
34 1
		$admin_controller = $phpbb_container->get('senky.akismet.admin.controller');
35 1
		$admin_controller->set_action($this->u_action);
36
37 1
		$this->tpl_name = 'akismet_body';
38 1
		$this->page_title = $language->lang('ACP_AKISMET_TITLE');
39
40 1
		$admin_controller->display_settings();
41 1
	}
42
}
43