Fix parameter order for AbuseFilterParser::contains

Move optional parameters after required ones.

Change-Id: Ice243bc5c793ffe6323931e45f36939d4b428b30
This commit is contained in:
Daimona Eaytoy 2018-04-10 13:28:34 +02:00
parent 4465089c02
commit aeeac22490

View file

@ -1139,7 +1139,7 @@ class AbuseFilterParser {
$s = array_shift( $args );
return new AFPData( AFPData::DBOOL, self::contains( true, $s, $args ) );
return new AFPData( AFPData::DBOOL, self::contains( $s, $args, true ) );
}
/**
@ -1158,7 +1158,7 @@ class AbuseFilterParser {
$s = array_shift( $args );
return new AFPData( AFPData::DBOOL, self::contains( false, $s, $args, false ) );
return new AFPData( AFPData::DBOOL, self::contains( $s, $args, false, false ) );
}
/**
@ -1179,7 +1179,7 @@ class AbuseFilterParser {
$s = array_shift( $args );
return new AFPData( AFPData::DBOOL, self::contains( true, $s, $args, true ) );
return new AFPData( AFPData::DBOOL, self::contains( $s, $args, true, true ) );
}
/**
@ -1200,7 +1200,7 @@ class AbuseFilterParser {
$s = array_shift( $args );
return new AFPData( AFPData::DBOOL, self::contains( false, $s, $args, true ) );
return new AFPData( AFPData::DBOOL, self::contains( $s, $args, false, true ) );
}
/**
@ -1211,14 +1211,14 @@ class AbuseFilterParser {
* Use normalize = true to make use of ccnorm and
* normalize both sides of the search.
*
* @param bool $is_any
* @param AFPData $string
* @param AFPData[] $values
* @param bool $is_any
* @param bool $normalize
*
* @return bool
*/
protected static function contains( $is_any = true, $string, $values, $normalize = false ) {
protected static function contains( $string, $values, $is_any = true, $normalize = false ) {
$string = $string->toString();
if ( $string == '' ) {
return false;