On my Windows machine, I was getting the following Phan warning: includes\utils\GitInfo.php:159 UnusedPluginSuppression Plugin BuiltinSuppressionPlugin suppresses issue PhanPluginDuplicateArrayKey on this line but this suppression is unused or suppressed elsewhere Indeed, this isn't a PhanPluginDuplicateArrayKey issue on Windows, since DIRECTORY_SEPARATOR is `\`; but it is a legitimate warning on other systems where DIRECTORY_SEPARATOR is `/`. Refactor the code slightly so as to not create an array with potentially duplicate keys. Change-Id: I4be38aa9fefde26d58139d74a85359961229baec |
||
|---|---|---|
| .. | ||
| AutoloadGenerator.php | ||
| BatchRowIterator.php | ||
| BatchRowUpdate.php | ||
| BatchRowWriter.php | ||
| ClassCollector.php | ||
| ExecutableFinder.php | ||
| ExtensionInfo.php | ||
| FileContentsHasher.php | ||
| GitInfo.php | ||
| MWCryptHKDF.php | ||
| MWCryptRand.php | ||
| MWFileProps.php | ||
| MWRestrictions.php | ||
| MWTimestamp.php | ||
| README | ||
| RowUpdateGenerator.php | ||
| UIDGenerator.php | ||
| UrlUtils.php | ||
| ZipDirectoryReader.php | ||
| ZipDirectoryReaderError.php | ||
The classes in this directory are general utilities for use by any part of MediaWiki. They do not favour any particular user interface and are not constrained to serve any particular feature. This is similar to includes/libs, except that some dependency on the MediaWiki framework (such as the use of Status or wfDebug()) disqualifies them from use outside of MediaWiki without modification. Utilities should not use global configuration variables, rather they should rely on the caller to configure their behaviour.