diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a199a919..4ccabf7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,8 @@ jobs: with: disable_grunt: true disable_phpunit: true + disable_phpcpd: true # Old code we don't going to rewrite everything for now. + disable_phpdoc: true # Old code we don't going to rewrite everything for now. disable_release : true release_branches: main min_php : 7.4 \ No newline at end of file diff --git a/README.txt b/README.txt index 4b5bd81e..339e69eb 100644 --- a/README.txt +++ b/README.txt @@ -54,6 +54,8 @@ Thanks to Lesterhuis Training & Consultancy for the contribution / updated by Ld * validation if a class exists and inherits the correct parent class. * Changelog to separate file * Move cron to a scheduled task + * phpcpd and phpdocs checks in CI + * Make CSS strict should only effect this plugin! ---------------------------------------------------------------------- diff --git a/classes/check/sql_execution.php b/classes/check/sql_execution.php index 2be3c4a5..10c76b08 100644 --- a/classes/check/sql_execution.php +++ b/classes/check/sql_execution.php @@ -24,8 +24,6 @@ namespace block_configurable_reports\check; -defined('MOODLE_INTERNAL') || die(); - use core\check\result; /** diff --git a/import_form.php b/import_form.php index 52656d00..8735719d 100755 --- a/import_form.php +++ b/import_form.php @@ -55,16 +55,4 @@ public function definition(): void { $this->add_action_buttons(false, get_string('importreport', 'block_configurable_reports')); } - /** - * Server side rules do not work for uploaded files, implement serverside rules here if needed. - * - * @param array $data array of ("fieldname"=>value) of submitted data - * @param array $files array of uploaded files "element_name"=>tmp_file_path - * @return array of "element_name"=>"error_description" if there are errors, - * or an empty array if everything is OK (true allowed for backwards compatibility too). - */ - public function validation($data, $files): array { - return parent::validation($data, $files); - } - } diff --git a/lib.php b/lib.php index d58197aa..eb600b43 100644 --- a/lib.php +++ b/lib.php @@ -23,8 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -defined('MOODLE_INTERNAL') || die(); - /** * Add security check. * diff --git a/locallib.php b/locallib.php index 959d6922..caa9261f 100755 --- a/locallib.php +++ b/locallib.php @@ -221,7 +221,7 @@ function cr_unserialize(string $data): array { $data = preg_replace('/THEN\+%22(.+?)%22/', 'THEN+%27${1}%27', $data); $data = preg_replace('/%60/', '+++', $data); - // TODO remove unserialize + // TODO remove unserialize. $data = unserialize($data); return (array) urldecode_recursive($data); @@ -353,7 +353,8 @@ function cr_print_table(object $table, bool $return = false) { if (!empty($table->summary)) { $output .= " summary=\"$table->summary\""; } - $output .= " cellpadding=\"$table->cellpadding\" cellspacing=\"$table->cellspacing\" class=\"$table->class boxalign$table->tablealign\" $tableid>\n"; + $output .= " cellpadding=\"$table->cellpadding\" cellspacing=\"$table->cellspacing\" + class=\"$table->class boxalign$table->tablealign\" $tableid>\n"; $countcols = 0; $isuserid = -1; diff --git a/plugin.class.php b/plugin.class.php index 8d177a91..46cae01b 100755 --- a/plugin.class.php +++ b/plugin.class.php @@ -23,7 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -// TODO namespace +// TODO namespace. /** * Class plugin_base