[CORE][Event] Make all events return \EventResult, enforced at container build time

This commit is contained in:
2022-04-03 21:40:32 +01:00
parent aef1fac536
commit d4b7e990ce
60 changed files with 345 additions and 239 deletions

View File

@@ -31,6 +31,7 @@ use App\Core\Modules\Plugin;
use App\Util\Common;
use App\Util\Exception\ClientException;
use App\Util\Exception\ServerException;
use EventResult;
/**
* Check attachment file size quotas
@@ -57,7 +58,7 @@ class FileQuota extends Plugin
* @throws ClientException
* @throws ServerException
*/
public function onEnforceUserFileQuota(int $filesize, int $user_id): bool
public function onEnforceUserFileQuota(int $filesize, int $user_id): EventResult
{
$query = <<<'END'
select sum(at.size) as total
@@ -104,7 +105,7 @@ class FileQuota extends Plugin
*
* @return bool true hook value
*/
public function onPluginVersion(array &$versions): bool
public function onPluginVersion(array &$versions): EventResult
{
$versions[] = [
'name' => 'FileQuota',