11<?php
22/**
3- *
4- * This file is part of the phpBB Customisation Database package.
5- *
6- * @copyright (c) phpBB Limited <https://www.phpbb.com>
7- * @license GNU General Public License, version 2 (GPL-2.0)
8- *
9- * For full copyright and license information, please see
10- * the docs/CREDITS.txt file.
11- *
12- */
3+ *
4+ * This file is part of the phpBB Customisation Database package.
5+ *
6+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
7+ * @license GNU General Public License, version 2 (GPL-2.0)
8+ *
9+ * For full copyright and license information, please see
10+ * the docs/CREDITS.txt file.
11+ *
12+ */
1313
1414namespace phpbb \titania \controller ;
1515
@@ -90,7 +90,7 @@ class search
9090 * @param \phpbb\user $user
9191 * @param \phpbb\titania\cache\service $cache
9292 * @param \phpbb\request\request_interface $request
93- * @param helper $helper
93+ * @param \phpbb\titania\controller\ helper $helper
9494 * @param type_collection $types
9595 * @param \phpbb\titania\config\config $ext_config
9696 * @param \phpbb\titania\display $display
@@ -120,10 +120,10 @@ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\drive
120120 }
121121
122122 /**
123- * Display general search form.
124- *
125- * @return \Symfony\Component\HttpFoundation\Response
126- */
123+ * Display general search form.
124+ *
125+ * @return \Symfony\Component\HttpFoundation\Response
126+ */
127127 public function general ()
128128 {
129129 $ this ->setup ();
@@ -146,10 +146,10 @@ public function general()
146146 }
147147
148148 /**
149- * Display search page for contributions.
150- *
151- * @return \Symfony\Component\HttpFoundation\Response
152- */
149+ * Display search page for contributions.
150+ *
151+ * @return \Symfony\Component\HttpFoundation\Response
152+ */
153153 public function contributions ()
154154 {
155155 $ this ->setup ();
@@ -174,10 +174,10 @@ public function contributions()
174174 }
175175
176176 /**
177- * Display general results.
178- *
179- * @return \Symfony\Component\HttpFoundation\Response
180- */
177+ * Display general results.
178+ *
179+ * @return \Symfony\Component\HttpFoundation\Response
180+ */
181181 public function general_results ()
182182 {
183183 $ search_type = $ this ->request ->variable ('type ' , 0 );
@@ -194,10 +194,10 @@ public function general_results()
194194 }
195195
196196 /**
197- * Display contribution results
198- *
199- * @return \Symfony\Component\HttpFoundation\Response
200- */
197+ * Display contribution results
198+ *
199+ * @return \Symfony\Component\HttpFoundation\Response
200+ */
201201 public function contribution_results ()
202202 {
203203 $ versions = $ this ->request ->variable ('versions ' , array ('' ));
@@ -215,10 +215,10 @@ public function contribution_results()
215215 }
216216
217217 /**
218- * Common handler for displaying general and contrib results.
219- *
220- * @return null
221- */
218+ * Common handler for displaying general and contrib results.
219+ *
220+ * @return void
221+ */
222222 public function common_results ()
223223 {
224224 $ this ->setup ();
@@ -254,11 +254,11 @@ public function common_results()
254254 }
255255
256256 /**
257- * Perform search and output results.
258- *
259- * @param string $sort_url Base sort url.
260- * @return \Symfony\Component\HttpFoundation\Response
261- */
257+ * Perform search and output results.
258+ *
259+ * @param string $sort_url Base sort url.
260+ * @return \Symfony\Component\HttpFoundation\Response
261+ */
262262 protected function show_results ($ sort_url )
263263 {
264264 // Setup the sort tool
@@ -312,14 +312,14 @@ protected function show_results($sort_url)
312312 }
313313
314314 /**
315- * Generate main query shared by general and contribution search.
316- *
317- * @param string $search_fields Fields to search: titleonly|msgonly|
318- * @param string $keywords Search keywords
319- * @param int $author_id Author id
320- *
321- * @return null
322- */
315+ * Generate main query shared by general and contribution search.
316+ *
317+ * @param string $search_fields Fields to search: titleonly|msgonly|
318+ * @param string $keywords Search keywords
319+ * @param int $author_id Author id
320+ *
321+ * @return void
322+ */
323323 protected function generate_main_query ($ search_fields , $ keywords , $ author_id )
324324 {
325325 // Keywords specified?
@@ -349,13 +349,13 @@ protected function generate_main_query($search_fields, $keywords, $author_id)
349349 }
350350
351351 /**
352- * Generate query for general search.
353- *
354- * @param int $type Search object type.
355- * @param int $contrib_id Contrib id to search.
356- *
357- * @return null
358- */
352+ * Generate query for general search.
353+ *
354+ * @param int $type Search object type.
355+ * @param int $contrib_id Contrib id to search.
356+ *
357+ * @return void
358+ */
359359 protected function generate_general_query ($ type , $ contrib_id )
360360 {
361361 // Fall back to search all if the search type doesn't exist
@@ -382,14 +382,14 @@ protected function generate_general_query($type, $contrib_id)
382382 }
383383
384384 /**
385- * Generate query for contribution search.
386- *
387- * @param array $versions Supported phpBB versions to limit search to.
388- * @param array $categories Categories to filter by.
389- * @param bool $search_subcategories Whether to search a category children.
390- *
391- * @return null
392- */
385+ * Generate query for contribution search.
386+ *
387+ * @param array $versions Supported phpBB versions to limit search to.
388+ * @param array $categories Categories to filter by.
389+ * @param bool $search_subcategories Whether to search a category children.
390+ *
391+ * @return void
392+ */
393393 protected function generate_contrib_query ($ versions , $ categories , $ search_subcategories )
394394 {
395395 if (!empty ($ categories ) && (sizeof ($ categories ) != 1 || $ categories [0 ] != 0 ))
@@ -417,10 +417,10 @@ protected function generate_contrib_query($versions, $categories, $search_subcat
417417 }
418418
419419 /**
420- * Generate query for searching all content.
421- *
422- * @return null
423- */
420+ * Generate query for searching all content.
421+ *
422+ * @return void
423+ */
424424 protected function generate_search_all_query ()
425425 {
426426 $ contrib_types = $ this ->types ->get_ids ();
@@ -448,11 +448,11 @@ protected function generate_search_all_query()
448448 }
449449
450450 /**
451- * Get author id from given username.
452- *
453- * @param string $author Author's username.
454- * @return int Return's user id or 0 if user was not found.
455- */
451+ * Get author id from given username.
452+ *
453+ * @param string $author Author's username.
454+ * @return int Return's user id or 0 if user was not found.
455+ */
456456 protected function get_author_id ($ author )
457457 {
458458 $ user = user_helper::get_user_ids_from_list ($ this ->db , $ author );
@@ -461,10 +461,10 @@ protected function get_author_id($author)
461461 }
462462
463463 /**
464- * Perform common set up tasks.
465- *
466- * @return null
467- */
464+ * Perform common set up tasks.
465+ *
466+ * @return void
467+ */
468468 protected function setup ()
469469 {
470470 // Add common lang
@@ -491,11 +491,11 @@ protected function setup()
491491 }
492492
493493 /**
494- * Assign document variables to template.
495- *
496- * @param array $documents Documents
497- * @return null
498- */
494+ * Assign document variables to template.
495+ *
496+ * @param array $documents Documents
497+ * @return void
498+ */
499499 protected function assign_doc_vars ($ documents )
500500 {
501501 foreach ($ documents as $ document )
@@ -516,13 +516,13 @@ protected function assign_doc_vars($documents)
516516 }
517517
518518 /**
519- * Get document URL.
520- *
521- * @param int $type Document object type.
522- * @param string $params Serialized array of parameters.
523- *
524- * @return string
525- */
519+ * Get document URL.
520+ *
521+ * @param int $type Document object type.
522+ * @param string|array $params Serialized array of parameters.
523+ *
524+ * @return string
525+ */
526526 protected function get_document_url ($ type , $ params )
527527 {
528528 $ params = unserialize ($ params );
@@ -554,11 +554,11 @@ protected function get_document_url($type, $params)
554554 }
555555
556556 /**
557- * Assign result page template variables.
558- *
559- * @param int $match_count Number of matches found.
560- * @return null
561- */
557+ * Assign result page template variables.
558+ *
559+ * @param int $match_count Number of matches found.
560+ * @return void
561+ */
562562 protected function assign_result_vars ($ match_count )
563563 {
564564 $ this ->template ->assign_vars (array (
0 commit comments