Seb35 has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/349794 )
Change subject: Typo
......................................................................
Typo
And added some missing parameter to make it explicit instead of implicit.
Change-Id: Ife3fc738c673b3516be5fda0c7cb270e162dbe6d
---
M src/AbstractMediaWikiFarmScript.php
M src/MediaWikiFarmComposerScript.php
M src/MediaWikiFarmScript.php
M tests/perfs/MediaWikiFarmTestPerfs.php
M tests/perfs/perfs.php
M tests/phpunit/MediaWikiFarmTestCase.php
6 files changed, 25 insertions(+), 19 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiFarm
refs/changes/94/349794/1
diff --git a/src/AbstractMediaWikiFarmScript.php
b/src/AbstractMediaWikiFarmScript.php
index efe3705..caa0659 100644
--- a/src/AbstractMediaWikiFarmScript.php
+++ b/src/AbstractMediaWikiFarmScript.php
@@ -65,7 +65,7 @@
/**
* Get a command line parameter.
*
- * The parameter can be removed from the list.
+ * Optionally the parameter can be removed from the list.
*
* @internal
*
@@ -99,7 +99,7 @@
# Search a positional parameter
elseif( is_int( $name ) ) {
- if( $name >= $this->argc ) {
+ if( $name < 0 || $name >= $this->argc ) {
return null;
}
$value = $this->argv[$name];
@@ -123,7 +123,7 @@
* @api
*
* @param bool $long Show extended usage.
- * @return void.
+ * @return void
*/
function usage( $long = false ) {
@@ -148,7 +148,7 @@
* @api
* @codeCoverageIgnore
*
- * @return void.
+ * @return void
*/
function load() {
@@ -158,6 +158,7 @@
$wgMediaWikiFarmCodeDir = dirname( dirname( dirname( __FILE__ )
) );
$wgMediaWikiFarmConfigDir = '/etc/mediawiki';
$wgMediaWikiFarmCacheDir = '/tmp/mw-cache';
+ $wgMediaWikiFarmSyslog = 'mediawikifarm';
if( is_file( dirname( dirname( dirname( dirname( __FILE__ ) ) )
) . '/includes/DefaultSettings.php' ) ) {
@@ -183,7 +184,7 @@
*
* @api
*
- * @return void.
+ * @return void
*/
function exportArguments() {
@@ -231,7 +232,7 @@
*
* @api
*
- * @return void.
+ * @return void
*/
function restInPeace() {}
@@ -242,13 +243,13 @@
* ----------------- */
/**
- * Recursively delete a directory.
+ * Delete recursively a directory or a file.
*
* @api
*
- * @param string $dir Directory path.
- * @param bool $deleteDir Delete the root directory (or leave it empty).
- * @return void.
+ * @param string $dir Directory or file path.
+ * @param bool $deleteDir Delete the root directory? (Else leave it
empty.)
+ * @return void
*/
static function rmdirr( $dir, $deleteDir = true ) {
@@ -281,12 +282,12 @@
* @param string $source Source path, can be a normal file or a
directory.
* @param string $dest Destination path, should be a directory.
* @param bool $force If true, delete the destination directory before
beginning.
- * @param string[] $blacklist Regular expression to blacklist some
files; if begins
+ * @param string[] $blacklist Regular expressions to blacklist some
files; if it begins
* with '/', only files from the root directory will be
considered.
- * @param string[] $whitelist Regular expression to whitelist only some
files; if begins
+ * @param string[] $whitelist Regular expression to whitelist only some
files; if it begins
* with '/', only files from the root directory will be
considered.
* @param string $base Internal parameter to track the base directory.
- * @return void.
+ * @return void
*/
static function copyr( $source, $dest, $force = false, $blacklist =
array(), $whitelist = null, $base = '' ) {
diff --git a/src/MediaWikiFarmComposerScript.php
b/src/MediaWikiFarmComposerScript.php
index cb48d07..ea755b4 100644
--- a/src/MediaWikiFarmComposerScript.php
+++ b/src/MediaWikiFarmComposerScript.php
@@ -62,7 +62,7 @@
*
* @api
*
- * @return void.
+ * @return void
*/
function main() {
diff --git a/src/MediaWikiFarmScript.php b/src/MediaWikiFarmScript.php
index 5d23178..3ec6e88 100644
--- a/src/MediaWikiFarmScript.php
+++ b/src/MediaWikiFarmScript.php
@@ -146,7 +146,7 @@
*
* @api
*
- * @return void.
+ * @return void
*/
function restInPeace() {
diff --git a/tests/perfs/MediaWikiFarmTestPerfs.php
b/tests/perfs/MediaWikiFarmTestPerfs.php
index c0dcd96..37e87b9 100644
--- a/tests/perfs/MediaWikiFarmTestPerfs.php
+++ b/tests/perfs/MediaWikiFarmTestPerfs.php
@@ -63,7 +63,7 @@
* Start the counter.
*
* @param string $name Name of the counter.
- * @return void.
+ * @return void
*/
static function startCounter( $name ) {
@@ -74,7 +74,7 @@
* Stop the counter.
*
* @param string $name Name of the counter.
- * @return void.
+ * @return void
*/
static function stopCounter( $name ) {
@@ -85,7 +85,7 @@
/**
* Write down results and select the next profile.
*
- * @return void.
+ * @return void
*/
static function writeResults() {
@@ -174,7 +174,7 @@
* This function is very similar to its parent but is performance-spied.
*
* @param bool $force Whether to force loading in $this->configuration
even if there is a LocalSettings.php
- * @return void.
+ * @return void
*/
function getMediaWikiConfig( $force = false ) {
diff --git a/tests/perfs/perfs.php b/tests/perfs/perfs.php
index 1735ef6..a5dc15a 100644
--- a/tests/perfs/perfs.php
+++ b/tests/perfs/perfs.php
@@ -19,6 +19,7 @@
$wgMediaWikiFarmCodeDir = dirname( dirname( dirname( dirname( __FILE__ ) ) ) );
$wgMediaWikiFarmConfigDir = '/etc/mediawiki';
$wgMediaWikiFarmCacheDir = '/tmp/mw-cache';
+$wgMediaWikiFarmSyslog = 'mediawikifarm';
# Override default MediaWikiFarm configuration
@include_once dirname( dirname( dirname( __FILE__ ) ) ) .
'/config/MediaWikiFarmDirectories.php';
diff --git a/tests/phpunit/MediaWikiFarmTestCase.php
b/tests/phpunit/MediaWikiFarmTestCase.php
index 696a453..593839f 100644
--- a/tests/phpunit/MediaWikiFarmTestCase.php
+++ b/tests/phpunit/MediaWikiFarmTestCase.php
@@ -54,6 +54,9 @@
/** @var string Cache directory for tests. */
public static $wgMediaWikiFarmCacheDir = '';
+ /** @var string Syslog tag for tests. */
+ public static $wgMediaWikiFarmSyslog = '';
+
/** @var array Array with boolean values if a given backuped global
previously existed. */
public $backupMWFGlobalsExist = array();
@@ -107,6 +110,7 @@
self::$wgMediaWikiFarmConfigDir = dirname( __FILE__ ) .
'/data/config';
self::$wgMediaWikiFarmCodeDir = dirname( __FILE__ ) .
'/data/mediawiki';
self::$wgMediaWikiFarmCacheDir = dirname( __FILE__ ) .
'/data/cache';
+ self::$wgMediaWikiFarmSyslog = 'mediawikifarm';
# Move http404.php to current directory - @todo: should be
improved
copy( self::$wgMediaWikiFarmConfigDir . '/http404.php',
'phpunitHTTP404.php' );
--
To view, visit https://gerrit.wikimedia.org/r/349794
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife3fc738c673b3516be5fda0c7cb270e162dbe6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiFarm
Gerrit-Branch: master
Gerrit-Owner: Seb35 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits