MDL-81525 core_enrol: Add missing docs

This commit is contained in:
Andrew Nicols
2024-04-15 13:05:10 +08:00
parent a3036b79e1
commit d602b7d3e3
5 changed files with 12 additions and 4 deletions
@@ -28,7 +28,6 @@ use stdClass;
#[\core\attribute\label('Allows plugins or features to perform actions after the enrolment instance status is changed.')]
#[\core\attribute\tags('enrol')]
class after_enrol_instance_status_updated {
/**
* Constructor for the hook.
*
@@ -36,7 +35,9 @@ class after_enrol_instance_status_updated {
* @param int $newstatus The new status.
*/
public function __construct(
/** @var stdClass The enrol instance */
public readonly stdClass $enrolinstance,
/** @var int The new status */
public readonly int $newstatus,
) {
}
+2 -1
View File
@@ -28,7 +28,6 @@ use stdClass;
#[\core\attribute\label('Allows plugins or features to perform actions after a user is enrolled in a course.')]
#[\core\attribute\tags('enrol', 'user')]
class after_user_enrolled {
/**
* Constructor for the hook.
*
@@ -36,7 +35,9 @@ class after_user_enrolled {
* @param stdClass $userenrolmentinstance The user enrolment instance.
*/
public function __construct(
/** @var stdClass The enrol instance */
public readonly stdClass $enrolinstance,
/** @var stdClass The user enrolment instance */
public readonly stdClass $userenrolmentinstance,
) {
}
@@ -41,6 +41,7 @@ class before_enrol_instance_deleted implements
* @param stdClass $enrolinstance The enrol instance.
*/
public function __construct(
/** @var stdClass The enrol instance */
public readonly stdClass $enrolinstance,
) {
}
@@ -21,14 +21,13 @@ use stdClass;
/**
* Hook before a user is un-enrolled from a course for an enrolment instance.
*
* @package core
* @package core_enrol
* @copyright 2024 Safat Shahin <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
#[\core\attribute\label('Allows plugins or features to perform actions before a user enrolment is removed.')]
#[\core\attribute\tags('enrol', 'user')]
class before_user_enrolment_removed {
/**
* Constructor for the hook.
*
@@ -36,7 +35,9 @@ class before_user_enrolment_removed {
* @param stdClass $userenrolmentinstance The user enrolment instance.
*/
public function __construct(
/** @var stdClass The enrol instance */
public readonly stdClass $enrolinstance,
/** @var stdClass The user enrolment instance */
public readonly stdClass $userenrolmentinstance,
) {
}
@@ -37,9 +37,13 @@ class before_user_enrolment_updated {
* @param bool $timeendmodified Whether the time end of the enrolment has been modified.
*/
public function __construct(
/** @var stdClass The enrol instance */
public readonly stdClass $enrolinstance,
/** @var stdClass The user enrolment instance */
public readonly stdClass $userenrolmentinstance,
/** @var bool Whether the status of the enrolment has been modified */
public readonly bool $statusmodified,
/** @var bool Whether the time end of the enrolment has been modified */
public readonly bool $timeendmodified,
) {
}