From: Alangi Derick Date: Thu, 18 Oct 2018 17:50:48 +0000 (+0100) Subject: Add docs and minor cleanup in PHPVersionCheck.php X-Git-Tag: 1.34.0-rc.0~3728^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24ze_article%22%29%20.%20%22?a=commitdiff_plain;h=edc5a90da13c5d3ec23082425f48cdf987faf720;p=lhc%2Fweb%2Fwiklou.git Add docs and minor cleanup in PHPVersionCheck.php - Consistency of the acronym PHP instead of "php". - Add documentation to $functionsExtensionsMapping. Change-Id: I06b507128bc3b95605a764cd63f621dbae3b2dc3 --- diff --git a/includes/PHPVersionCheck.php b/includes/PHPVersionCheck.php index 66fa9bd349..aee2a0cb92 100644 --- a/includes/PHPVersionCheck.php +++ b/includes/PHPVersionCheck.php @@ -27,8 +27,10 @@ * @class */ class PHPVersionCheck { - /* @var string The number of the MediaWiki version used */ + /* @var string The number of the MediaWiki version used. */ var $mwVersion = '1.33'; + + /* @var array A mapping of PHP functions to PHP extensions. */ var $functionsExtensionsMapping = array( 'mb_substr' => 'mbstring', 'xml_parser_create' => 'xml', @@ -61,14 +63,14 @@ class PHPVersionCheck { } /** - * Returns the version of the installed php implementation. + * Returns the version of the installed PHP implementation. * * @param string $impl By default, the function returns the info of the currently installed PHP * implementation. Using this parameter the caller can decide, what version info will be * returned. Valid values: HHVM, PHP - * @return array An array of information about the php implementation, containing: - * - 'version': The version of the php implementation (specific to the implementation, not - * the version of the implemented php version) + * @return array An array of information about the PHP implementation, containing: + * - 'version': The version of the PHP implementation (specific to the implementation, not + * the version of the implemented PHP version) * - 'implementation': The name of the implementation used * - 'vendor': The development group, vendor or developer of the implementation. * - 'upstreamSupported': The minimum version of the implementation supported by the named vendor. @@ -101,7 +103,7 @@ class PHPVersionCheck { } /** - * Displays an error, if the installed php version does not meet the minimum requirement. + * Displays an error, if the installed PHP version does not meet the minimum requirement. */ function checkRequiredPHPVersion() { $phpInfo = $this->getPHPInfo(); @@ -121,7 +123,7 @@ class PHPVersionCheck { . "MediaWiki $this->mwVersion needs {$phpInfo['implementation']}" . " $minimumVersion or higher or {$otherInfo['implementation']} version " . "{$otherInfo['minSupported']}.\n\nCheck if you have a" - . " newer php executable with a different name.\n\n"; + . " newer PHP executable with a different name.\n\n"; // phpcs:disable Generic.Files.LineLength $longHtml = <<