Fix complaints found by local_moodlecheck

This commit is contained in:
Mark Nelson 2019-05-28 23:56:02 +08:00
parent 8358280c6c
commit a26d58bf33
4 changed files with 20 additions and 1 deletions

View file

@ -442,6 +442,8 @@ class element extends \mod_customcert\element {
} }
/** /**
* Returns whether or not a range is recurring.
*
* @param \stdClass $range Range object. * @param \stdClass $range Range object.
* *
* @return bool * @return bool
@ -597,6 +599,7 @@ class element extends \mod_customcert\element {
/** /**
* Format date string based on different types of placeholders. * Format date string based on different types of placeholders.
* *
* @param string $datestring The date string
* @param array $formatdata A list of format data. * @param array $formatdata A list of format data.
* *
* @return string * @return string

View file

@ -27,6 +27,13 @@ global $CFG;
require_once($CFG->dirroot . '/mod/customcert/element/daterange/tests/fixtures/fake_datarange_element.php'); require_once($CFG->dirroot . '/mod/customcert/element/daterange/tests/fixtures/fake_datarange_element.php');
/**
* Test datarange element.
*
* @package customcertelement_daterange
* @copyright 2018 Dmitrii Metelkin <dmitriim@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class customcertelement_daterange_element_test extends advanced_testcase { class customcertelement_daterange_element_test extends advanced_testcase {
/** /**

View file

@ -24,6 +24,13 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
/**
* Fake datarange element for testing.
*
* @package customcertelement_daterange
* @copyright 2018 Dmitrii Metelkin <dmitriim@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class fake_datarange_element extends \customcertelement_daterange\element { class fake_datarange_element extends \customcertelement_daterange\element {
/** /**

View file

@ -37,7 +37,9 @@ require_once($CFG->libdir . '/tcpdf/tcpdf_barcodes_2d.php');
*/ */
class element extends \mod_customcert\element { class element extends \mod_customcert\element {
/**
* @var string The barcode type.
*/
const BARCODETYPE = 'QRCODE'; const BARCODETYPE = 'QRCODE';
/** /**