1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-24 01:03:05 +02:00

[ticket/16955] Fix another batch of docblocks

PHPBB3-16955
This commit is contained in:
Marc Alexander
2022-12-26 14:50:57 +01:00
parent 96911b7403
commit 5b23dcd606
25 changed files with 93 additions and 75 deletions

View File

@@ -36,21 +36,28 @@ class handler_factory
* Return a new instance of an appropriate report handler
*
* @param string $type
* @return \phpbb\report\report_handler_interface
* @return report_handler_interface
* @throws factory_invalid_argument_exception if $type is not valid
*/
public function get_instance($type)
{
$report_handler = null;
switch ($type)
{
case 'pm':
return $this->container->get('phpbb.report.handlers.report_handler_pm');
$report_handler = $this->container->get('phpbb.report.handlers.report_handler_pm');
break;
case 'post':
return $this->container->get('phpbb.report.handlers.report_handler_post');
$report_handler = $this->container->get('phpbb.report.handlers.report_handler_post');
break;
}
if ($report_handler instanceof report_handler_interface)
{
return $report_handler;
}
throw new factory_invalid_argument_exception();
}
}