Skip to content

Commit 35077a2

Browse files
committed
Fix phpdoc errors
1 parent 611c9d8 commit 35077a2

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

classes/helper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,18 +252,18 @@ public static function send_email($courseid) {
252252
/**
253253
* Count broken links
254254
*
255-
* @param $courseid
255+
* @param int $courseid
256256
* @throws \dml_exception
257257
*/
258-
public static function count_broken_links($courseid) {
258+
public static function count_broken_links(int $courseid) {
259259
global $DB;
260260
$sql = "SELECT count(1) AS count
261261
FROM {tool_crawler_url} b
262262
LEFT JOIN {tool_crawler_edge} l ON l.b = b.id
263263
LEFT JOIN {tool_crawler_url} a ON l.a = a.id
264264
LEFT JOIN {course} c ON c.id = a.courseid
265-
WHERE b.httpcode != '200' AND c.id = $courseid";
266-
return $DB->count_records_sql($sql);
265+
WHERE b.httpcode != '200' AND c.id = :courseid";
266+
return $DB->count_records_sql($sql, ['courseid'=> $courseid]);
267267
}
268268

269269
}

classes/table/course_links.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
class course_links extends table_sql implements renderable {
3535

3636
private $courseid;
37+
38+
private $page;
3739
/**
3840
* table constructor.
3941
*

locallib.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
* @param string $redirect The final URL if a redirect was served.
4343
* @param string $labelishtml Whether the $label parameter contains an HTML snippet (if true) or plain text (if false). Defaults to
4444
* plain text.
45+
* @param int $courseid course id
4546
* @return string HTML snippet which can be used in output.
4647
*/
4748
function tool_crawler_link($url, $label, $redirect = '', $labelishtml = false, $courseid = 0) {
@@ -241,6 +242,7 @@ function tool_crawler_url_gen_table($data) {
241242
* Generates and returns a full HTML page with details about a URL.
242243
*
243244
* @param string $url The URL.
245+
* @param int $courseid course id
244246
* @return string A HTML page about the URL.
245247
*/
246248
function tool_crawler_url_create_page($url, $courseid = 0) {

renderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class tool_crawler_renderer extends plugin_renderer_base {
2929

3030
/**
3131
* Render table.
32-
* @param dismissed_notice $table dismissed notice table
32+
* @param course_links $table course_links table
3333
* @return false|string
3434
*/
3535
public function render_course_links(course_links $table) {

0 commit comments

Comments
 (0)