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

[ticket/12683] Improve exception handling

PHPBB3-12683
This commit is contained in:
Ruben Calvo
2022-12-11 16:42:02 +01:00
parent 8cea785f36
commit f9f55eb012
12 changed files with 117 additions and 5 deletions

View File

@@ -1,4 +1,15 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
use phpbb\search\backend\search_backend_interface;
@@ -103,3 +114,4 @@ class search_backend_mock implements search_backend_interface
return static::class;
}
}

View File

@@ -0,0 +1,25 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
class search_backend_mock_not_available extends search_backend_mock
{
public function get_name(): string
{
return 'Mock unavailable search backend';
}
public function is_available(): bool
{
return false;
}
}