style: apply Moodle coding standards
Moodle Plugin CI / test (push) Successful in 1m27s

This commit is contained in:
2026-08-12 17:13:30 +00:00
parent 91111b66d3
commit 0d4bf6a208
17 changed files with 157 additions and 145 deletions
+5 -5
View File
@@ -60,7 +60,7 @@ function local_webhooks_get_list_records($limitfrom = 0, $limitnum = 0) {
function local_webhooks_get_record($serviceid = 0) {
global $DB;
$servicerecord = $DB->get_record('local_webhooks_service', array('id' => $serviceid), '*', MUST_EXIST);
$servicerecord = $DB->get_record('local_webhooks_service', ['id' => $serviceid], '*', MUST_EXIST);
if (!empty($servicerecord->events)) {
$servicerecord->events = local_webhooks_unarchive_data($servicerecord->events);
@@ -91,7 +91,7 @@ function local_webhooks_remove_list_records() {
function local_webhooks_remove_record($serviceid = 0) {
global $DB;
$DB->delete_records('local_webhooks_service', array('id' => $serviceid));
$DB->delete_records('local_webhooks_service', ['id' => $serviceid]);
local_webhooks_events::service_deleted($serviceid);
}
@@ -109,7 +109,7 @@ function local_webhooks_update_record($data, $insert = true) {
global $DB;
if (empty($data->events)) {
$data->events = array();
$data->events = [];
}
$data->events = local_webhooks_archiving_data($data->events);
@@ -167,7 +167,7 @@ function local_webhooks_restore_backup($listservices = '') {
*
* @return string
*/
function local_webhooks_archiving_data(array $data = array()) {
function local_webhooks_archiving_data(array $data = []) {
return base64_encode(gzcompress(serialize($data), 3));
}
@@ -180,4 +180,4 @@ function local_webhooks_archiving_data(array $data = array()) {
*/
function local_webhooks_unarchive_data($data = '') {
return unserialize(gzuncompress(base64_decode($data)));
}
}