From 31330a739fb32a8088108a7df8dccfb6ea8161ae Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 28 May 2012 16:38:52 +0200 Subject: [PATCH] Fix CS --- src/Composer/Command/RequireCommand.php | 4 ++-- src/Composer/Installer.php | 6 +++--- src/Composer/Json/JsonManipulator.php | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Composer/Command/RequireCommand.php b/src/Composer/Command/RequireCommand.php index 78d7f326f..0ff6b82fa 100644 --- a/src/Composer/Command/RequireCommand.php +++ b/src/Composer/Command/RequireCommand.php @@ -20,8 +20,6 @@ use Composer\Factory; use Composer\Installer; use Composer\Json\JsonFile; use Composer\Json\JsonManipulator; -use Composer\Json\JsonValidationException; -use Composer\Util\RemoteFilesystem; /** * @author Jérémy Romey @@ -54,10 +52,12 @@ EOT if (!file_exists($file)) { $output->writeln(''.$file.' not found.'); + return 1; } if (!is_readable($file)) { $output->writeln(''.$file.' is not readable.'); + return 1; } diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index ae32d9651..e8924756b 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -473,9 +473,9 @@ class Installer * update whitelist themselves. * * @param RepositoryInterface $localRepo - * @param boolean $devMode - * @param array $rootRequires An array of links to packages in require of the root package - * @param array $rootDevRequires An array of links to packages in require-dev of the root package + * @param boolean $devMode + * @param array $rootRequires An array of links to packages in require of the root package + * @param array $rootDevRequires An array of links to packages in require-dev of the root package */ private function whitelistUpdateDependencies($localRepo, $devMode, array $rootRequires, array $rootDevRequires) { diff --git a/src/Composer/Json/JsonManipulator.php b/src/Composer/Json/JsonManipulator.php index 59413aaac..8dc9e398c 100644 --- a/src/Composer/Json/JsonManipulator.php +++ b/src/Composer/Json/JsonManipulator.php @@ -104,6 +104,7 @@ class JsonManipulator foreach ($data as $key => $val) { $elems[] = $this->indent . $this->indent . JsonFile::encode($key). ': '.$this->format($val); } + return $out . implode(','.$this->newline, $elems) . $this->newline . $this->indent . '}'; }