Skip to content

Commit

Permalink
Linting: Run phpcbf
Browse files Browse the repository at this point in the history
  • Loading branch information
georgmaisser committed Sep 25, 2023
1 parent 0d9b647 commit a333570
Show file tree
Hide file tree
Showing 100 changed files with 170 additions and 171 deletions.
2 changes: 1 addition & 1 deletion backup/moodle2/backup_datalynx_activity_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected function define_my_steps() {
* Code the transformations to perform in the activity in
* order to get transportable (encoded) links
*/
static public function encode_content_links($content) {
public static function encode_content_links($content) {
global $CFG;

$base = preg_quote($CFG->wwwroot, "/");
Expand Down
8 changes: 4 additions & 4 deletions backup/moodle2/restore_datalynx_activity_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ protected function define_my_steps() {
* Define the contents in the activity that must be
* processed by the link decoder
*/
static public function define_decode_contents() {
public static function define_decode_contents() {
$contents = array();

$contents[] = new restore_decode_content('datalynx', array('intro'), 'datalynx');
Expand All @@ -160,7 +160,7 @@ static public function define_decode_contents() {
* Define the decoding rules for links belonging
* to the activity to be executed by the link decoder
*/
static public function define_decode_rules() {
public static function define_decode_rules() {
$rules = array();

$rules[] = new restore_decode_rule('DFINDEX', '/mod/datalynx/index.php?id=$1', 'course');
Expand Down Expand Up @@ -200,7 +200,7 @@ static public function define_decode_rules() {
* It must return one array
* of {@link restore_log_rule} objects
*/
static public function define_restore_log_rules() {
public static function define_restore_log_rules() {
$rules = array();

$rules[] = new restore_log_rule('datalynx', 'add',
Expand Down Expand Up @@ -250,7 +250,7 @@ static public function define_restore_log_rules() {
* by the restore final task, but are defined here at
* activity level. All them are rules not linked to any module instance (cmid = 0)
*/
static public function define_restore_log_rules_for_course() {
public static function define_restore_log_rules_for_course() {
$rules = array();

$rules[] = new restore_log_rule('datalynx', 'view all', 'index.php?id={course}', null);
Expand Down
2 changes: 1 addition & 1 deletion behavior/behavior_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function get_teammemberselect_fields(): array {
public function get_allusers() {
global $DB;
$allusers = [];
$tempusers = $DB->get_records('user', array(), '', $fields='id, firstname, lastname');
$tempusers = $DB->get_records('user', array(), '', $fields = 'id, firstname, lastname');

foreach($tempusers as $userdata) {
// Remove empties to make list more usable.
Expand Down
2 changes: 1 addition & 1 deletion classes/event/course_module_instance_list_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
defined('MOODLE_INTERNAL') or die();

class course_module_instance_list_viewed extends \core\event\course_module_instance_list_viewed {
}
}
2 changes: 1 addition & 1 deletion classes/event/course_module_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ protected function init() {
$this->data['objecttable'] = 'datalynx';
parent::init();
}
}
}
2 changes: 1 addition & 1 deletion classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,4 +409,4 @@ protected static function sql_fields() {
de.approved AS entryapproved, de.groupid AS entrygroupid, de.userid AS entryuserid';
}

}
}
2 changes: 1 addition & 1 deletion db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

defined('MOODLE_INTERNAL') or die();

$functions = array();
$functions = array();
4 changes: 2 additions & 2 deletions entries_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -595,14 +595,14 @@ public function process_entries(string $action, string $eids, $data = null, bool
) {
unset($entries[$eid]);
$capname = get_string('datalynx:approve', 'mod_datalynx');
$errorstring .= get_string('missingrequiredcapability', 'webservice', $capname) ;
$errorstring .= get_string('missingrequiredcapability', 'webservice', $capname);
$errorstring .= get_string('affectedid', 'mod_datalynx', $eid) . '<br>';
// Filter managable entries.
} else {
if (!$dl->user_can_manage_entry($entry)) {
unset($entries[$eid]);
$capname = get_string('updateentry', 'mod_datalynx');
$errorstring .= get_string('missingrequiredcapability', 'webservice', $capname) ;
$errorstring .= get_string('missingrequiredcapability', 'webservice', $capname);
$errorstring .= get_string('affectedid', 'mod_datalynx', $eid) . '<br>';
}
}
Expand Down
2 changes: 1 addition & 1 deletion field/_approve/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

$plugin->component = 'datalynxfield__approve';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/_comment/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

$plugin->component = 'datalynxfield__comment';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/_entry/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

$plugin->component = 'datalynxfield__entry';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/_rating/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

$plugin->component = 'datalynxfield__rating';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/_status/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

$plugin->component = 'datalynxfield__status';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/_time/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield__time';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/checkbox/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/checkbox/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_checkbox';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/coursegroup/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/coursegroup/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_coursegroup';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/datalynxview/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/datalynxview/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function render_edit_mode(MoodleQuickForm &$mform, stdClass $entry, array
$entryid = $entry->id;
$fieldname = "field_{$fieldid}_$entryid";
$classname = "datalynxview_{$fieldid}_{$entryid}";
$required = !empty($options ['required']);
$required = !empty($options['required']);

$selected = !empty($entry->{"c{$fieldid}_content"}) ? $entry->{"c{$fieldid}_content"} : array();
// A hidden field is added to autocomplete fields by parent Quickform element.
Expand Down
2 changes: 1 addition & 1 deletion field/datalynxview/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_datalynxview';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/duration/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/duration/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_duration';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/editor/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/editor/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_editor';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/entryauthor/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/entryauthor/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

$plugin->component = 'datalynxfield_entryauthor';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/entrygroup/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/entrygroup/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_entrygroup';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
6 changes: 3 additions & 3 deletions field/field_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ public function options_menu($forceget = false, $addnoselection = false) {
* @param array $map
* @return mixed
*/
public abstract function update_options($map = array());
abstract public function update_options($map = array());

/**
* When an option from a single/multi choice is deleted / renamed or added
Expand Down Expand Up @@ -935,7 +935,7 @@ public function set_field($forminput = null) {
unset($newvalues[$id]);
}
}

// NOTE: We don't use this code ever, test till 30.04.2021 and remove after.
if ($this->field->type != "multiselect") {
$dummyentry = "0";
Expand Down Expand Up @@ -1324,7 +1324,7 @@ public function get_disabled_values_for_user($entryid = 0) {
AND de.id != :entryid
GROUP BY dc.content
HAVING COUNT(dc.id) >= :selectlimit";
$params = array('dataid' => $this->df->id(), 'fieldid' => $this->field->id,
$params = array('dataid' => $this->df->id(), 'fieldid' => $this->field->id,
'selectlimit' => $this->field->param5, 'entryid' => $entryid);

$results = $DB->get_records_sql($sql, $params);
Expand Down
4 changes: 2 additions & 2 deletions field/fieldgroup/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class datalynxfield_fieldgroup_renderer extends datalynxfield_renderer {
*/
public function render_display_mode(stdClass $entry, array $params) {
global $OUTPUT;

// We want to display these fields.
$fieldgroupfields = $this->get_subfields();

Expand Down Expand Up @@ -190,7 +190,7 @@ public function render_edit_mode(MoodleQuickForm &$mform, stdClass $entry, array

// Hide unused lines.
global $PAGE;
$PAGE->requires->js_call_amd('mod_datalynx/fieldgroups', 'init',
$PAGE->requires->js_call_amd('mod_datalynx/fieldgroups', 'init',
array($this->_field->field->name, $defaultlines, $maxlines, $requiredlines, $fieldname));

// Show a button to add one more line.
Expand Down
2 changes: 1 addition & 1 deletion field/fieldgroup/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_fieldgroup';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/file/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/file/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_file';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/gradeitem/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/gradeitem/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_gradeitem';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/identifier/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/identifier/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_identifier';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/multiselect/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/multiselect/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_multiselect';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/number/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
2 changes: 1 addition & 1 deletion field/number/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

$plugin->component = 'datalynxfield_number';
$plugin->version = 2015092200;
$plugin->requires = 2014051200;
$plugin->requires = 2014051200;
2 changes: 1 addition & 1 deletion field/picture/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class provider implements
public static function get_reason() : string {
return 'privacy:metadata';
}
}
}
Loading

0 comments on commit a333570

Please sign in to comment.