These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /** |
||
4 | * @license GPL-2.0-or-later |
||
5 | */ |
||
6 | |||
7 | if ( function_exists( 'wfLoadExtension' ) ) { |
||
8 | wfLoadExtension( 'WikibaseQualityConstraints', __DIR__ . '/extension.json' ); |
||
9 | // Keep i18n globals so mergeMessageFileList.php doesn't break |
||
10 | $wgMessagesDirs['WikibaseQualityConstraints'] = __DIR__ . '/i18n'; |
||
11 | $wgExtensionMessagesFiles['WikibaseQualityConstraintsAlias'] = __DIR__ . '/WikibaseQualityConstraints.alias.php'; |
||
12 | /* wfWarn( |
||
0 ignored issues
–
show
|
|||
13 | 'Deprecated PHP entry point used for WikibaseQualityConstraints extension. ' . |
||
14 | 'Please use wfLoadExtension instead, ' . |
||
15 | 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' |
||
16 | ); */ |
||
17 | return; |
||
18 | } else { |
||
19 | die( 'This version of the WikibaseQualityConstraints extension requires MediaWiki 1.25+' ); |
||
20 | } |
||
21 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.