Skip to content

Commit

Permalink
MDL-82924 core_ltix: Import missed changes from commit set 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolate-lightning authored and snake committed Nov 20, 2024
1 parent 6962def commit db943ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions ltix/classes/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions ltix/classes/local/ltiopenid/registration_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_') {
Expand Down Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion ltix/classes/local/ltiservice/resource_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit db943ef

Please sign in to comment.