[CORE][Event] Make all events return \EventResult, enforced at container build time
This commit is contained in:
@@ -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',
|
||||
|
Reference in New Issue
Block a user