Small code refactoring
This commit is contained in:
@@ -75,8 +75,7 @@ function local_webhooks_cache_reset() {
|
||||
* @return string
|
||||
*/
|
||||
function local_webhooks_serialization_data($data) {
|
||||
$result = serialize($data);
|
||||
return $result;
|
||||
return serialize($data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,8 +85,7 @@ function local_webhooks_serialization_data($data) {
|
||||
* @return array|object
|
||||
*/
|
||||
function local_webhooks_deserialization_data($data) {
|
||||
$result = unserialize($data);
|
||||
return $result;
|
||||
return unserialize($data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,6 +122,7 @@ class local_webhooks_events {
|
||||
public static function response_answer($objectid = 0, $response = array()) {
|
||||
$context = context_system::instance();
|
||||
$status = "Error sending request";
|
||||
|
||||
if (!empty($response["HTTP/1.1"])) {
|
||||
$status = $response["HTTP/1.1"];
|
||||
}
|
||||
|
Reference in New Issue
Block a user