1
0
Fork 0

Use implode instead of join

pull/5779/head
Konstantin.Myakshin 2016-10-11 16:52:29 +03:00
parent 41c3307fc5
commit dc70b40d34
4 changed files with 6 additions and 6 deletions

View File

@ -582,7 +582,7 @@ HEADER;
$file .= <<<'INCLUDE_PATH' $file .= <<<'INCLUDE_PATH'
$includePaths = require __DIR__ . '/include_paths.php'; $includePaths = require __DIR__ . '/include_paths.php';
array_push($includePaths, get_include_path()); array_push($includePaths, get_include_path());
set_include_path(join(PATH_SEPARATOR, $includePaths)); set_include_path(implode(PATH_SEPARATOR, $includePaths));
INCLUDE_PATH; INCLUDE_PATH;

View File

@ -463,7 +463,7 @@ EOT
$io = $this->getIO(); $io = $this->getIO();
$io->write('<info>name</info> : ' . $package->getPrettyName()); $io->write('<info>name</info> : ' . $package->getPrettyName());
$io->write('<info>descrip.</info> : ' . $package->getDescription()); $io->write('<info>descrip.</info> : ' . $package->getDescription());
$io->write('<info>keywords</info> : ' . join(', ', $package->getKeywords() ?: array())); $io->write('<info>keywords</info> : ' . implode(', ', $package->getKeywords() ?: array()));
$this->printVersions($package, $versions, $installedRepo); $this->printVersions($package, $versions, $installedRepo);
if ($latestPackage) { if ($latestPackage) {
$style = $this->getVersionStyle($latestPackage, $package); $style = $this->getVersionStyle($latestPackage, $package);

View File

@ -158,13 +158,13 @@ class ConsoleIO extends BaseIO
if (true === $stderr && $this->output instanceof ConsoleOutputInterface) { if (true === $stderr && $this->output instanceof ConsoleOutputInterface) {
$this->output->getErrorOutput()->write($messages, $newline, $sfVerbosity); $this->output->getErrorOutput()->write($messages, $newline, $sfVerbosity);
$this->lastMessageErr = join($newline ? "\n" : '', (array) $messages); $this->lastMessageErr = implode($newline ? "\n" : '', (array) $messages);
return; return;
} }
$this->output->write($messages, $newline, $sfVerbosity); $this->output->write($messages, $newline, $sfVerbosity);
$this->lastMessage = join($newline ? "\n" : '', (array) $messages); $this->lastMessage = implode($newline ? "\n" : '', (array) $messages);
} }
/** /**
@ -193,7 +193,7 @@ class ConsoleIO extends BaseIO
private function doOverwrite($messages, $newline, $size, $stderr, $verbosity) private function doOverwrite($messages, $newline, $size, $stderr, $verbosity)
{ {
// messages can be an array, let's convert it to string anyway // messages can be an array, let's convert it to string anyway
$messages = join($newline ? "\n" : '', (array) $messages); $messages = implode($newline ? "\n" : '', (array) $messages);
// since overwrite is supposed to overwrite last message... // since overwrite is supposed to overwrite last message...
if (!isset($size)) { if (!isset($size)) {

View File

@ -25,7 +25,7 @@ class ComposerAutoloaderInitFilesAutoload
$includePaths = require __DIR__ . '/include_paths.php'; $includePaths = require __DIR__ . '/include_paths.php';
array_push($includePaths, get_include_path()); array_push($includePaths, get_include_path());
set_include_path(join(PATH_SEPARATOR, $includePaths)); set_include_path(implode(PATH_SEPARATOR, $includePaths));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
if ($useStaticLoader) { if ($useStaticLoader) {