Skip to content

Commit

Permalink
MDL-70893 various: optional function arguments must be in the end
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Feb 15, 2021
1 parent 41037ef commit 0eada7a
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion calendar/lib.php
Expand Up @@ -2833,7 +2833,7 @@ function calendar_add_subscription($sub) {
* @throws dml_exception A DML specific exception is thrown for invalid subscriptionids.
* @return int Code: CALENDAR_IMPORT_EVENT_UPDATED = updated, CALENDAR_IMPORT_EVENT_INSERTED = inserted, 0 = error
*/
function calendar_add_icalendar_event($event, $unused = null, $subscriptionid, $timezone='UTC') {
function calendar_add_icalendar_event($event, $unused, $subscriptionid, $timezone='UTC') {
global $DB;

// Probably an unsupported X-MICROSOFT-CDO-BUSYSTATUS event.
Expand Down
2 changes: 1 addition & 1 deletion calendar/renderer.php
Expand Up @@ -316,7 +316,7 @@ public function course_filter_selector(moodle_url $returnurl, $label = null, $co
* @param string $importresults
* @return string
*/
public function subscription_details($unused = null, $subscriptions, $importresults = '') {
public function subscription_details($unused, $subscriptions, $importresults = '') {
$table = new html_table();
$table->head = array(
get_string('colcalendar', 'calendar'),
Expand Down
2 changes: 1 addition & 1 deletion course/lib.php
Expand Up @@ -3066,7 +3066,7 @@ public function delete() {
* @param string $message
* @param int|null $courseid
*/
protected function notify($touser, $fromuser, $name='courserequested', $subject, $message, $courseid = null) {
protected function notify($touser, $fromuser, $name, $subject, $message, $courseid = null) {
$eventdata = new \core\message\message();
$eventdata->courseid = empty($courseid) ? SITEID : $courseid;
$eventdata->component = 'moodle';
Expand Down
2 changes: 1 addition & 1 deletion grade/edit/tree/lib.php
Expand Up @@ -57,7 +57,7 @@ class grade_edit_tree {
/**
* Constructor
*/
public function __construct($gtree, $moving=false, $gpr) {
public function __construct($gtree, $moving, $gpr) {
global $USER, $OUTPUT, $COURSE;

$systemdefault = get_config('moodle', 'grade_report_showcalculations');
Expand Down
2 changes: 1 addition & 1 deletion lib/deprecatedlib.php
Expand Up @@ -3281,7 +3281,7 @@ function user_get_total_participants($courseid, $groupid = 0, $accesssince = 0,
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
* @return moodle_recordset
*/
function user_get_participants($courseid, $groupid = 0, $accesssince, $roleid, $enrolid = 0, $statusid, $search,
function user_get_participants($courseid, $groupid, $accesssince, $roleid, $enrolid, $statusid, $search,
$additionalwhere = '', $additionalparams = array(), $sort = '', $limitfrom = 0, $limitnum = 0) {
global $DB;

Expand Down
2 changes: 1 addition & 1 deletion lib/phpunit/classes/util.php
Expand Up @@ -916,7 +916,7 @@ public static function run_all_adhoc_tasks() {
* or the name of the static class when calling a static method.
* @return mixed the respective return value of the method.
*/
public static function call_internal_method($object, $methodname, array $params = array(), $classname) {
public static function call_internal_method($object, $methodname, array $params, $classname) {
$reflection = new \ReflectionClass($classname);
$method = $reflection->getMethod($methodname);
$method->setAccessible(true);
Expand Down
2 changes: 1 addition & 1 deletion lib/rsslib.php
Expand Up @@ -488,7 +488,7 @@ function rss_end_tag($tag,$level=0,$endline=true) {
* @param array $attributes the attributes of the xml tag
* @return string the whole xml element
*/
function rss_full_tag($tag,$level=0,$endline=true,$content,$attributes=null) {
function rss_full_tag($tag, $level, $endline, $content, $attributes = null) {
$st = rss_start_tag($tag,$level,$endline,$attributes);
$co="";
$co = preg_replace("/\r\n|\r/", "\n", htmlspecialchars($content));
Expand Down
2 changes: 1 addition & 1 deletion message/externallib.php
Expand Up @@ -2920,7 +2920,7 @@ public static function get_message_processor_parameters() {
* @throws moodle_exception
* @since 3.2
*/
public static function get_message_processor($userid = 0, $name) {
public static function get_message_processor($userid, $name) {
global $USER, $PAGE, $CFG;

// Check if messaging is enabled.
Expand Down
2 changes: 1 addition & 1 deletion mnet/peer.php
Expand Up @@ -49,7 +49,7 @@ class mnet_peer {
* @param int $application - table id - what kind of peer are we talking to
* @return bool - indication of success or failure
*/
function bootstrap($wwwroot, $pubkey = null, $application) {
function bootstrap($wwwroot, $pubkey, $application) {
global $DB;

if (substr($wwwroot, -1, 1) == '/') {
Expand Down
2 changes: 1 addition & 1 deletion mod/assign/externallib.php
Expand Up @@ -2080,7 +2080,7 @@ public static function save_grades_parameters() {
* @return null
* @since Moodle 2.7
*/
public static function save_grades($assignmentid, $applytoall = false, $grades) {
public static function save_grades($assignmentid, $applytoall, $grades) {
global $CFG, $USER;

$params = self::validate_parameters(self::save_grades_parameters(),
Expand Down
2 changes: 1 addition & 1 deletion mod/assign/feedback/editpdf/classes/pdf.php
Expand Up @@ -395,7 +395,7 @@ public function add_comment($text, $x, $y, $width, $colour = 'yellow') {
* @param string $imagefolder - Folder containing stamp images.
* @return bool true if successful (always)
*/
public function add_annotation($sx, $sy, $ex, $ey, $colour = 'yellow', $type = 'line', $path, $imagefolder) {
public function add_annotation($sx, $sy, $ex, $ey, $colour, $type, $path, $imagefolder) {
global $CFG;
if (!$this->filename) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion mod/data/tests/search_test.php
Expand Up @@ -1016,7 +1016,7 @@ public function test_attach_files() {
* @param mod_data $data
* @return void
*/
protected function create_default_data_fields($fieldtypes = array(), $data) {
protected function create_default_data_fields($fieldtypes, $data) {
$count = 1;

// Creating test Fields with default parameter values.
Expand Down
2 changes: 1 addition & 1 deletion mod/forum/externallib.php
Expand Up @@ -2179,7 +2179,7 @@ public static function delete_post_returns() {
* @param string $sortdirection
* @return array
*/
public static function get_discussion_posts_by_userid(int $userid = 0, int $cmid, ?string $sortby, ?string $sortdirection) {
public static function get_discussion_posts_by_userid(int $userid, int $cmid, ?string $sortby, ?string $sortdirection) {
global $USER, $DB;
// Validate the parameter.
$params = self::validate_parameters(self::get_discussion_posts_by_userid_parameters(), [
Expand Down
2 changes: 1 addition & 1 deletion mod/forum/lib.php
Expand Up @@ -1159,7 +1159,7 @@ function forum_get_readable_forums($userid, $courseid=0) {
* @param string $extrasql
* @return array|bool Array of posts found or false
*/
function forum_search_posts($searchterms, $courseid=0, $limitfrom=0, $limitnum=50,
function forum_search_posts($searchterms, $courseid, $limitfrom, $limitnum,
&$totalcount, $extrasql='') {
global $CFG, $DB, $USER;
require_once($CFG->libdir.'/searchlib.php');
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/lib.php
Expand Up @@ -2467,7 +2467,7 @@ function glossary_end_tag($tag,$level=0,$endline=true) {
* @param string $content
* @return string
*/
function glossary_full_tag($tag,$level=0,$endline=true,$content) {
function glossary_full_tag($tag, $level, $endline, $content) {
global $CFG;

$st = glossary_start_tag($tag,$level,$endline);
Expand Down
2 changes: 1 addition & 1 deletion mod/scorm/datamodels/scormlib.php
Expand Up @@ -812,7 +812,7 @@ function scorm_get_available_children($sco) {
}
}

function scorm_get_available_descendent($descend = array(), $sco) {
function scorm_get_available_descendent($descend, $sco) {
if ($sco == null) {
return $descend;
} else {
Expand Down
2 changes: 1 addition & 1 deletion privacy/classes/tests/request/content_writer.php
Expand Up @@ -277,7 +277,7 @@ public function get_all_metadata(array $subcontext = []) {
* @param boolean $valueonly Whether to fetch only the value, rather than the value + description.
* @return array The metadata as a series of keys to value + descrition objects.
*/
public function get_metadata(array $subcontext = [], $key, $valueonly = true) {
public function get_metadata(array $subcontext, $key, $valueonly = true) {
$keys = $this->get_all_metadata($subcontext);

if (isset($keys[$key])) {
Expand Down
2 changes: 1 addition & 1 deletion question/classes/bank/search/category_condition.php
Expand Up @@ -66,7 +66,7 @@ class category_condition extends condition {
* @param \stdClass $course Course record
* @param integer $maxinfolength The maximum displayed length of the category info.
*/
public function __construct($cat = null, $recurse = false, $contexts, $baseurl, $course, $maxinfolength = null) {
public function __construct($cat, $recurse, $contexts, $baseurl, $course, $maxinfolength = null) {
$this->cat = $cat;
$this->recurse = $recurse;
$this->contexts = $contexts;
Expand Down
2 changes: 1 addition & 1 deletion report/insights/classes/output/insight.php
Expand Up @@ -64,7 +64,7 @@ class insight implements \renderable, \templatable {
* @param \context $context
* @return void
*/
public function __construct(\core_analytics\prediction $prediction, \core_analytics\model $model, $includedetailsaction = false,
public function __construct(\core_analytics\prediction $prediction, \core_analytics\model $model, $includedetailsaction,
\context $context) {

$this->prediction = $prediction;
Expand Down
2 changes: 1 addition & 1 deletion repository/flickr_public/lib.php
Expand Up @@ -341,7 +341,7 @@ public function get_listing($path = '', $page = 1) {
* @param int $page
* @return array
*/
private function build_list($photos, $page = 1, &$ret) {
private function build_list($photos, $page, &$ret) {
global $OUTPUT;

if (!empty($this->nsid)) {
Expand Down

0 comments on commit 0eada7a

Please sign in to comment.