1 | <?php |
||
12 | class topic |
||
13 | { |
||
14 | /** @var \phpbb\config\config */ |
||
15 | protected $config; |
||
16 | |||
17 | /** @var \phpbb\controller\helper */ |
||
18 | protected $controller_helper; |
||
19 | |||
20 | /** @var \phpbb\event\dispatcher_interface */ |
||
21 | protected $phpbb_dispatcher; |
||
22 | |||
23 | /** @var \phpbb\language\language */ |
||
24 | protected $language; |
||
25 | |||
26 | /** @var \phpbb\template\template */ |
||
27 | protected $template; |
||
28 | |||
29 | /** @var \phpbb\user */ |
||
30 | protected $user; |
||
31 | |||
32 | /* @var \blitze\content\services\helper */ |
||
33 | protected $helper; |
||
34 | |||
35 | /** |
||
36 | * Construct |
||
37 | * |
||
38 | * @param \phpbb\config\config $config Config object |
||
39 | * @param \phpbb\controller\helper $controller_helper Controller Helper object |
||
40 | * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object |
||
41 | * @param \phpbb\language\language $language Language object |
||
42 | * @param \phpbb\template\template $template Template object |
||
43 | * @param \phpbb\user $user User object |
||
44 | * @param \blitze\content\services\helper $helper Content helper object |
||
45 | */ |
||
46 | public function __construct(\phpbb\config\config $config, \phpbb\controller\helper $controller_helper, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \blitze\content\services\helper $helper) |
||
56 | |||
57 | /** |
||
58 | * @param string $type |
||
59 | * @param array $topic_data |
||
60 | * @param array $topic_tracking_info |
||
61 | * @return array |
||
62 | */ |
||
63 | public function get_min_topic_info($type, array &$topic_data, array $topic_tracking_info) |
||
80 | |||
81 | /** |
||
82 | * @param string $type |
||
83 | * @param array $topic_data |
||
84 | * @param array $post_data |
||
85 | * @param array $users_cache |
||
86 | * @param array $attachments |
||
87 | * @param array $topic_tracking_info |
||
88 | * @param array $update_count |
||
89 | * @return array |
||
90 | */ |
||
91 | public function get_summary_template_data($type, array &$topic_data, array $post_data, array $users_cache, array &$attachments, array $topic_tracking_info, array &$update_count) |
||
119 | |||
120 | /** |
||
121 | * @param string $type |
||
122 | * @param array $topic_data |
||
123 | * @param array $post_data |
||
124 | * @param array $users_cache |
||
125 | * @param array $attachments |
||
126 | * @param array $topic_tracking_info |
||
127 | * @param array $update_count |
||
128 | * @param string $mode |
||
129 | * @return array |
||
130 | */ |
||
131 | public function get_detail_template_data($type, array &$topic_data, array $post_data, array $users_cache, array &$attachments, array $topic_tracking_info, array &$update_count, $mode = '') |
||
155 | |||
156 | /** |
||
157 | * @param string $type |
||
158 | * @param array $topic_data |
||
159 | * @return string |
||
160 | */ |
||
161 | public function get_topic_url($type, array $topic_data) |
||
169 | |||
170 | /** |
||
171 | * @param array $attachments |
||
172 | * @param int $post_id |
||
173 | * @param string $handle |
||
174 | * @return void |
||
175 | */ |
||
176 | public function show_attachments(array $attachments, $post_id, $handle = 'attachment') |
||
188 | |||
189 | /** |
||
190 | * @param array $post_data |
||
191 | * @param array $attachments |
||
192 | * @param array $update_count |
||
193 | * @return array |
||
194 | */ |
||
195 | protected function get_parsed_text(array $post_data, array &$attachments, array &$update_count) |
||
207 | |||
208 | /** |
||
209 | * @param string $type |
||
210 | * @param array $topic_data |
||
211 | * @param array $post_data |
||
212 | * @return array |
||
213 | */ |
||
214 | protected function get_topic_status_data($type, array $topic_data, array $post_data) |
||
228 | |||
229 | /** |
||
230 | * @param array $topic_data |
||
231 | * @param array $post_data |
||
232 | * @return array |
||
233 | */ |
||
234 | protected function get_mini_post_url(array $topic_data, array $post_data) |
||
243 | |||
244 | /** |
||
245 | * @param array $row |
||
246 | * @param array $users_cache |
||
247 | * @return array |
||
248 | */ |
||
249 | protected function show_edit_reason(array $row, array $users_cache) |
||
264 | |||
265 | /** |
||
266 | * @param array $row |
||
267 | * @param array $users_cache |
||
268 | * @return array |
||
269 | */ |
||
270 | protected function show_delete_reason(array $row, array $users_cache) |
||
292 | |||
293 | /** |
||
294 | * @param array $row |
||
295 | * @param string $display_postername |
||
296 | * @param string $display_username |
||
297 | * @return string |
||
298 | */ |
||
299 | protected function get_delete_message(array $row, $display_postername, $display_username) |
||
310 | } |
||
311 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.