Skip to content

Commit

Permalink
fix(ci): moodle code checker warning and errors
Browse files Browse the repository at this point in the history
Removed unnecessary MOODLE_INTERNAL defines.
Resolved linting php errors; unnecessary jumpspaces,
class names and brackets positions.

#taskid 19424
  • Loading branch information
dcanet-at-wiris authored and icaparros-at-wiris committed Jan 18, 2022
1 parent 051d959 commit 51aa9d6
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 40 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Last release of this plugin is 7.27.1 (9th of nov. 2021).

## [Unreleased]
- fix(ci): moodle code checker warning and errors #19424.

## v7.27.1 - 9th nov. 2021
- Fix "missing ['privacy:metadata']" from @christina-roperto contribution #86
- Improve the "MathType Moodle Plugins Suite" software development cycle.
Expand Down
3 changes: 0 additions & 3 deletions classes/moodledbcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
* @copyright WIRIS Europe (Maths for more S.L)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

class moodledbcache {

private $cachetable;
Expand Down
3 changes: 0 additions & 3 deletions classes/moodledbjsoncache.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
* @copyright WIRIS Europe (Maths for more S.L)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

class moodledbjsoncache {

private $cachetable;
Expand Down
3 changes: 0 additions & 3 deletions classes/moodlefilecache.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
* @copyright WIRIS Europe (Maths for more S.L)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

class moodlefilecache {

private $cache;
Expand Down
2 changes: 1 addition & 1 deletion classes/pluginwrapperconfigurationupdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

require_once($CFG->dirroot . '/filter/wiris/integration/lib/com/wiris/plugin/configuration/ConfigurationUpdater.interface.php');

class filter_wiris_pluginwrapperconfigurationupdater implements com_wiris_plugin_configuration_ConfigurationUpdater{
class filter_wiris_pluginwrapperconfigurationupdater implements com_wiris_plugin_configuration_ConfigurationUpdater {

private $customconfig;

Expand Down
3 changes: 0 additions & 3 deletions classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@
* @copyright WIRIS Europe (Maths for more S.L)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace filter_wiris\privacy;

defined('MOODLE_INTERNAL') || die();

/**
* Privacy Subsystem for filter_wiris implementing null_provider.
*
Expand Down
3 changes: 0 additions & 3 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
* @copyright WIRIS Europe (Maths for more S.L)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

function xmldb_filter_wiris_upgrade($oldversion) {
global $DB, $CFG;

Expand Down
2 changes: 0 additions & 2 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

/**
* Return an array with the position of the tags named $name on $code variable.
* @param String $code html code.
Expand Down
5 changes: 0 additions & 5 deletions subfilters/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
* @copyright WIRIS Europe (Maths for more S.L)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/


defined('MOODLE_INTERNAL') || die();


class filter_wiris_client extends moodle_text_filter {

/**
Expand Down
5 changes: 0 additions & 5 deletions subfilters/php.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
* @copyright WIRIS Europe (Maths for more S.L)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/


defined('MOODLE_INTERNAL') || die();


class filter_wiris_php extends moodle_text_filter {

/**
Expand Down
5 changes: 2 additions & 3 deletions tests/filter_performance_png_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
* @copyright 2016
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/

defined('MOODLE_INTERNAL') || die();

global $CFG;
require_once($CFG->dirroot . '/filter/wiris/filter.php');
require_once($CFG->dirroot . '/filter/wiris/integration/lib/com/wiris/system/CallWrapper.class.php');

class filter_wiris_filter_performance_png_testcase extends advanced_testcase
{ protected $wirisfilter;
class filter_performance_png_test extends advanced_testcase {
protected $wirisfilter;
protected $safexml;
protected $xml;
protected $imagepng;
Expand Down
5 changes: 2 additions & 3 deletions tests/filter_performance_svg_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
* @copyright 2016
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/

defined('MOODLE_INTERNAL') || die();

global $CFG;
require_once($CFG->dirroot . '/filter/wiris/filter.php');
require_once($CFG->dirroot . '/filter/wiris/integration/lib/com/wiris/system/CallWrapper.class.php');

class filter_wiris_filter_performance_svg_testcase extends advanced_testcase
{ protected $wirisfilter;
class filter_performance_svg_test extends advanced_testcase {
protected $wirisfilter;
protected $safexml;
protected $xml;
protected $image;
Expand Down
5 changes: 2 additions & 3 deletions tests/filter_without_performance_png_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@
* @copyright 2016
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/

defined('MOODLE_INTERNAL') || die();

global $CFG;
require_once($CFG->dirroot . '/filter/wiris/filter.php');

class filter_wiris_filter_noperformance_png_testcase extends advanced_testcase
{ protected $wirisfilter;
class filter_without_performance_png_test extends advanced_testcase {
protected $wirisfilter;
protected $safexml;
protected $xml;
protected $image;
Expand Down
5 changes: 2 additions & 3 deletions tests/filter_without_performance_svg_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@
* @copyright 2016
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/

defined('MOODLE_INTERNAL') || die();

global $CFG;
require_once($CFG->dirroot . '/filter/wiris/filter.php');

class filter_wiris_filter_noperformance_svg_testcase extends advanced_testcase
{ protected $wirisfilter;
class filter_without_performance_svg_test extends advanced_testcase {
protected $wirisfilter;
protected $safexml;
protected $xml;
protected $instance;
Expand Down

0 comments on commit 51aa9d6

Please sign in to comment.