Skip to content

Commit

Permalink
fix codechecker errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamara Gunkel committed Feb 10, 2022
1 parent f78be01 commit d920586
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 37 deletions.
5 changes: 1 addition & 4 deletions classes/admin_setting_configeditabletable.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@

namespace tool_opencast;

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

/**
* Admin setting class which is used to create an editable table.
*
* @package tool_opencast
* @copyright 2021 Tamara Gunkel, University of Münster
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class admin_setting_configeditabletable extends \admin_setting
{
class admin_setting_configeditabletable extends \admin_setting {
/** @var string Id of the div tag */
private $divid;

Expand Down
5 changes: 1 addition & 4 deletions classes/admin_setting_configtextwithvalidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,14 @@
use admin_category;
use core_plugin_manager;

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

/**
* Admin setting class for OC instances setting.
*
* @package tool_opencast
* @copyright 2021 Tamara Gunkel, University of Münster
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class admin_setting_configtextwithvalidation extends \admin_setting_configtext
{
class admin_setting_configtextwithvalidation extends \admin_setting_configtext {
/**
* Validate data before storage
* @param mixed $data
Expand Down
7 changes: 1 addition & 6 deletions classes/empty_configuration_exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,13 @@

namespace tool_opencast;


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


/**
* Exception, which is thrown when the tool settings are empty.
*
* @package tool_opencast
* @copyright 2021 Tamara Gunkel, University of Münster
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class empty_configuration_exception extends \moodle_exception
{
class empty_configuration_exception extends \moodle_exception {

}
3 changes: 1 addition & 2 deletions classes/local/PolyfillCURLStringFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
* @copyright 2021 Tamara Gunkel <tamara.gunkel@wi.uni-muenster.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class PolyfillCURLStringFile extends \CURLFile
{
class PolyfillCURLStringFile extends \CURLFile {
/** @var string File data */
private $data;

Expand Down
5 changes: 1 addition & 4 deletions classes/local/api_testable.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@

namespace tool_opencast\local;

defined('MOODLE_INTERNAL') || die;

/**
* API used for testing
*
* @package tool_opencast
* @copyright 2021 Tamara Gunkel <tamara.gunkel@wi.uni-muenster.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class api_testable extends api
{
class api_testable extends api {

/** @var array array of json responses per endpoint */
private $jsonresponses;
Expand Down
3 changes: 1 addition & 2 deletions classes/local/settings_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
* @copyright 2021 Tamara Gunkel <tamara.gunkel@wi.uni-muenster.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class settings_api extends \curl
{
class settings_api extends \curl {

/**
* Returns the api url of an Opencast instance.
Expand Down
5 changes: 3 additions & 2 deletions classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
* @copyright 2018 Tobias Reischmann
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace tool_opencast\privacy;
defined('MOODLE_INTERNAL') || die();

/**
* Privacy Subsystem for tool_opencast implementing null_provider.
*
Expand All @@ -35,7 +36,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
5 changes: 1 addition & 4 deletions classes/seriesmapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,14 @@

use tool_opencast\local\settings_api;

defined('MOODLE_INTERNAL') || die;

/**
* Persistable of seriesmapping
*
* @package tool_opencast
* @copyright 2018 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class seriesmapping extends \core\persistent
{
class seriesmapping extends \core\persistent {

/** Table name for the persistent. */
const TABLE = 'tool_opencast_series';
Expand Down
2 changes: 0 additions & 2 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

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

/**
* Execute opencast upgrade from the given old version
*
Expand Down
3 changes: 1 addition & 2 deletions external.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
* @copyright 2018 Tobias Reischmann <tobias.reischmann@wi.uni-muenster.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_opencast_external extends external_api
{
class tool_opencast_external extends external_api {

/**
* Describes the parameters for getting courses for a opencast instructor.
Expand Down
3 changes: 2 additions & 1 deletion settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@
get_string('lticonsumerkey_desc', 'tool_opencast'), "");
$settings->add($lticonsumerkeysetting);

$lticonsumersecretsetting = new admin_setting_configpasswordunmask('tool_opencast/lticonsumersecret_' . $instance->id,
$lticonsumersecretsetting = new admin_setting_configpasswordunmask(
'tool_opencast/lticonsumersecret_' . $instance->id,
get_string('lticonsumersecret', 'tool_opencast'),
get_string('lticonsumersecret_desc', 'tool_opencast'), "");
$settings->add($lticonsumersecretsetting);
Expand Down
2 changes: 0 additions & 2 deletions tests/generator/behat_tool_opencast_generator.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();


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

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

/**
* Tool opencast test data generator class
*
Expand Down

0 comments on commit d920586

Please sign in to comment.