libresign/bkp/signer/lib/Controller/HandleParamsTrait.php
Vitor Mattos ce1c08ce26 backup
2021-01-07 13:57:24 -03:00

17 lines
366 B
PHP

<?php
namespace OCA\Signer\Controller;
use OCA\Signer\Exception\SignerException;
trait HandleParamsTrait
{
protected function checkParams(array $params): void
{
foreach ($params as $key => $param) {
if (empty($param)) {
throw new SignerException("parameter '{$key}' is required!", 400);
}
}
}
}