Using ResourceLoader.php as example:
$ php maintenance/mwdoc-filter.php includes/resourceloader/ResourceLoader.php
== Before ==
Filtered code:
/** Associative mapping ... */ protected array $moduleInfos = array();
/** $config */ private Config $config;
Note descriptions containing a leading slash which was matched after the type
hint in the original code.
== After ==
Filtered code:
/** Associative mapping ... */ protected array $moduleInfos = array();
/** $config */ private Config $config;
Change-Id: Idcdd487ad0f4fbabdd5665abfbb8492f5bac655a
. '\s+'
// Type hint
. '([^\s]+)'
. '\s+'
// Type hint
. '([^\s]+)'
// Any text or line(s) between type hint and '/' closing the comment
// (includes the star of "*/")
. '([^/]+)'
// Any text or line(s) between type hint and '/' closing the comment
// (includes the star of "*/")
. '([^/]+)'