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
+9 -11
View File
@@ -22,8 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Description of functions of the call of events
*
@@ -41,10 +39,10 @@ class local_webhooks_events {
$context = context_system::instance();
$event = local_webhooks\event\backup_performed::create(
array(
[
'context' => $context,
'objectid' => 0,
)
]
);
$event->trigger();
@@ -60,10 +58,10 @@ class local_webhooks_events {
$context = context_system::instance();
$event = local_webhooks\event\backup_restored::create(
array(
[
'context' => $context,
'objectid' => 0,
)
]
);
$event->trigger();
@@ -78,7 +76,7 @@ class local_webhooks_events {
* @throws \coding_exception
* @throws \dml_exception
*/
public static function response_answer($objectid = 0, array $response = array()) {
public static function response_answer($objectid = 0, array $response = []) {
$context = context_system::instance();
$status = 'Error sending request';
@@ -87,11 +85,11 @@ class local_webhooks_events {
}
$event = local_webhooks\event\response_answer::create(
array(
[
'context' => $context,
'objectid' => $objectid,
'other' => array('status' => $status),
)
'other' => ['status' => $status],
]
);
$event->trigger();
@@ -150,4 +148,4 @@ class local_webhooks_events {
$event->trigger();
}
}
}