File tree 3 files changed +0
-29
lines changed
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() {
1201
1201
return $ this ->brokentext ;
1202
1202
}
1203
1203
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
-
1213
1204
/**
1214
1205
* Returns the original token storing this phpdocs
1215
1206
*
Original file line number Diff line number Diff line change 37
37
38
38
$ string ['error_emptynophpfile ' ] = 'The file is empty or doesn \'t contain PHP code. Skipped. ' ;
39
39
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
-
43
40
$ string ['error_phpdocsinvalidinlinetag ' ] = 'Invalid inline phpdocs tag <b>{$a->tag}</b> found ' ;
44
41
$ string ['rule_phpdocsinvalidinlinetag ' ] = 'Inline phpdocs tags are valid ' ;
45
42
Original file line number Diff line number Diff line change 24
24
25
25
defined ('MOODLE_INTERNAL ' ) || die;
26
26
27
- local_moodlecheck_registry::add_rule ('noinlinephpdocs ' )->set_callback ('local_moodlecheck_noinlinephpdocs ' );
28
27
local_moodlecheck_registry::add_rule ('functionarguments ' )->set_callback ('local_moodlecheck_functionarguments ' );
29
28
local_moodlecheck_registry::add_rule ('phpdocsinvalidinlinetag ' )->set_callback ('local_moodlecheck_phpdocsinvalidinlinetag ' );
30
29
local_moodlecheck_registry::add_rule ('phpdocsuncurlyinlinetag ' )->set_callback ('local_moodlecheck_phpdocsuncurlyinlinetag ' );
31
30
local_moodlecheck_registry::add_rule ('phpdoccontentsinlinetag ' )->set_callback ('local_moodlecheck_phpdoccontentsinlinetag ' );
32
31
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
-
49
32
/**
50
33
* Check that all the inline phpdoc tags found are valid
51
34
*
You can’t perform that action at this time.
0 commit comments