diff --git a/ltix/classes/helper.php b/ltix/classes/helper.php index a42b9cd1e8c45..8d550fa3cc305 100644 --- a/ltix/classes/helper.php +++ b/ltix/classes/helper.php @@ -406,7 +406,7 @@ public static function tool_configuration_from_content_item($typeid, $messagetyp * * @return stdClass Form config for the item */ - public static function content_item_to_form(object $tool, object $typeconfig, object $item) : stdClass { + public static function content_item_to_form(object $tool, object $typeconfig, object $item): stdClass { global $OUTPUT; $config = new stdClass(); @@ -1598,7 +1598,7 @@ public static function update_config($config) { * @param string $lticoursecategories Comma separated list of course categories. * @return void */ - public static function type_add_categories(int $typeid, string $lticoursecategories = '') : void { + public static function type_add_categories(int $typeid, string $lticoursecategories = ''): void { global $DB; $coursecategories = explode(',', $lticoursecategories); foreach ($coursecategories as $coursecategory) { @@ -2087,7 +2087,7 @@ public static function load_type_if_cartridge($type) { * @param object $instance the external tool activity settings * @return object|null */ - public static function get_instance_type(object $instance) : ?object { + public static function get_instance_type(object $instance): ?object { if (empty($instance->typeid)) { if (!$tool = self::get_tool_by_url_match($instance->toolurl, $instance->course)) { $tool = self::get_tool_by_url_match($instance->securetoolurl, $instance->course); diff --git a/ltix/classes/local/ltiopenid/registration_helper.php b/ltix/classes/local/ltiopenid/registration_helper.php index ae2fad8eb3ea0..6a2dc467865ce 100644 --- a/ltix/classes/local/ltiopenid/registration_helper.php +++ b/ltix/classes/local/ltiopenid/registration_helper.php @@ -277,11 +277,11 @@ private function add_previous_key_claim(array &$lticonfig, string $key, string $ * * @param object $config Moodle LTI Config. * @param int $typeid which is the LTI deployment id. - * @param object $type tool instance in case the tool already exists. + * @param object|null $type tool instance in case the tool already exists. * * @return array the Client Registration as an associative array. */ - public function config_to_registration(object $config, int $typeid, object $type = null): array { + public function config_to_registration(object $config, int $typeid, ?object $type = null): array { $configarray = []; foreach ((array)$config as $k => $v) { if (substr($k, 0, 4) == 'lti_') { @@ -443,7 +443,7 @@ public function sign(string $key, string $salt, string $secret): string { * * @return mixed Tool Proxy details */ - public function get_tool_proxy(int $proxyid) : array { + public function get_tool_proxy(int $proxyid): array { return helper::get_tool_proxy($proxyid); } } diff --git a/ltix/classes/local/ltiservice/resource_base.php b/ltix/classes/local/ltiservice/resource_base.php index 836ed2d8c3028..ef7618625e291 100644 --- a/ltix/classes/local/ltiservice/resource_base.php +++ b/ltix/classes/local/ltiservice/resource_base.php @@ -201,7 +201,7 @@ public function get_endpoint() { * * @param response $response Response object for this request. */ - public abstract function execute($response); + abstract public function execute($response); /** * Check to make sure the request is valid.