1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-24 09:55:33 +02:00

MDL-51239 blog: Coding style fixes.

This commit is contained in:
Adrian Greeve 2015-12-08 13:28:17 +08:00
parent 0e32a56591
commit f0899a2560
2 changed files with 10 additions and 6 deletions

@ -35,7 +35,7 @@ require_once($CFG->dirroot .'/blog/lib.php');
* @param int $tagid The id of the row in the tag table that identifies the RSS Feed
* @return string
*/
function blog_rss_get_url($contextid, $userid, $filtertype, $filterselect=0, $tagid =0) {
function blog_rss_get_url($contextid, $userid, $filtertype, $filterselect = 0, $tagid = 0) {
$componentname = 'blog';
$additionalargs = null;
@ -70,7 +70,7 @@ function blog_rss_get_url($contextid, $userid, $filtertype, $filterselect=0, $ta
* @param int $tagid The id of the row in the tag table that identifies the RSS Feed
* @param string $tooltiptext The tooltip to be displayed with the link
*/
function blog_rss_print_link($context, $filtertype, $filterselect=0, $tagid =0, $tooltiptext='') {
function blog_rss_print_link($context, $filtertype, $filterselect = 0, $tagid = 0, $tooltiptext = '') {
global $CFG, $USER, $OUTPUT;
if (!isloggedin()) {
@ -93,7 +93,7 @@ function blog_rss_print_link($context, $filtertype, $filterselect=0, $tagid =0,
* @param int $filterselect The id of the item defined by $filtertype
* @param int $tagid The id of the row in the tag table that identifies the RSS Feed
*/
function blog_rss_add_http_header($context, $title, $filtertype, $filterselect=0, $tagid =0) {
function blog_rss_add_http_header($context, $title, $filtertype, $filterselect = 0, $tagid = 0) {
global $PAGE, $USER, $CFG;
if (!isloggedin()) {
@ -279,7 +279,7 @@ function blog_rss_get_feed($context, $args) {
* @param int $tagid The id of the row in the tag table that identifies the RSS Feed
* @return string
*/
function blog_rss_file_name($type, $id, $tagid =0) {
function blog_rss_file_name($type, $id, $tagid = 0) {
global $CFG;
if ($tagid) {
@ -298,7 +298,7 @@ function blog_rss_file_name($type, $id, $tagid =0) {
* @param string $contents The contents of the RSS Feed file
* @return bool whether the save was successful or not
*/
function blog_rss_save_file($type, $id, $tagid =0, $contents='') {
function blog_rss_save_file($type, $id, $tagid = 0, $contents = '') {
global $CFG;
$status = true;

@ -58,7 +58,11 @@ class core_bloglib_testcase extends advanced_testcase {
$group->id = $DB->insert_record('groups', $group);
// Create default user.
$user = $this->getDataGenerator()->create_user(array('username' => 'testuser', 'firstname' => 'Jimmy', 'lastname' => 'Kinnon'));
$user = $this->getDataGenerator()->create_user(array(
'username' => 'testuser',
'firstname' => 'Jimmy',
'lastname' => 'Kinnon'
));
// Create default tag.
$tag = new stdClass();