https://secure.php.net/manual/en/function.implode.php defines the order
of arguments as
string implode ( string $glue , array $pieces )
string implode ( array $pieces )
Note:
implode() can, for historical reasons, accept its parameters in
either order. For consistency with explode(), however, it may be less
confusing to use the documented order of arguments.
Change-Id: I03bf5712204e283f52d3ede54af9b9ec117d4280
$out->addHTML( $this->editFormTextAfterWarn );
$out->addHTML( "<div class='editButtons'>\n" );
$out->addHTML( $this->editFormTextAfterWarn );
$out->addHTML( "<div class='editButtons'>\n" );
- $out->addHTML( implode( $this->getEditButtons( $tabindex ), "\n" ) . "\n" );
+ $out->addHTML( implode( "\n", $this->getEditButtons( $tabindex ) ) . "\n" );
$cancel = $this->getCancelLink();
$cancel = $this->getCancelLink();
private function generateLogLine( $flags, $report ) {
$flagText = '';
if ( $flags ) {
private function generateLogLine( $flags, $report ) {
$flagText = '';
if ( $flags ) {
- $flagText = '[' . implode( $flags, ', ' ) . ']';
+ $flagText = '[' . implode( ', ', $flags ) . ']';
}
$blockedFile = isset( $report['blocked-uri'] ) ? $report['blocked-uri'] : 'n/a';
}
$blockedFile = isset( $report['blocked-uri'] ) ? $report['blocked-uri'] : 'n/a';
}
$data = $this->fetchImageQuery( [
}
$data = $this->fetchImageQuery( [
- 'titles' => implode( $files, '|' ),
+ 'titles' => implode( '|', $files ),
'prop' => 'imageinfo' ]
);
'prop' => 'imageinfo' ]
);
$restrictions = $titleObject->getRestrictions( strtolower( $type ) );
# Title::getRestrictions returns an array, its possible it may have
# multiple values in the future
$restrictions = $titleObject->getRestrictions( strtolower( $type ) );
# Title::getRestrictions returns an array, its possible it may have
# multiple values in the future
- return implode( $restrictions, ',' );
+ return implode( ',', $restrictions );
foreach ( $sources[0] as $sourceTitle ) {
$names[] = $sourceTitle->getPrefixedText();
}
foreach ( $sources[0] as $sourceTitle ) {
$names[] = $sourceTitle->getPrefixedText();
}
- return implode( $names, '|' );
+ return implode( '|', $names );
* @return HTMLForm
*/
protected function getRawForm() {
* @return HTMLForm
*/
protected function getRawForm() {
- $titles = implode( $this->getWatchlist(), "\n" );
+ $titles = implode( "\n", $this->getWatchlist() );
$fields = [
'Titles' => [
'type' => 'textarea',
$fields = [
'Titles' => [
'type' => 'textarea',
foreach ( $this->elements as $elt ) {
array_push( $r, $elt->localName );
}
foreach ( $this->elements as $elt ) {
array_push( $r, $elt->localName );
}
- return implode( $r, ' ' );
+ return implode( ' ', $r );
}
);
if ( count( $bad ) > 0 ) {
}
);
if ( count( $bad ) > 0 ) {
- $badstr = implode( array_keys( $bad ), ',' );
+ $badstr = implode( ',', array_keys( $bad ) );
throw new ParameterAssertionException(
'$config',
'Balance attempted with sanitization including ' .
throw new ParameterAssertionException(
'$config',
'Balance attempted with sanitization including ' .
// ... append parameters ...
if ( $this->mParams ) {
// ... append parameters ...
if ( $this->mParams ) {
- $output .= " [--" . implode( array_keys( $this->mParams ), "|--" ) . "]";
+ $output .= " [--" . implode( "|--", array_keys( $this->mParams ) ) . "]";
}
// ... and append arguments.
}
// ... and append arguments.
}
if ( isset( $messages[$key] ) ) {
}
if ( isset( $messages[$key] ) ) {
- $messages[$key] = implode( $messages[$key], ", " );
+ $messages[$key] = implode( ", ", $messages[$key] );