MDL-81525 core_course: Add missing docs

This commit is contained in:
Andrew Nicols 2024-04-14 21:27:01 +08:00
parent 4d12330d4b
commit 93619ca6ac
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14
4 changed files with 7 additions and 2 deletions

View File

@ -30,13 +30,13 @@ use stdClass;
#[\core\attribute\label('Allows plugins or features to perform actions after a course is created.')]
#[\core\attribute\tags('course')]
class after_course_created {
/**
* Constructor for the hook.
*
* @param stdClass $course The course instance.
*/
public function __construct(
/** @var stdClass The course instance */
public readonly stdClass $course,
) {
}

View File

@ -28,7 +28,6 @@ use stdClass;
#[\core\attribute\label('Allows plugins or features to perform actions after a course is updated.')]
#[\core\attribute\tags('course')]
class after_course_updated {
/**
* Constructor for the hook.
*
@ -37,8 +36,11 @@ class after_course_updated {
* @param bool $changeincoursecat Whether the course category has changed.
*/
public function __construct(
/** @var stdClass The course instance */
public readonly stdClass $course,
/** @var stdClass The old course instance */
public readonly stdClass $oldcourse,
/** @var bool Whether the course category has changed */
public readonly bool $changeincoursecat = false,
) {
}

View File

@ -39,6 +39,7 @@ class before_course_deleted implements
* @param stdClass $course The course instance.
*/
public function __construct(
/** @var stdClass The course instance */
public readonly stdClass $course,
) {
}

View File

@ -34,7 +34,9 @@ class after_cm_name_edited implements described_hook {
* @param string $newname the new name
*/
public function __construct(
/** @var cm_info the course module */
protected cm_info $cm,
/** @var string the new name */
protected string $newname,
) {
}