[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Typo

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
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(-)

Approvals:
  Seb35: Looks good to me, approved
  jenkins-bot: Verified



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 

[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Typo

2017-04-23 Thread Seb35 (Code Review)
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