This commit is contained in:
+9
-11
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user