File tree Expand file tree Collapse file tree 3 files changed +0
-29
lines changed Expand file tree Collapse file tree 3 files changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -1201,15 +1201,6 @@ public function is_broken_description() {
12011201 return $ this ->brokentext ;
12021202 }
12031203
1204- /**
1205- * Returns true if this is an inline phpdoc comment (starting with three slashes)
1206- *
1207- * @return bool
1208- */
1209- public function is_inline () {
1210- return preg_match ('|^\s*///| ' , $ this ->originaltoken [1 ]);
1211- }
1212-
12131204 /**
12141205 * Returns the original token storing this phpdocs
12151206 *
Original file line number Diff line number Diff line change 3737
3838$ string ['error_emptynophpfile ' ] = 'The file is empty or doesn \'t contain PHP code. Skipped. ' ;
3939
40- $ string ['rule_noinlinephpdocs ' ] = 'There are no comments starting with three or more slashes ' ;
41- $ string ['error_noinlinephpdocs ' ] = 'Found comment starting with three or more slashes ' ;
42-
4340$ string ['error_phpdocsinvalidinlinetag ' ] = 'Invalid inline phpdocs tag <b>{$a->tag}</b> found ' ;
4441$ string ['rule_phpdocsinvalidinlinetag ' ] = 'Inline phpdocs tags are valid ' ;
4542
Original file line number Diff line number Diff line change 2424
2525defined ('MOODLE_INTERNAL ' ) || die;
2626
27- local_moodlecheck_registry::add_rule ('noinlinephpdocs ' )->set_callback ('local_moodlecheck_noinlinephpdocs ' );
2827local_moodlecheck_registry::add_rule ('functionarguments ' )->set_callback ('local_moodlecheck_functionarguments ' );
2928local_moodlecheck_registry::add_rule ('phpdocsinvalidinlinetag ' )->set_callback ('local_moodlecheck_phpdocsinvalidinlinetag ' );
3029local_moodlecheck_registry::add_rule ('phpdocsuncurlyinlinetag ' )->set_callback ('local_moodlecheck_phpdocsuncurlyinlinetag ' );
3130local_moodlecheck_registry::add_rule ('phpdoccontentsinlinetag ' )->set_callback ('local_moodlecheck_phpdoccontentsinlinetag ' );
3231
33- /**
34- * Checks that no comment starts with three or more slashes
35- *
36- * @param local_moodlecheck_file $file
37- * @return array of found errors
38- */
39- function local_moodlecheck_noinlinephpdocs (local_moodlecheck_file $ file ) {
40- $ errors = [];
41- foreach ($ file ->get_all_phpdocs () as $ phpdocs ) {
42- if ($ phpdocs ->is_inline ()) {
43- $ errors [] = ['line ' => $ phpdocs ->get_line_number ($ file )];
44- }
45- }
46- return $ errors ;
47- }
48-
4932/**
5033 * Check that all the inline phpdoc tags found are valid
5134 *
You can’t perform that action at this time.
0 commit comments