Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 7 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
28 | 1 | public function main($id, $mode) |
|
29 | { |
||
30 | 1 | global $phpbb_container; |
|
1 ignored issue
–
show
|
|||
31 | |||
32 | 1 | $user = $phpbb_container->get('user'); |
|
33 | 1 | $this->tpl_name = 'acp_topic_preview'; |
|
34 | 1 | $this->page_title = $user->lang('TOPIC_PREVIEW'); |
|
35 | |||
36 | 1 | $phpbb_container->get('vse.topicpreview.acp.controller') |
|
37 | 1 | ->set_u_action($this->u_action) |
|
38 | 1 | ->handle(); |
|
39 | 1 | } |
|
40 | } |
||
41 |
Instead of relying on
global
state, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state