diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php
index 4784aae12..0c32dc750 100644
--- a/src/Composer/Autoload/AutoloadGenerator.php
+++ b/src/Composer/Autoload/AutoloadGenerator.php
@@ -277,13 +277,13 @@ EOF;
$includePathFilePath = $targetDir.'/include_paths.php';
if ($includePathFileContents = $this->getIncludePathsFile($packageMap, $filesystem, $basePath, $vendorPath, $vendorPathCode52, $appBaseDirCode)) {
file_put_contents($includePathFilePath, $includePathFileContents);
- } else if (file_exists($includePathFilePath)){
+ } elseif (file_exists($includePathFilePath)) {
unlink($includePathFilePath);
}
$includeFilesFilePath = $targetDir.'/autoload_files.php';
if ($includeFilesFileContents = $this->getIncludeFilesFile($autoloads['files'], $filesystem, $basePath, $vendorPath, $vendorPathCode52, $appBaseDirCode)) {
file_put_contents($includeFilesFilePath, $includeFilesFileContents);
- } else if (file_exists($includeFilesFilePath)) {
+ } elseif (file_exists($includeFilesFilePath)) {
unlink($includeFilesFilePath);
}
file_put_contents($vendorPath.'/autoload.php', $this->getAutoloadFile($vendorPathToTargetDirCode, $suffix));
diff --git a/src/Composer/Autoload/ClassMapGenerator.php b/src/Composer/Autoload/ClassMapGenerator.php
index e6ff636da..5484b7d41 100644
--- a/src/Composer/Autoload/ClassMapGenerator.php
+++ b/src/Composer/Autoload/ClassMapGenerator.php
@@ -49,9 +49,8 @@ class ClassMapGenerator
* @param IOInterface $io IO object
* @param string $namespace Optional namespace prefix to filter by
*
- * @return array A class map array
- *
* @throws \RuntimeException When the path is neither an existing file nor directory
+ * @return array A class map array
*/
public static function createMap($path, $whitelist = null, IOInterface $io = null, $namespace = null)
{
diff --git a/src/Composer/Command/ArchiveCommand.php b/src/Composer/Command/ArchiveCommand.php
index 8114435b2..b8c439678 100644
--- a/src/Composer/Command/ArchiveCommand.php
+++ b/src/Composer/Command/ArchiveCommand.php
@@ -20,7 +20,6 @@ use Composer\Script\ScriptEvents;
use Composer\Plugin\CommandEvent;
use Composer\Plugin\PluginEvents;
use Composer\Util\Filesystem;
-
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
diff --git a/src/Composer/Command/ConfigCommand.php b/src/Composer/Command/ConfigCommand.php
index 2b7fd4846..9620bec14 100644
--- a/src/Composer/Command/ConfigCommand.php
+++ b/src/Composer/Command/ConfigCommand.php
@@ -278,7 +278,7 @@ EOT
'use-include-path' => array($booleanValidator, $booleanNormalizer),
'preferred-install' => array(
function ($val) { return in_array($val, array('auto', 'source', 'dist'), true); },
- function ($val) { return $val; }
+ function ($val) { return $val; },
),
'store-auths' => array(
function ($val) { return in_array($val, array('true', 'false', 'prompt'), true); },
@@ -288,7 +288,7 @@ EOT
}
return $val !== 'false' && (bool) $val;
- }
+ },
),
'notify-on-install' => array($booleanValidator, $booleanNormalizer),
'vendor-dir' => array('is_string', function ($val) { return $val; }),
@@ -301,7 +301,7 @@ EOT
'cache-files-ttl' => array('is_numeric', 'intval'),
'cache-files-maxsize' => array(
function ($val) { return preg_match('/^\s*([0-9.]+)\s*(?:([kmg])(?:i?b)?)?\s*$/i', $val) > 0; },
- function ($val) { return $val; }
+ function ($val) { return $val; },
),
'discard-changes' => array(
function ($val) { return in_array($val, array('stash', 'true', 'false', '1', '0'), true); },
@@ -311,7 +311,7 @@ EOT
}
return $val !== 'false' && (bool) $val;
- }
+ },
),
'autoloader-suffix' => array('is_string', function ($val) { return $val === 'null' ? null : $val; }),
'optimize-autoloader' => array($booleanValidator, $booleanNormalizer),
@@ -336,7 +336,7 @@ EOT
},
function ($vals) {
return $vals;
- }
+ },
),
'github-domains' => array(
function ($vals) {
@@ -348,7 +348,7 @@ EOT
},
function ($vals) {
return $vals;
- }
+ },
),
);
diff --git a/src/Composer/Command/CreateProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php
index 54cd63538..2cae1414a 100644
--- a/src/Composer/Command/CreateProjectCommand.php
+++ b/src/Composer/Command/CreateProjectCommand.php
@@ -347,8 +347,8 @@ EOT
* Updated preferSource or preferDist based on the preferredInstall config option
* @param Config $config
* @param InputInterface $input
- * @param boolean $preferSource
- * @param boolean $preferDist
+ * @param bool $preferSource
+ * @param bool $preferDist
*/
protected function updatePreferredOptions(Config $config, InputInterface $input, &$preferSource, &$preferDist, $keepVcsRequiresPreferSource = false)
{
diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php
index 30d38b0c1..afca401b6 100644
--- a/src/Composer/Command/DiagnoseCommand.php
+++ b/src/Composer/Command/DiagnoseCommand.php
@@ -264,7 +264,7 @@ EOT
$url = $domain === 'github.com' ? 'https://api.'.$domain.'/user/repos' : 'https://'.$domain.'/api/v3/user/repos';
return $this->rfs->getContents($domain, $url, false, array(
- 'retry-auth-failure' => false
+ 'retry-auth-failure' => false,
)) ? true : 'Unexpected error';
} catch (\Exception $e) {
if ($e instanceof TransportException && $e->getCode() === 401) {
@@ -276,10 +276,10 @@ EOT
}
/**
- * @param string $domain
- * @param string $token
- * @return array
+ * @param string $domain
+ * @param string $token
* @throws TransportException
+ * @return array
*/
private function getGithubRateLimit($domain, $token = null)
{
diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php
index 9e60d621c..795d72958 100644
--- a/src/Composer/Command/InitCommand.php
+++ b/src/Composer/Command/InitCommand.php
@@ -148,7 +148,7 @@ EOT
$io->writeError(array(
'',
$formatter->formatBlock('Welcome to the Composer config generator', 'bg=blue;fg=white', true),
- ''
+ '',
));
// namespace
@@ -284,7 +284,7 @@ EOT
/**
* @private
- * @param string $author
+ * @param string $author
* @return array
*/
public function parseAuthorString($author)
@@ -293,7 +293,7 @@ EOT
if ($this->isValidEmail($match['email'])) {
return array(
'name' => trim($match['name']),
- 'email' => $match['email']
+ 'email' => $match['email'],
);
}
}
@@ -368,7 +368,7 @@ EOT
$io->writeError(array(
'',
sprintf('Found %s packages matching %s', count($matches), $package),
- ''
+ '',
));
$io->writeError($choices);
@@ -591,8 +591,8 @@ EOT
*
* @param InputInterface $input
* @param string $name
- * @return string
* @throws \InvalidArgumentException
+ * @return string
*/
private function findBestVersionForPackage(InputInterface $input, $name)
{
diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php
index 81bc93b3f..8aa6de5ca 100644
--- a/src/Composer/Command/ShowCommand.php
+++ b/src/Composer/Command/ShowCommand.php
@@ -245,8 +245,8 @@ EOT
* @param RepositoryInterface $repos
* @param string $name
* @param string $version
- * @return array array(CompletePackageInterface, array of versions)
* @throws \InvalidArgumentException
+ * @return array array(CompletePackageInterface, array of versions)
*/
protected function getPackage(RepositoryInterface $installedRepo, RepositoryInterface $repos, $name, $version = null)
{
diff --git a/src/Composer/Command/ValidateCommand.php b/src/Composer/Command/ValidateCommand.php
index 54177576e..66902cbb2 100644
--- a/src/Composer/Command/ValidateCommand.php
+++ b/src/Composer/Command/ValidateCommand.php
@@ -42,7 +42,7 @@ class ValidateCommand extends Command
new InputOption('no-check-publish', null, InputOption::VALUE_NONE, 'Do not check for publish errors'),
new InputOption('with-dependencies', 'A', InputOption::VALUE_NONE, 'Also validate the composer.json of all installed dependencies'),
new InputOption('strict', null, InputOption::VALUE_NONE, 'Return a non-zero exit code for warnings as well as errors'),
- new InputArgument('file', InputArgument::OPTIONAL, 'path to composer.json file', './composer.json')
+ new InputArgument('file', InputArgument::OPTIONAL, 'path to composer.json file', './composer.json'),
))
->setHelp(<< 'composer',
'url' => 'https?://packagist.org',
'allow_ssl_downgrade' => true,
- )
+ ),
);
private $config;
@@ -68,7 +68,7 @@ class Config
private $useEnvironment;
/**
- * @param boolean $useEnvironment Use COMPOSER_ environment variables to replace config settings
+ * @param bool $useEnvironment Use COMPOSER_ environment variables to replace config settings
*/
public function __construct($useEnvironment = true, $baseDir = null)
{
@@ -331,8 +331,8 @@ class Config
* This should be used to read COMPOSER_ environment variables
* that overload config values.
*
- * @param string $var
- * @return string|boolean
+ * @param string $var
+ * @return string|bool
*/
private function getComposerEnv($var)
{
diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php
index 84e03f754..21bc22937 100644
--- a/src/Composer/Console/Application.php
+++ b/src/Composer/Console/Application.php
@@ -159,8 +159,8 @@ class Application extends BaseApplication
/**
* @param InputInterface $input
- * @return string
* @throws \RuntimeException
+ * @return string
*/
private function getNewWorkingDir(InputInterface $input)
{
diff --git a/src/Composer/Console/HtmlOutputFormatter.php b/src/Composer/Console/HtmlOutputFormatter.php
index f5368b5fe..994fcbcd5 100644
--- a/src/Composer/Console/HtmlOutputFormatter.php
+++ b/src/Composer/Console/HtmlOutputFormatter.php
@@ -27,7 +27,7 @@ class HtmlOutputFormatter extends OutputFormatter
34 => 'blue',
35 => 'magenta',
36 => 'cyan',
- 37 => 'white'
+ 37 => 'white',
);
private static $availableBackgroundColors = array(
40 => 'black',
@@ -37,7 +37,7 @@ class HtmlOutputFormatter extends OutputFormatter
44 => 'blue',
45 => 'magenta',
46 => 'cyan',
- 47 => 'white'
+ 47 => 'white',
);
private static $availableOptions = array(
1 => 'bold',
diff --git a/src/Composer/DependencyResolver/Pool.php b/src/Composer/DependencyResolver/Pool.php
index d5eac138e..96e46c531 100644
--- a/src/Composer/DependencyResolver/Pool.php
+++ b/src/Composer/DependencyResolver/Pool.php
@@ -150,11 +150,11 @@ class Pool implements \Countable
}
/**
- * Retrieves the package object for a given package id.
- *
- * @param int $id
- * @return PackageInterface
- */
+ * Retrieves the package object for a given package id.
+ *
+ * @param int $id
+ * @return PackageInterface
+ */
public function packageById($id)
{
return $this->packages[$id - 1];
diff --git a/src/Composer/DependencyResolver/Request.php b/src/Composer/DependencyResolver/Request.php
index 10ffcb2c4..7eacdf1f6 100644
--- a/src/Composer/DependencyResolver/Request.php
+++ b/src/Composer/DependencyResolver/Request.php
@@ -59,7 +59,7 @@ class Request
'cmd' => $cmd,
'packageName' => $packageName,
'constraint' => $constraint,
- 'fixed' => $fixed
+ 'fixed' => $fixed,
);
}
diff --git a/src/Composer/DependencyResolver/Rule.php b/src/Composer/DependencyResolver/Rule.php
index 916addead..03de5ab84 100644
--- a/src/Composer/DependencyResolver/Rule.php
+++ b/src/Composer/DependencyResolver/Rule.php
@@ -62,6 +62,7 @@ class Rule
public function getHash()
{
$data = unpack('ihash', md5(implode(',', $this->literals), true));
+
return $data['hash'];
}
diff --git a/src/Composer/DependencyResolver/RuleWatchNode.php b/src/Composer/DependencyResolver/RuleWatchNode.php
index 5cfd7d1e0..907cb4cc0 100644
--- a/src/Composer/DependencyResolver/RuleWatchNode.php
+++ b/src/Composer/DependencyResolver/RuleWatchNode.php
@@ -83,7 +83,7 @@ class RuleWatchNode
/**
* Given one watched literal, this method returns the other watched literal
*
- * @param int $literal The watched literal that should not be returned
+ * @param int $literal The watched literal that should not be returned
* @return int A literal
*/
public function getOtherWatch($literal)
diff --git a/src/Composer/DependencyResolver/Solver.php b/src/Composer/DependencyResolver/Solver.php
index f8f316269..0568a4d2c 100644
--- a/src/Composer/DependencyResolver/Solver.php
+++ b/src/Composer/DependencyResolver/Solver.php
@@ -217,7 +217,7 @@ class Solver
* Evaluates each term affected by the decision (linked through watches)
* If we find unit rules we make new decisions based on them
*
- * @param integer $level
+ * @param int $level
* @return Rule|null A rule on conflict, otherwise null.
*/
protected function propagate($level)
diff --git a/src/Composer/Downloader/DownloadManager.php b/src/Composer/Downloader/DownloadManager.php
index 5c0980725..4d2e9c8f4 100644
--- a/src/Composer/Downloader/DownloadManager.php
+++ b/src/Composer/Downloader/DownloadManager.php
@@ -103,10 +103,9 @@ class DownloadManager
/**
* Returns downloader for a specific installation type.
*
- * @param string $type installation type
- * @return DownloaderInterface
- *
+ * @param string $type installation type
* @throws \InvalidArgumentException if downloader for provided type is not registered
+ * @return DownloaderInterface
*/
public function getDownloader($type)
{
@@ -121,12 +120,11 @@ class DownloadManager
/**
* Returns downloader for already installed package.
*
- * @param PackageInterface $package package instance
- * @return DownloaderInterface|null
- *
+ * @param PackageInterface $package package instance
* @throws \InvalidArgumentException if package has no installation source specified
* @throws \LogicException if specific downloader used to load package with
- * wrong type
+ * wrong type
+ * @return DownloaderInterface|null
*/
public function getDownloaderForInstalledPackage(PackageInterface $package)
{
diff --git a/src/Composer/Downloader/FileDownloader.php b/src/Composer/Downloader/FileDownloader.php
index 0a2c3a6e5..77a08cbf4 100644
--- a/src/Composer/Downloader/FileDownloader.php
+++ b/src/Composer/Downloader/FileDownloader.php
@@ -137,7 +137,7 @@ class FileDownloader implements DownloaderInterface
break;
} catch (TransportException $e) {
// if we got an http response with a proper code, then requesting again will probably not help, abort
- if ((0 !== $e->getCode() && !in_array($e->getCode(),array(500, 502, 503, 504))) || !$retries) {
+ if ((0 !== $e->getCode() && !in_array($e->getCode(), array(500, 502, 503, 504))) || !$retries) {
throw $e;
}
if ($this->io->isVerbose()) {
@@ -225,11 +225,10 @@ class FileDownloader implements DownloaderInterface
/**
* Process the download url
*
- * @param PackageInterface $package package the url is coming from
- * @param string $url download url
- * @return string url
- *
+ * @param PackageInterface $package package the url is coming from
+ * @param string $url download url
* @throws \RuntimeException If any problem with the url
+ * @return string url
*/
protected function processUrl(PackageInterface $package, $url)
{
diff --git a/src/Composer/Downloader/GitDownloader.php b/src/Composer/Downloader/GitDownloader.php
index 82552c009..60a896256 100644
--- a/src/Composer/Downloader/GitDownloader.php
+++ b/src/Composer/Downloader/GitDownloader.php
@@ -209,13 +209,12 @@ class GitDownloader extends VcsDownloader
/**
* Updates the given path to the given commit ref
*
- * @param string $path
- * @param string $reference
- * @param string $branch
- * @param \DateTime $date
- * @return null|string if a string is returned, it is the commit reference that was checked out if the original could not be found
- *
+ * @param string $path
+ * @param string $reference
+ * @param string $branch
+ * @param \DateTime $date
* @throws \RuntimeException
+ * @return null|string if a string is returned, it is the commit reference that was checked out if the original could not be found
*/
protected function updateToCommit($path, $reference, $branch, $date)
{
diff --git a/src/Composer/Downloader/PearPackageExtractor.php b/src/Composer/Downloader/PearPackageExtractor.php
index 1106d927f..44267d558 100644
--- a/src/Composer/Downloader/PearPackageExtractor.php
+++ b/src/Composer/Downloader/PearPackageExtractor.php
@@ -48,7 +48,6 @@ class PearPackageExtractor
* @param array $vars used for replacement tasks
* @throws \RuntimeException
* @throws \UnexpectedValueException
- *
*/
public function extractTo($target, array $roles = array('php' => '/', 'script' => '/bin'), $vars = array())
{
@@ -130,9 +129,9 @@ class PearPackageExtractor
* @param string $source string path to extracted files
* @param array $roles array [role => roleRoot] relative root for files having that role
* @param array $vars list of values can be used for replacement tasks
+ * @throws \RuntimeException
* @return array array of 'source' => 'target', where source is location of file in the tarball (relative to source
* path, and target is destination of file (also relative to $source path)
- * @throws \RuntimeException
*/
private function buildCopyActions($source, array $roles, $vars)
{
diff --git a/src/Composer/Downloader/PerforceDownloader.php b/src/Composer/Downloader/PerforceDownloader.php
index ae2769999..d99fc7997 100644
--- a/src/Composer/Downloader/PerforceDownloader.php
+++ b/src/Composer/Downloader/PerforceDownloader.php
@@ -43,7 +43,7 @@ class PerforceDownloader extends VcsDownloader
private function getLabelFromSourceReference($ref)
{
- $pos = strpos($ref,'@');
+ $pos = strpos($ref, '@');
if (false !== $pos) {
return substr($ref, $pos + 1);
}
diff --git a/src/Composer/Downloader/SvnDownloader.php b/src/Composer/Downloader/SvnDownloader.php
index a13d2310f..addf95d37 100644
--- a/src/Composer/Downloader/SvnDownloader.php
+++ b/src/Composer/Downloader/SvnDownloader.php
@@ -151,7 +151,7 @@ class SvnDownloader extends VcsDownloader
*/
protected function getCommitLogs($fromReference, $toReference, $path)
{
- if (preg_match('{.*@(\d+)$}', $fromReference) && preg_match('{.*@(\d+)$}', $toReference) ) {
+ if (preg_match('{.*@(\d+)$}', $fromReference) && preg_match('{.*@(\d+)$}', $toReference)) {
// strip paths from references and only keep the actual revision
$fromRevision = preg_replace('{.*@(\d+)$}', '$1', $fromReference);
$toRevision = preg_replace('{.*@(\d+)$}', '$1', $toReference);
diff --git a/src/Composer/EventDispatcher/Event.php b/src/Composer/EventDispatcher/Event.php
index 38ae4f440..2091f6be0 100644
--- a/src/Composer/EventDispatcher/Event.php
+++ b/src/Composer/EventDispatcher/Event.php
@@ -35,7 +35,7 @@ class Event
protected $flags;
/**
- * @var boolean Whether the event should not be passed to more listeners
+ * @var bool Whether the event should not be passed to more listeners
*/
private $propagationStopped = false;
@@ -86,7 +86,7 @@ class Event
/**
* Checks if stopPropagation has been called
*
- * @return boolean Whether propagation has been stopped
+ * @return bool Whether propagation has been stopped
*/
public function isPropagationStopped()
{
diff --git a/src/Composer/EventDispatcher/EventDispatcher.php b/src/Composer/EventDispatcher/EventDispatcher.php
index 0e00629c4..721e26a3f 100644
--- a/src/Composer/EventDispatcher/EventDispatcher.php
+++ b/src/Composer/EventDispatcher/EventDispatcher.php
@@ -136,10 +136,10 @@ class EventDispatcher
*
* @param Event $event The event object to pass to the event handlers/listeners.
* @param string $additionalArgs
- * @return int return code of the executed script if any, for php scripts a false return
- * value is changed to 1, anything else to 0
* @throws \RuntimeException
* @throws \Exception
+ * @return int return code of the executed script if any, for php scripts a false return
+ * value is changed to 1, anything else to 0
*/
protected function doDispatch(Event $event)
{
@@ -212,8 +212,8 @@ class EventDispatcher
}
/**
- * @param mixed $target
- * @param Event $event
+ * @param mixed $target
+ * @param Event $event
* @return Event|CommandEvent
*/
protected function checkListenerExpectedEvent($target, Event $event)
@@ -260,7 +260,7 @@ class EventDispatcher
*
* @param string $eventName The event name - typically a constant
* @param Callable $listener A callable expecting an event argument
- * @param integer $priority A higher value represents a higher priority
+ * @param int $priority A higher value represents a higher priority
*/
protected function addListener($eventName, $listener, $priority = 0)
{
@@ -313,8 +313,8 @@ class EventDispatcher
/**
* Checks if an event has listeners registered
*
- * @param Event $event
- * @return boolean
+ * @param Event $event
+ * @return bool
*/
public function hasEventListeners(Event $event)
{
@@ -355,8 +355,8 @@ class EventDispatcher
/**
* Checks if string given references a class path and method
*
- * @param string $callable
- * @return boolean
+ * @param string $callable
+ * @return bool
*/
protected function isPhpScript($callable)
{
diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php
index e3c899880..683d58d27 100644
--- a/src/Composer/Factory.php
+++ b/src/Composer/Factory.php
@@ -37,8 +37,8 @@ use Composer\Semver\VersionParser;
class Factory
{
/**
- * @return string
* @throws \RuntimeException
+ * @return string
*/
protected static function getHomeDir()
{
diff --git a/src/Composer/IO/BufferIO.php b/src/Composer/IO/BufferIO.php
index 581680b7c..db3fb634b 100644
--- a/src/Composer/IO/BufferIO.php
+++ b/src/Composer/IO/BufferIO.php
@@ -23,8 +23,8 @@ use Symfony\Component\Console\Helper\HelperSet;
class BufferIO extends ConsoleIO
{
/**
- * @param string $input
- * @param int $verbosity
+ * @param string $input
+ * @param int $verbosity
* @param OutputFormatterInterface $formatter
*/
public function __construct(
diff --git a/src/Composer/IO/ConsoleIO.php b/src/Composer/IO/ConsoleIO.php
index e37b9f1ad..ae5b952ea 100644
--- a/src/Composer/IO/ConsoleIO.php
+++ b/src/Composer/IO/ConsoleIO.php
@@ -111,8 +111,8 @@ class ConsoleIO extends BaseIO
/**
* @param array $messages
- * @param boolean $newline
- * @param boolean $stderr
+ * @param bool $newline
+ * @param bool $stderr
*/
private function doWrite($messages, $newline, $stderr)
{
@@ -153,9 +153,9 @@ class ConsoleIO extends BaseIO
/**
* @param array $messages
- * @param boolean $newline
- * @param integer $size
- * @param boolean $stderr
+ * @param bool $newline
+ * @param int $size
+ * @param bool $stderr
*/
private function doOverwrite($messages, $newline, $size, $stderr)
{
diff --git a/src/Composer/IO/IOInterface.php b/src/Composer/IO/IOInterface.php
index 7dc9f5a09..b26700a8c 100644
--- a/src/Composer/IO/IOInterface.php
+++ b/src/Composer/IO/IOInterface.php
@@ -77,7 +77,7 @@ interface IOInterface
*
* @param string|array $messages The message as an array of lines or a single string
* @param bool $newline Whether to add a newline or not
- * @param integer $size The size of line
+ * @param int $size The size of line
*/
public function overwrite($messages, $newline = true, $size = null);
@@ -86,7 +86,7 @@ interface IOInterface
*
* @param string|array $messages The message as an array of lines or a single string
* @param bool $newline Whether to add a newline or not
- * @param integer $size The size of line
+ * @param int $size The size of line
*/
public function overwriteError($messages, $newline = true, $size = null);
@@ -96,9 +96,8 @@ interface IOInterface
* @param string|array $question The question to ask
* @param string $default The default answer if none is given by the user
*
- * @return string The user answer
- *
* @throws \RuntimeException If there is no data to read in the input stream
+ * @return string The user answer
*/
public function ask($question, $default = null);
@@ -123,12 +122,11 @@ interface IOInterface
*
* @param string|array $question The question to ask
* @param callback $validator A PHP callback
- * @param null|integer $attempts Max number of times to ask before giving up (default of null means infinite)
+ * @param null|int $attempts Max number of times to ask before giving up (default of null means infinite)
* @param string $default The default answer if none is given by the user
*
- * @return mixed
- *
* @throws \Exception When any of the validators return an error
+ * @return mixed
*/
public function askAndValidate($question, $validator, $attempts = null, $default = null);
@@ -153,7 +151,7 @@ interface IOInterface
*
* @param string $repositoryName The unique name of repository
*
- * @return boolean
+ * @return bool
*/
public function hasAuthentication($repositoryName);
diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php
index c94eedc7f..5f1299a97 100644
--- a/src/Composer/Installer.php
+++ b/src/Composer/Installer.php
@@ -160,9 +160,8 @@ class Installer
/**
* Run installation (or update)
*
- * @return int 0 on success or a positive error code on failure
- *
* @throws \Exception
+ * @return int 0 on success or a positive error code on failure
*/
public function run()
{
@@ -358,11 +357,11 @@ class Installer
}
/**
- * @param RepositoryInterface $localRepo
- * @param RepositoryInterface $installedRepo
- * @param PlatformRepository $platformRepo
- * @param array $aliases
- * @param bool $withDevReqs
+ * @param RepositoryInterface $localRepo
+ * @param RepositoryInterface $installedRepo
+ * @param PlatformRepository $platformRepo
+ * @param array $aliases
+ * @param bool $withDevReqs
* @return int
*/
protected function doInstall($localRepo, $installedRepo, $platformRepo, $aliases, $withDevReqs)
@@ -700,8 +699,8 @@ class Installer
}
/**
- * @param bool $withDevReqs
- * @param RepositoryInterface|null $lockedRepository
+ * @param bool $withDevReqs
+ * @param RepositoryInterface|null $lockedRepository
* @return Pool
*/
private function createPool($withDevReqs, RepositoryInterface $lockedRepository = null)
@@ -766,8 +765,8 @@ class Installer
}
/**
- * @param RootPackageInterface $rootPackage
- * @param PlatformRepository $platformRepo
+ * @param RootPackageInterface $rootPackage
+ * @param PlatformRepository $platformRepo
* @return Request
*/
private function createRequest(RootPackageInterface $rootPackage, PlatformRepository $platformRepo)
@@ -804,16 +803,16 @@ class Installer
}
/**
- * @param WritableRepositoryInterface $localRepo
- * @param Pool $pool
- * @param PolicyInterface $policy
- * @param array $repositories
- * @param RepositoryInterface $installedRepo
- * @param RepositoryInterface $lockedRepository
- * @param bool $installFromLock
- * @param bool $withDevReqs
- * @param string $task
- * @param array|null $operations
+ * @param WritableRepositoryInterface $localRepo
+ * @param Pool $pool
+ * @param PolicyInterface $policy
+ * @param array $repositories
+ * @param RepositoryInterface $installedRepo
+ * @param RepositoryInterface $lockedRepository
+ * @param bool $installFromLock
+ * @param bool $withDevReqs
+ * @param string $task
+ * @param array|null $operations
* @return array
*/
private function processDevPackages($localRepo, $pool, $policy, $repositories, $installedRepo, $lockedRepository, $installFromLock, $withDevReqs, $task, array $operations = null)
@@ -948,8 +947,8 @@ class Installer
/**
* Loads the most "current" list of packages that are installed meaning from lock ideally or from installed repo as fallback
- * @param bool $withDevReqs
- * @param RepositoryInterface $installedRepo
+ * @param bool $withDevReqs
+ * @param RepositoryInterface $installedRepo
* @return array
*/
private function getCurrentPackages($withDevReqs, $installedRepo)
@@ -982,7 +981,7 @@ class Installer
foreach ($aliases as $alias) {
$normalizedAliases[$alias['package']][$alias['version']] = array(
'alias' => $alias['alias'],
- 'alias_normalized' => $alias['alias_normalized']
+ 'alias_normalized' => $alias['alias_normalized'],
);
}
@@ -1062,7 +1061,7 @@ class Installer
}
/**
- * @param PackageInterface $package
+ * @param PackageInterface $package
* @return bool
*/
private function isUpdateable(PackageInterface $package)
@@ -1095,7 +1094,7 @@ class Installer
}
/**
- * @param array $links
+ * @param array $links
* @return array
*/
private function extractPlatformRequirements($links)
@@ -1118,7 +1117,7 @@ class Installer
* update whitelist themselves.
*
* @param RepositoryInterface $localRepo
- * @param boolean $devMode
+ * @param bool $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
*/
@@ -1251,7 +1250,7 @@ class Installer
}
/**
- * @param RepositoryInterface $additionalInstalledRepository
+ * @param RepositoryInterface $additionalInstalledRepository
* @return $this
*/
public function setAdditionalInstalledRepository(RepositoryInterface $additionalInstalledRepository)
@@ -1264,7 +1263,7 @@ class Installer
/**
* Whether to run in drymode or not
*
- * @param boolean $dryRun
+ * @param bool $dryRun
* @return Installer
*/
public function setDryRun($dryRun = true)
@@ -1287,7 +1286,7 @@ class Installer
/**
* prefer source installation
*
- * @param boolean $preferSource
+ * @param bool $preferSource
* @return Installer
*/
public function setPreferSource($preferSource = true)
@@ -1300,7 +1299,7 @@ class Installer
/**
* prefer dist installation
*
- * @param boolean $preferDist
+ * @param bool $preferDist
* @return Installer
*/
public function setPreferDist($preferDist = true)
@@ -1349,7 +1348,7 @@ class Installer
/**
* update packages
*
- * @param boolean $update
+ * @param bool $update
* @return Installer
*/
public function setUpdate($update = true)
@@ -1362,7 +1361,7 @@ class Installer
/**
* enables dev packages
*
- * @param boolean $devMode
+ * @param bool $devMode
* @return Installer
*/
public function setDevMode($devMode = true)
@@ -1375,7 +1374,7 @@ class Installer
/**
* set whether to run autoloader or not
*
- * @param boolean $dumpAutoloader
+ * @param bool $dumpAutoloader
* @return Installer
*/
public function setDumpAutoloader($dumpAutoloader = true)
@@ -1388,7 +1387,7 @@ class Installer
/**
* set whether to run scripts or not
*
- * @param boolean $runScripts
+ * @param bool $runScripts
* @return Installer
*/
public function setRunScripts($runScripts = true)
@@ -1414,7 +1413,7 @@ class Installer
/**
* run in verbose mode
*
- * @param boolean $verbose
+ * @param bool $verbose
* @return Installer
*/
public function setVerbose($verbose = true)
@@ -1437,7 +1436,7 @@ class Installer
/**
* set ignore Platform Package requirements
*
- * @param boolean $ignorePlatformReqs
+ * @param bool $ignorePlatformReqs
* @return Installer
*/
public function setIgnorePlatformRequirements($ignorePlatformReqs = false)
@@ -1464,7 +1463,7 @@ class Installer
/**
* Should dependencies of whitelisted packages be updated recursively?
*
- * @param boolean $updateDependencies
+ * @param bool $updateDependencies
* @return Installer
*/
public function setWhitelistDependencies($updateDependencies = true)
@@ -1477,7 +1476,7 @@ class Installer
/**
* Should packages be preferred in a stable version when updating?
*
- * @param boolean $preferStable
+ * @param bool $preferStable
* @return Installer
*/
public function setPreferStable($preferStable = true)
@@ -1490,7 +1489,7 @@ class Installer
/**
* Should packages be preferred in a lowest version when updating?
*
- * @param boolean $preferLowest
+ * @param bool $preferLowest
* @return Installer
*/
public function setPreferLowest($preferLowest = true)
diff --git a/src/Composer/Installer/InstallationManager.php b/src/Composer/Installer/InstallationManager.php
index a43acbbda..b774f83c9 100644
--- a/src/Composer/Installer/InstallationManager.php
+++ b/src/Composer/Installer/InstallationManager.php
@@ -89,9 +89,8 @@ class InstallationManager
*
* @param string $type package type
*
- * @return InstallerInterface
- *
* @throws \InvalidArgumentException if installer for provided type is not registered
+ * @return InstallerInterface
*/
public function getInstaller($type)
{
@@ -249,7 +248,7 @@ class InstallationManager
'header' => array('Content-type: application/x-www-form-urlencoded'),
'content' => http_build_query($params, '', '&'),
'timeout' => 3,
- )
+ ),
);
$context = StreamContextFactory::getContext($url, $opts);
@@ -273,7 +272,7 @@ class InstallationManager
'header' => array('Content-Type: application/json'),
'content' => json_encode($postData),
'timeout' => 6,
- )
+ ),
);
$context = StreamContextFactory::getContext($repoUrl, $opts);
diff --git a/src/Composer/Json/JsonFile.php b/src/Composer/Json/JsonFile.php
index 1c51a4251..ee4f04e84 100644
--- a/src/Composer/Json/JsonFile.php
+++ b/src/Composer/Json/JsonFile.php
@@ -137,8 +137,8 @@ class JsonFile
* Validates the schema of the current json file according to composer-schema.json rules
*
* @param int $schema a JsonFile::*_SCHEMA constant
- * @return bool true on success
* @throws JsonValidationException
+ * @return bool true on success
*/
public function validateSchema($schema = self::STRICT_SCHEMA)
{
@@ -218,7 +218,7 @@ class JsonFile
/**
* Throws an exception according to a given code with a customized message
*
- * @param int $code return code of json_last_error function
+ * @param int $code return code of json_last_error function
* @throws \RuntimeException
*/
private static function throwEncodeError($code)
@@ -269,10 +269,10 @@ class JsonFile
*
* @param string $json
* @param string $file
- * @return bool true on success
* @throws \UnexpectedValueException
* @throws JsonValidationException
* @throws ParsingException
+ * @return bool true on success
*/
protected static function validateSyntax($json, $file = null)
{
diff --git a/src/Composer/Json/JsonFormatter.php b/src/Composer/Json/JsonFormatter.php
index d109acae8..8e2005715 100644
--- a/src/Composer/Json/JsonFormatter.php
+++ b/src/Composer/Json/JsonFormatter.php
@@ -23,7 +23,6 @@ namespace Composer\Json;
class JsonFormatter
{
/**
- *
* This code is based on the function found at:
* http://recursive-design.com/blog/2008/03/11/format-json-with-php/
*
diff --git a/src/Composer/Package/AliasPackage.php b/src/Composer/Package/AliasPackage.php
index 130de6bae..8e1bb88fe 100644
--- a/src/Composer/Package/AliasPackage.php
+++ b/src/Composer/Package/AliasPackage.php
@@ -162,7 +162,7 @@ class AliasPackage extends BasePackage implements CompletePackageInterface
}
/**
- * @param array $links
+ * @param array $links
* @param string $linkType
* @internal param string $prettyVersion
* @return array
diff --git a/src/Composer/Package/Archiver/ArchiverInterface.php b/src/Composer/Package/Archiver/ArchiverInterface.php
index 72a06c1c9..a625f5c07 100644
--- a/src/Composer/Package/Archiver/ArchiverInterface.php
+++ b/src/Composer/Package/Archiver/ArchiverInterface.php
@@ -37,7 +37,7 @@ interface ArchiverInterface
* @param string $format The archive format
* @param string $sourceType The source type (git, svn, hg, etc.)
*
- * @return boolean true if the format is supported by the archiver
+ * @return bool true if the format is supported by the archiver
*/
public function supports($format, $sourceType);
}
diff --git a/src/Composer/Package/Archiver/HgExcludeFilter.php b/src/Composer/Package/Archiver/HgExcludeFilter.php
index fa2327c5f..b9c81cdc1 100644
--- a/src/Composer/Package/Archiver/HgExcludeFilter.php
+++ b/src/Composer/Package/Archiver/HgExcludeFilter.php
@@ -26,7 +26,7 @@ class HgExcludeFilter extends BaseExcludeFilter
/**
* Either HG_IGNORE_REGEX or HG_IGNORE_GLOB
- * @var integer
+ * @var int
*/
protected $patternMode;
diff --git a/src/Composer/Package/BasePackage.php b/src/Composer/Package/BasePackage.php
index 9b2a683ca..0369a36dd 100644
--- a/src/Composer/Package/BasePackage.php
+++ b/src/Composer/Package/BasePackage.php
@@ -161,7 +161,7 @@ abstract class BasePackage implements PackageInterface
/**
* checks if this package is a platform package
*
- * @return boolean
+ * @return bool
*/
public function isPlatform()
{
diff --git a/src/Composer/Package/CompletePackage.php b/src/Composer/Package/CompletePackage.php
index 0de1609d0..0a926a4ce 100644
--- a/src/Composer/Package/CompletePackage.php
+++ b/src/Composer/Package/CompletePackage.php
@@ -172,7 +172,7 @@ class CompletePackage extends Package implements CompletePackageInterface
}
/**
- * @return boolean
+ * @return bool
*/
public function isAbandoned()
{
@@ -180,7 +180,7 @@ class CompletePackage extends Package implements CompletePackageInterface
}
/**
- * @param boolean|string $abandoned
+ * @param bool|string $abandoned
*/
public function setAbandoned($abandoned)
{
diff --git a/src/Composer/Package/CompletePackageInterface.php b/src/Composer/Package/CompletePackageInterface.php
index 8263a6535..4036b3cec 100644
--- a/src/Composer/Package/CompletePackageInterface.php
+++ b/src/Composer/Package/CompletePackageInterface.php
@@ -82,7 +82,7 @@ interface CompletePackageInterface extends PackageInterface
/**
* Returns if the package is abandoned or not
*
- * @return boolean
+ * @return bool
*/
public function isAbandoned();
diff --git a/src/Composer/Package/Link.php b/src/Composer/Package/Link.php
index fb2662a6f..e695822fd 100644
--- a/src/Composer/Package/Link.php
+++ b/src/Composer/Package/Link.php
@@ -110,7 +110,7 @@ class Link
}
/**
- * @param PackageInterface $sourcePackage
+ * @param PackageInterface $sourcePackage
* @return string
*/
public function getPrettyString(PackageInterface $sourcePackage)
diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php
index a3c8baf32..dba5541be 100644
--- a/src/Composer/Package/Locker.php
+++ b/src/Composer/Package/Locker.php
@@ -245,7 +245,7 @@ class Locker
$lock = array(
'_readme' => array('This file locks the dependencies of your project to a known state',
'Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file',
- 'This file is @gener'.'ated automatically'),
+ 'This file is @gener'.'ated automatically', ),
'hash' => $this->hash,
'content-hash' => $this->contentHash,
'packages' => null,
@@ -426,6 +426,7 @@ class Locker
}
ksort($relevantContent);
+
return md5(json_encode($relevantContent));
}
}
diff --git a/src/Composer/Package/PackageInterface.php b/src/Composer/Package/PackageInterface.php
index ba34619f1..c88771cfd 100644
--- a/src/Composer/Package/PackageInterface.php
+++ b/src/Composer/Package/PackageInterface.php
@@ -197,7 +197,7 @@ interface PackageInterface
*
* @see getPrettyVersion
*
- * @param bool $truncate If the source reference is a sha1 hash, truncate it
+ * @param bool $truncate If the source reference is a sha1 hash, truncate it
* @return string version
*/
public function getFullPrettyVersion($truncate = true);
diff --git a/src/Composer/Package/Version/VersionGuesser.php b/src/Composer/Package/Version/VersionGuesser.php
index 6b9b020d4..4dd0be511 100644
--- a/src/Composer/Package/Version/VersionGuesser.php
+++ b/src/Composer/Package/Version/VersionGuesser.php
@@ -57,7 +57,7 @@ class VersionGuesser
/**
* @param array $packageConfig
- * @param string $path Path to guess into
+ * @param string $path Path to guess into
*/
public function guessVersion(array $packageConfig, $path)
{
diff --git a/src/Composer/Plugin/PluginManager.php b/src/Composer/Plugin/PluginManager.php
index be8d925cd..174055f4e 100644
--- a/src/Composer/Plugin/PluginManager.php
+++ b/src/Composer/Plugin/PluginManager.php
@@ -45,9 +45,9 @@ class PluginManager
/**
* Initializes plugin manager
*
- * @param IOInterface $io
- * @param Composer $composer
- * @param Composer $globalComposer
+ * @param IOInterface $io
+ * @param Composer $composer
+ * @param Composer $globalComposer
*/
public function __construct(IOInterface $io, Composer $composer, Composer $globalComposer = null)
{
diff --git a/src/Composer/Repository/ArtifactRepository.php b/src/Composer/Repository/ArtifactRepository.php
index 94e634313..01d662212 100644
--- a/src/Composer/Repository/ArtifactRepository.php
+++ b/src/Composer/Repository/ArtifactRepository.php
@@ -78,7 +78,7 @@ class ArtifactRepository extends ArrayRepository
/**
* Find a file by name, returning the one that has the shortest path.
*
- * @param \ZipArchive $zip
+ * @param \ZipArchive $zip
* @param $filename
* @return bool|int
*/
@@ -141,7 +141,7 @@ class ArtifactRepository extends ArrayRepository
$package['dist'] = array(
'type' => 'zip',
'url' => $file->getPathname(),
- 'shasum' => sha1_file($file->getRealPath())
+ 'shasum' => sha1_file($file->getRealPath()),
);
$package = $this->loader->load($package);
diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php
index 2853a1ea0..ce73037a8 100644
--- a/src/Composer/Repository/ComposerRepository.php
+++ b/src/Composer/Repository/ComposerRepository.php
@@ -586,7 +586,7 @@ class ComposerRepository extends ArrayRepository
// url-encode $ signs in URLs as bad proxies choke on them
if (($pos = strpos($filename, '$')) && preg_match('{^https?://.*}i', $filename)) {
- $filename = substr($filename, 0, $pos) . '%24' . substr($filename, $pos+1);
+ $filename = substr($filename, 0, $pos) . '%24' . substr($filename, $pos + 1);
}
$retries = 3;
diff --git a/src/Composer/Repository/PathRepository.php b/src/Composer/Repository/PathRepository.php
index 18827f896..294a7a187 100644
--- a/src/Composer/Repository/PathRepository.php
+++ b/src/Composer/Repository/PathRepository.php
@@ -16,7 +16,6 @@ use Composer\Config;
use Composer\IO\IOInterface;
use Composer\Json\JsonFile;
use Composer\Package\Loader\ArrayLoader;
-use Composer\Package\Loader\LoaderInterface;
use Composer\Package\Version\VersionGuesser;
use Composer\Semver\VersionParser;
use Composer\Util\ProcessExecutor;
@@ -74,9 +73,9 @@ class PathRepository extends ArrayRepository
/**
* Initializes path repository.
*
- * @param array $repoConfig
+ * @param array $repoConfig
* @param IOInterface $io
- * @param Config $config
+ * @param Config $config
*/
public function __construct(array $repoConfig, IOInterface $io, Config $config)
{
@@ -104,7 +103,7 @@ class PathRepository extends ArrayRepository
foreach ($this->getUrlMatches() as $url) {
$path = realpath($url) . '/';
$composerFilePath = $path.'composer.json';
-
+
if (!file_exists($composerFilePath)) {
continue;
}
@@ -140,6 +139,6 @@ class PathRepository extends ArrayRepository
*/
private function getUrlMatches()
{
- return glob($this->url, GLOB_MARK|GLOB_ONLYDIR);
+ return glob($this->url, GLOB_MARK | GLOB_ONLYDIR);
}
}
diff --git a/src/Composer/Repository/RepositoryManager.php b/src/Composer/Repository/RepositoryManager.php
index 336a735b6..372dc8979 100644
--- a/src/Composer/Repository/RepositoryManager.php
+++ b/src/Composer/Repository/RepositoryManager.php
@@ -91,8 +91,8 @@ class RepositoryManager
*
* @param string $type repository type
* @param array $config repository configuration
- * @return RepositoryInterface
* @throws \InvalidArgumentException if repository for provided type is not registered
+ * @return RepositoryInterface
*/
public function createRepository($type, $config)
{
diff --git a/src/Composer/Repository/Vcs/PerforceDriver.php b/src/Composer/Repository/Vcs/PerforceDriver.php
index c7c225b27..01d4a52d8 100644
--- a/src/Composer/Repository/Vcs/PerforceDriver.php
+++ b/src/Composer/Repository/Vcs/PerforceDriver.php
@@ -119,7 +119,7 @@ class PerforceDriver extends VcsDriver
'type' => 'perforce',
'url' => $this->repoConfig['url'],
'reference' => $identifier,
- 'p4user' => $this->perforce->getUser()
+ 'p4user' => $this->perforce->getUser(),
);
return $source;
diff --git a/src/Composer/Repository/Vcs/VcsDriverInterface.php b/src/Composer/Repository/Vcs/VcsDriverInterface.php
index dd30baacd..307d63ef6 100644
--- a/src/Composer/Repository/Vcs/VcsDriverInterface.php
+++ b/src/Composer/Repository/Vcs/VcsDriverInterface.php
@@ -77,14 +77,13 @@ interface VcsDriverInterface
* Return true if the repository has a composer file for a given identifier,
* false otherwise.
*
- * @param string $identifier Any identifier to a specific branch/tag/commit
- * @return boolean Whether the repository has a composer file for a given identifier.
+ * @param string $identifier Any identifier to a specific branch/tag/commit
+ * @return bool Whether the repository has a composer file for a given identifier.
*/
public function hasComposerFile($identifier);
/**
* Performs any cleanup necessary as the driver is not longer needed
- *
*/
public function cleanup();
diff --git a/src/Composer/Script/Event.php b/src/Composer/Script/Event.php
index bde7e3b6f..138f43c1a 100644
--- a/src/Composer/Script/Event.php
+++ b/src/Composer/Script/Event.php
@@ -35,7 +35,7 @@ class Event extends BaseEvent
private $io;
/**
- * @var boolean Dev mode flag
+ * @var bool Dev mode flag
*/
private $devMode;
@@ -45,7 +45,7 @@ class Event extends BaseEvent
* @param string $name The event name
* @param Composer $composer The composer object
* @param IOInterface $io The IOInterface object
- * @param boolean $devMode Whether or not we are in dev mode
+ * @param bool $devMode Whether or not we are in dev mode
* @param array $args Arguments passed by the user
* @param array $flags Optional flags to pass data not as argument
*/
@@ -80,7 +80,7 @@ class Event extends BaseEvent
/**
* Return the dev mode flag
*
- * @return boolean
+ * @return bool
*/
public function isDevMode()
{
diff --git a/src/Composer/Util/ConfigValidator.php b/src/Composer/Util/ConfigValidator.php
index dfd662ea0..a7ddaca9b 100644
--- a/src/Composer/Util/ConfigValidator.php
+++ b/src/Composer/Util/ConfigValidator.php
@@ -38,8 +38,8 @@ class ConfigValidator
/**
* Validates the config, and returns the result.
*
- * @param string $file The path to the file
- * @param integer $arrayLoaderValidationFlags Flags for ArrayLoader validation
+ * @param string $file The path to the file
+ * @param int $arrayLoaderValidationFlags Flags for ArrayLoader validation
*
* @return array a triple containing the errors, publishable errors, and warnings
*/
diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php
index c36347fb7..93b1a4010 100644
--- a/src/Composer/Util/Filesystem.php
+++ b/src/Composer/Util/Filesystem.php
@@ -88,10 +88,9 @@ class Filesystem
* Uses the process component if proc_open is enabled on the PHP
* installation.
*
- * @param string $directory
- * @return bool
- *
+ * @param string $directory
* @throws \RuntimeException
+ * @return bool
*/
public function removeDirectory($directory)
{
@@ -174,10 +173,9 @@ class Filesystem
/**
* Attempts to unlink a file and in case of failure retries after 350ms on windows
*
- * @param string $path
- * @return bool
- *
+ * @param string $path
* @throws \RuntimeException
+ * @return bool
*/
public function unlink($path)
{
@@ -200,10 +198,9 @@ class Filesystem
/**
* Attempts to rmdir a file and in case of failure retries after 350ms on windows
*
- * @param string $path
- * @return bool
- *
+ * @param string $path
* @throws \RuntimeException
+ * @return bool
*/
public function rmdir($path)
{
diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php
index 5d84ebbf3..1d4a98294 100644
--- a/src/Composer/Util/Git.php
+++ b/src/Composer/Util/Git.php
@@ -105,9 +105,7 @@ class Git
return;
}
}
- } elseif ( // private non-github repo that failed to authenticate
- $this->isAuthenticationFailure($url, $match)
- ) {
+ } elseif ($this->isAuthenticationFailure($url, $match)) { // private non-github repo that failed to authenticate
if (strpos($match[2], '@')) {
list($authParts, $match[2]) = explode('@', $match[2], 2);
}
@@ -119,7 +117,7 @@ class Git
$defaultUsername = null;
if (isset($authParts) && $authParts) {
if (false !== strpos($authParts, ':')) {
- list($defaultUsername,) = explode(':', $authParts, 2);
+ list($defaultUsername, ) = explode(':', $authParts, 2);
} else {
$defaultUsername = $authParts;
}
diff --git a/src/Composer/Util/NoProxyPattern.php b/src/Composer/Util/NoProxyPattern.php
index 4e5c0c76b..994149268 100644
--- a/src/Composer/Util/NoProxyPattern.php
+++ b/src/Composer/Util/NoProxyPattern.php
@@ -114,7 +114,7 @@ class NoProxyPattern
* @param string $cidr IPv4 block in CIDR notation
* @param string $ip IPv4 address
*
- * @return boolean
+ * @return bool
*/
private static function inCIDRBlock($cidr, $ip)
{
diff --git a/src/Composer/Util/Perforce.php b/src/Composer/Util/Perforce.php
index 8e79f87b3..c1eaeebe9 100644
--- a/src/Composer/Util/Perforce.php
+++ b/src/Composer/Util/Perforce.php
@@ -297,7 +297,7 @@ class Perforce
}
throw new \Exception('p4 command not found in path: ' . $errorOutput);
}
- throw new \Exception('Invalid user name: ' . $this->getUser() );
+ throw new \Exception('Invalid user name: ' . $this->getUser());
}
return true;
@@ -305,7 +305,7 @@ class Perforce
public function connectClient()
{
- $p4CreateClientCommand = $this->generateP4Command('client -i < ' . str_replace( " ", "\\ ", $this->getP4ClientSpec() ));
+ $p4CreateClientCommand = $this->generateP4Command('client -i < ' . str_replace(" ", "\\ ", $this->getP4ClientSpec()));
$this->executeCommand($p4CreateClientCommand);
}
diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php
index 12ec0fbfc..f3ad94a82 100644
--- a/src/Composer/Util/RemoteFilesystem.php
+++ b/src/Composer/Util/RemoteFilesystem.php
@@ -56,11 +56,11 @@ class RemoteFilesystem
/**
* Copy the remote file in local.
*
- * @param string $originUrl The origin URL
- * @param string $fileUrl The file URL
- * @param string $fileName the local filename
- * @param boolean $progress Display the progression
- * @param array $options Additional context options
+ * @param string $originUrl The origin URL
+ * @param string $fileUrl The file URL
+ * @param string $fileName the local filename
+ * @param bool $progress Display the progression
+ * @param array $options Additional context options
*
* @return bool true
*/
@@ -72,10 +72,10 @@ class RemoteFilesystem
/**
* Get the content.
*
- * @param string $originUrl The origin URL
- * @param string $fileUrl The file URL
- * @param boolean $progress Display the progression
- * @param array $options Additional context options
+ * @param string $originUrl The origin URL
+ * @param string $fileUrl The file URL
+ * @param bool $progress Display the progression
+ * @param array $options Additional context options
*
* @return bool|string The content
*/
@@ -107,11 +107,11 @@ class RemoteFilesystem
/**
* Get file content or copy action.
*
- * @param string $originUrl The origin URL
- * @param string $fileUrl The file URL
- * @param array $additionalOptions context options
- * @param string $fileName the local filename
- * @param boolean $progress Display the progression
+ * @param string $originUrl The origin URL
+ * @param string $fileUrl The file URL
+ * @param array $additionalOptions context options
+ * @param string $fileName the local filename
+ * @param bool $progress Display the progression
*
* @throws TransportException|\Exception
* @throws TransportException When the file could not be downloaded
@@ -195,7 +195,7 @@ class RemoteFilesystem
$this->degradedMode = true;
$this->io->writeError(array(
''.$e->getMessage().'',
- 'Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info'
+ 'Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info',
));
return $this->get($this->originUrl, $this->fileUrl, $additionalOptions, $this->fileName, $this->progress);
@@ -253,7 +253,7 @@ class RemoteFilesystem
$this->degradedMode = true;
$this->io->writeError(array(
'Failed to decode response: '.$e->getMessage().'',
- 'Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info'
+ 'Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info',
));
return $this->get($this->originUrl, $this->fileUrl, $additionalOptions, $this->fileName, $this->progress);
@@ -303,7 +303,7 @@ class RemoteFilesystem
$this->degradedMode = true;
$this->io->writeError(array(
''.$e->getMessage().'',
- 'Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info'
+ 'Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info',
));
return $this->get($this->originUrl, $this->fileUrl, $additionalOptions, $this->fileName, $this->progress);
@@ -322,12 +322,12 @@ class RemoteFilesystem
/**
* Get notification action.
*
- * @param integer $notificationCode The notification code
- * @param integer $severity The severity level
+ * @param int $notificationCode The notification code
+ * @param int $severity The severity level
* @param string $message The message
- * @param integer $messageCode The message code
- * @param integer $bytesTransferred The loaded size
- * @param integer $bytesMax The total size
+ * @param int $messageCode The message code
+ * @param int $bytesTransferred The loaded size
+ * @param int $bytesMax The total size
* @throws TransportException
*/
protected function callbackGet($notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax)
@@ -436,7 +436,7 @@ class RemoteFilesystem
php_uname('s'),
php_uname('r'),
$phpVersion
- )
+ ),
);
if (extension_loaded('zlib')) {
diff --git a/src/Composer/Util/StreamContextFactory.php b/src/Composer/Util/StreamContextFactory.php
index ffeaf3f83..cd8c05d92 100644
--- a/src/Composer/Util/StreamContextFactory.php
+++ b/src/Composer/Util/StreamContextFactory.php
@@ -26,8 +26,8 @@ final class StreamContextFactory
* @param string $url URL the context is to be used for
* @param array $defaultOptions Options to merge with the default
* @param array $defaultParams Parameters to specify on the context
- * @return resource Default context
* @throws \RuntimeException if https proxy required and OpenSSL uninstalled
+ * @return resource Default context
*/
public static function getContext($url, array $defaultOptions = array(), array $defaultParams = array())
{
diff --git a/src/Composer/Util/Svn.php b/src/Composer/Util/Svn.php
index d5694b3be..4117499c8 100644
--- a/src/Composer/Util/Svn.php
+++ b/src/Composer/Util/Svn.php
@@ -54,7 +54,7 @@ class Svn
protected $process;
/**
- * @var integer
+ * @var int
*/
protected $qtyAuthTries = 0;
@@ -94,9 +94,8 @@ class Svn
* @param string $path Target for a checkout
* @param bool $verbose Output all output to the user
*
- * @return string
- *
* @throws \RuntimeException
+ * @return string
*/
public function execute($command, $url, $cwd = null, $path = null, $verbose = false)
{
@@ -147,7 +146,7 @@ class Svn
}
/**
- * @param boolean $cacheCredentials
+ * @param bool $cacheCredentials
*/
public function setCacheCredentials($cacheCredentials)
{
@@ -157,8 +156,8 @@ class Svn
/**
* Repositories requests credentials, let's put them in.
*
- * @return \Composer\Util\Svn
* @throws \RuntimeException
+ * @return \Composer\Util\Svn
*/
protected function doAuthDance()
{
@@ -229,8 +228,8 @@ class Svn
/**
* Get the password for the svn command. Can be empty.
*
- * @return string
* @throws \LogicException
+ * @return string
*/
protected function getPassword()
{
@@ -244,8 +243,8 @@ class Svn
/**
* Get the username for the svn command.
*
- * @return string
* @throws \LogicException
+ * @return string
*/
protected function getUsername()
{
diff --git a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
index b5f6e930b..8c7727058 100644
--- a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
+++ b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
@@ -200,7 +200,7 @@ class AutoloadGeneratorTest extends TestCase
$package->setDevAutoload(array(
'files' => array('devfiles/foo.php'),
'psr-0' => array(
- 'Main' => 'tests/'
+ 'Main' => 'tests/',
),
));
@@ -381,7 +381,7 @@ class AutoloadGeneratorTest extends TestCase
$package->setAutoload(array(
'psr-0' => array('Prefix' => 'foo/bar/non/existing/'),
- 'psr-4' => array('Prefix\\' => 'foo/bar/non/existing2/')
+ 'psr-4' => array('Prefix\\' => 'foo/bar/non/existing2/'),
));
$this->repository->expects($this->once())
@@ -720,7 +720,7 @@ class AutoloadGeneratorTest extends TestCase
$mainPackage = new Package('z', '1.0', '1.0');
$mainPackage->setAutoload(array(
'psr-0' => array('A\\B' => $this->workingDir.'/lib'),
- 'classmap' => array($this->workingDir.'/src')
+ 'classmap' => array($this->workingDir.'/src'),
));
$mainPackage->setRequires(array(new Link('z', 'a/a')));
diff --git a/tests/Composer/Test/ConfigTest.php b/tests/Composer/Test/ConfigTest.php
index e50af5e87..bbcb1d37e 100644
--- a/tests/Composer/Test/ConfigTest.php
+++ b/tests/Composer/Test/ConfigTest.php
@@ -35,7 +35,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
$data = array();
$data['local config inherits system defaults'] = array(
array(
- 'packagist' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true)
+ 'packagist' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true),
),
array(),
);
@@ -44,7 +44,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
array(),
array(
array('packagist' => false),
- )
+ ),
);
$data['local config adds above defaults'] = array(
@@ -62,7 +62,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
$data['system config adds above core defaults'] = array(
array(
'example.com' => array('type' => 'composer', 'url' => 'http://example.com'),
- 'packagist' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true)
+ 'packagist' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true),
),
array(),
array(
@@ -73,11 +73,11 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
$data['local config can disable repos by name and re-add them anonymously to bring them above system config'] = array(
array(
0 => array('type' => 'composer', 'url' => 'http://packagist.org'),
- 'example.com' => array('type' => 'composer', 'url' => 'http://example.com')
+ 'example.com' => array('type' => 'composer', 'url' => 'http://example.com'),
),
array(
array('packagist' => false),
- array('type' => 'composer', 'url' => 'http://packagist.org')
+ array('type' => 'composer', 'url' => 'http://packagist.org'),
),
array(
'example.com' => array('type' => 'composer', 'url' => 'http://example.com'),
@@ -87,10 +87,10 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
$data['local config can override by name to bring a repo above system config'] = array(
array(
'packagist' => array('type' => 'composer', 'url' => 'http://packagistnew.org'),
- 'example.com' => array('type' => 'composer', 'url' => 'http://example.com')
+ 'example.com' => array('type' => 'composer', 'url' => 'http://example.com'),
),
array(
- 'packagist' => array('type' => 'composer', 'url' => 'http://packagistnew.org')
+ 'packagist' => array('type' => 'composer', 'url' => 'http://packagistnew.org'),
),
array(
'example.com' => array('type' => 'composer', 'url' => 'http://example.com'),
@@ -139,7 +139,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
$config->merge(array('config' => array(
'bin-dir' => '$HOME/foo',
'cache-dir' => '/baz/',
- 'vendor-dir' => 'vendor'
+ 'vendor-dir' => 'vendor',
)));
$home = rtrim(getenv('HOME') ?: getenv('USERPROFILE'), '\\/');
@@ -153,7 +153,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
$config = new Config(false, '/foo/bar');
$config->merge(array('config' => array(
'bin-dir' => '{$vendor-dir}/foo',
- 'vendor-dir' => 'vendor'
+ 'vendor-dir' => 'vendor',
)));
$this->assertEquals('/foo/bar/vendor', $config->get('vendor-dir'));
diff --git a/tests/Composer/Test/DependencyResolver/SolverTest.php b/tests/Composer/Test/DependencyResolver/SolverTest.php
index 9d4d41462..2c67d7464 100644
--- a/tests/Composer/Test/DependencyResolver/SolverTest.php
+++ b/tests/Composer/Test/DependencyResolver/SolverTest.php
@@ -503,7 +503,7 @@ class SolverTest extends TestCase
$this->repo->addPackage($packageX = $this->getPackage('X', '1.0'));
$packageX->setRequires(array(
'a' => new Link('X', 'A', $this->getVersionConstraint('>=', '2.0.0.0'), 'requires'),
- 'b' => new Link('X', 'B', $this->getVersionConstraint('>=', '2.0.0.0'), 'requires')
+ 'b' => new Link('X', 'B', $this->getVersionConstraint('>=', '2.0.0.0'), 'requires'),
));
$this->repo->addPackage($packageA = $this->getPackage('A', '2.0.0'));
@@ -522,7 +522,7 @@ class SolverTest extends TestCase
$this->repo->addPackage($packageS = $this->getPackage('S', '2.0.0'));
$packageS->setReplaces(array(
'a' => new Link('S', 'A', $this->getVersionConstraint('>=', '2.0.0.0'), 'replaces'),
- 'b' => new Link('S', 'B', $this->getVersionConstraint('>=', '2.0.0.0'), 'replaces')
+ 'b' => new Link('S', 'B', $this->getVersionConstraint('>=', '2.0.0.0'), 'replaces'),
));
$this->reposComplete();
@@ -850,13 +850,13 @@ class SolverTest extends TestCase
$result[] = array(
'job' => 'update',
'from' => $operation->getInitialPackage(),
- 'to' => $operation->getTargetPackage()
+ 'to' => $operation->getTargetPackage(),
);
} else {
$job = ('uninstall' === $operation->getJobType() ? 'remove' : 'install');
$result[] = array(
'job' => $job,
- 'package' => $operation->getPackage()
+ 'package' => $operation->getPackage(),
);
}
}
diff --git a/tests/Composer/Test/Downloader/PearPackageExtractorTest.php b/tests/Composer/Test/Downloader/PearPackageExtractorTest.php
index 5429d109d..10ac27955 100644
--- a/tests/Composer/Test/Downloader/PearPackageExtractorTest.php
+++ b/tests/Composer/Test/Downloader/PearPackageExtractorTest.php
@@ -46,7 +46,7 @@ class PearPackageExtractorTest extends \PHPUnit_Framework_TestCase
'to' => 'PEAR/Frontend/Gtk/xpm/black_close_icon.xpm',
'role' => 'php',
'tasks' => array(),
- )
+ ),
);
$this->assertSame($expectedFileActions, $fileActions);
}
@@ -69,7 +69,7 @@ class PearPackageExtractorTest extends \PHPUnit_Framework_TestCase
'to' => 'Net/URL.php',
'role' => 'php',
'tasks' => array(),
- )
+ ),
);
$this->assertSame($expectedFileActions, $fileActions);
}
@@ -99,16 +99,16 @@ class PearPackageExtractorTest extends \PHPUnit_Framework_TestCase
'role' => 'php',
'tasks' => array(),
),
- 'php/Test.php' => array (
+ 'php/Test.php' => array(
'from' => 'Zend_Authentication-2.0.0beta4/php/Test.php',
'to' => '/php/Test.php',
'role' => 'script',
- 'tasks' => array (
- array (
+ 'tasks' => array(
+ array(
'from' => '@version@',
'to' => 'version',
- )
- )
+ ),
+ ),
),
'renamedFile.php' => array(
'from' => 'Zend_Authentication-2.0.0beta4/renamedFile.php',
diff --git a/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php b/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php
index e0cb196cb..925772d42 100644
--- a/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php
+++ b/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php
@@ -28,7 +28,7 @@ class EventDispatcherTest extends TestCase
{
$io = $this->getMock('Composer\IO\IOInterface');
$dispatcher = $this->getDispatcherStubForListenersTest(array(
- 'Composer\Test\EventDispatcher\EventDispatcherTest::call'
+ 'Composer\Test\EventDispatcher\EventDispatcherTest::call',
), $io);
$io->expects($this->at(0))
@@ -50,7 +50,7 @@ class EventDispatcherTest extends TestCase
{
$io = $this->getMock('Composer\IO\IOInterface');
$dispatcher = $this->getDispatcherStubForListenersTest(array(
- 'Composer\Test\EventDispatcher\EventDispatcherTest::expectsCommandEvent'
+ 'Composer\Test\EventDispatcher\EventDispatcherTest::expectsCommandEvent',
), $io);
$this->assertEquals(1, $dispatcher->dispatchScript(ScriptEvents::POST_INSTALL_CMD, false));
@@ -60,7 +60,7 @@ class EventDispatcherTest extends TestCase
{
$io = $this->getMock('Composer\IO\IOInterface');
$dispatcher = $this->getDispatcherStubForListenersTest(array(
- 'Composer\Test\EventDispatcher\EventDispatcherTest::expectsVariableEvent'
+ 'Composer\Test\EventDispatcher\EventDispatcherTest::expectsVariableEvent',
), $io);
$this->assertEquals(1, $dispatcher->dispatchScript(ScriptEvents::POST_INSTALL_CMD, false));
diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php
index 336e1307c..5339b8ff3 100644
--- a/tests/Composer/Test/InstallerTest.php
+++ b/tests/Composer/Test/InstallerTest.php
@@ -107,7 +107,7 @@ class InstallerTest extends TestCase
$a,
new ArrayRepository(array($b)),
array(
- 'install' => array($b)
+ 'install' => array($b),
),
);
@@ -127,7 +127,7 @@ class InstallerTest extends TestCase
$a,
new ArrayRepository(array($a, $b)),
array(
- 'install' => array($b)
+ 'install' => array($b),
),
);
diff --git a/tests/Composer/Test/Json/ComposerSchemaTest.php b/tests/Composer/Test/Json/ComposerSchemaTest.php
index cf44d4a84..51949797c 100644
--- a/tests/Composer/Test/Json/ComposerSchemaTest.php
+++ b/tests/Composer/Test/Json/ComposerSchemaTest.php
@@ -44,7 +44,7 @@ class ComposerSchemaTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(array(
array(
'property' => 'minimum-stability',
- 'message' => 'Does not match the regex pattern ^dev|alpha|beta|rc|RC|stable$'
+ 'message' => 'Does not match the regex pattern ^dev|alpha|beta|rc|RC|stable$',
),
), $this->check($json), 'empty string');
@@ -52,7 +52,7 @@ class ComposerSchemaTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(array(
array(
'property' => 'minimum-stability',
- 'message' => 'Does not match the regex pattern ^dev|alpha|beta|rc|RC|stable$'
+ 'message' => 'Does not match the regex pattern ^dev|alpha|beta|rc|RC|stable$',
),
), $this->check($json), 'dummy');
diff --git a/tests/Composer/Test/Json/JsonManipulatorTest.php b/tests/Composer/Test/Json/JsonManipulatorTest.php
index 0e974ad35..fd6d49584 100644
--- a/tests/Composer/Test/Json/JsonManipulatorTest.php
+++ b/tests/Composer/Test/Json/JsonManipulatorTest.php
@@ -38,7 +38,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
" \"require\": {\n".
" \"vendor/baz\": \"qux\"\n".
" }\n".
-"}\n"
+"}\n",
),
array(
'{
@@ -53,7 +53,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"vendor/baz": "qux"
}
}
-'
+',
),
array(
'{
@@ -68,7 +68,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"vendor/baz": "qux"
}
}
-'
+',
),
array(
'{
@@ -87,7 +87,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"vendor/baz": "qux"
}
}
-'
+',
),
array(
'{
@@ -107,7 +107,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"vendor/baz": "qux"
}
}
-'
+',
),
array(
'{
@@ -127,7 +127,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"vendor/baz": "qux"
}
}
-'
+',
),
array(
'{
@@ -159,7 +159,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
}
}]
}
-'
+',
),
array(
'{
@@ -188,7 +188,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"foo": "qux"
}
}
-'
+',
),
array(
'{
@@ -207,7 +207,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"foo": "qux"
}
}
-'
+',
),
array(
'{
@@ -229,7 +229,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"foo": "qux"
}
}
-'
+',
),
array(
'{
@@ -277,7 +277,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"foo": "qux"
}
}
-'
+',
),
);
}
@@ -311,7 +311,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"vendor/baz": "qux"
}
}
-'
+',
),
array(
'{
@@ -329,7 +329,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"foo": "bar"
}
}
-'
+',
),
array(
'{
@@ -401,7 +401,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
}
}
}
-'
+',
),
'works on simple ones last' => array(
'{
@@ -426,7 +426,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
}
}
}
-'
+',
),
'works on simple ones unique' => array(
'{
@@ -443,7 +443,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"repositories": {
}
}
-'
+',
),
'works on simple ones middle' => array(
'{
@@ -476,7 +476,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
}
}
}
-'
+',
),
'works on undefined ones' => array(
'{
@@ -497,7 +497,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
}
}
}
-'
+',
),
'works on child having unmatched name' => array(
'{
@@ -518,7 +518,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
}
}
}
-'
+',
),
'works on child having duplicate name' => array(
'{
@@ -541,7 +541,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
}
}
}
-'
+',
),
'works on empty repos' => array(
'{
@@ -549,19 +549,19 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
}
}',
'bar',
- true
+ true,
),
'works on empty repos2' => array(
'{
"repositories": {}
}',
'bar',
- true
+ true,
),
'works on missing repos' => array(
"{\n}",
'bar',
- true
+ true,
),
'works on deep repos' => array(
'{
@@ -577,7 +577,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
"repositories": {
}
}
-'
+',
),
'fails on deep repos with borked texts' => array(
'{
@@ -588,7 +588,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
}
}',
'bar',
- false
+ false,
),
'fails on deep repos with borked texts2' => array(
'{
@@ -599,7 +599,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
}
}',
'bar',
- false
+ false,
),
'fails on deep arrays with borked texts' => array(
'{
@@ -610,7 +610,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
]
}',
'bar',
- false
+ false,
),
'fails on deep arrays with borked texts2' => array(
'{
@@ -621,7 +621,7 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
]
}',
'bar',
- false
+ false,
),
);
}
diff --git a/tests/Composer/Test/Json/JsonValidationExceptionTest.php b/tests/Composer/Test/Json/JsonValidationExceptionTest.php
index 76959d688..31ba9b7bf 100644
--- a/tests/Composer/Test/Json/JsonValidationExceptionTest.php
+++ b/tests/Composer/Test/Json/JsonValidationExceptionTest.php
@@ -36,7 +36,7 @@ class JsonValidationExceptionTest extends \PHPUnit_Framework_TestCase
{
return array(
array('test message', array()),
- array(null, null)
+ array(null, null),
);
}
}
diff --git a/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php b/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php
index 3c0c44abe..f395eba6e 100644
--- a/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php
+++ b/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php
@@ -14,7 +14,6 @@ namespace Composer\Test\Package\Archiver;
use Composer\Package\Archiver\ArchivableFilesFinder;
use Composer\Util\Filesystem;
-
use Symfony\Component\Process\Process;
use Symfony\Component\Process\ExecutableFinder;
@@ -287,7 +286,7 @@ class ArchivableFilesFinderTest extends \PHPUnit_Framework_TestCase
*
* @param string $process The name of the binary to test.
*
- * @return boolean True if the process is available, false otherwise.
+ * @return bool True if the process is available, false otherwise.
*/
protected function isProcessAvailable($process)
{
diff --git a/tests/Composer/Test/Package/BasePackageTest.php b/tests/Composer/Test/Package/BasePackageTest.php
index d8d4ac8ed..c54762fca 100644
--- a/tests/Composer/Test/Package/BasePackageTest.php
+++ b/tests/Composer/Test/Package/BasePackageTest.php
@@ -54,22 +54,22 @@ class BasePackageTest extends \PHPUnit_Framework_TestCase
array(
'sourceReference' => 'v2.1.0-RC2',
'truncate' => true,
- 'expected' => 'PrettyVersion v2.1.0-RC2'
+ 'expected' => 'PrettyVersion v2.1.0-RC2',
),
array(
'sourceReference' => 'bbf527a27356414bfa9bf520f018c5cb7af67c77',
'truncate' => true,
- 'expected' => 'PrettyVersion bbf527a'
+ 'expected' => 'PrettyVersion bbf527a',
),
array(
'sourceReference' => 'v1.0.0',
'truncate' => false,
- 'expected' => 'PrettyVersion v1.0.0'
+ 'expected' => 'PrettyVersion v1.0.0',
),
array(
'sourceReference' => 'bbf527a27356414bfa9bf520f018c5cb7af67c77',
'truncate' => false,
- 'expected' => 'PrettyVersion bbf527a27356414bfa9bf520f018c5cb7af67c77'
+ 'expected' => 'PrettyVersion bbf527a27356414bfa9bf520f018c5cb7af67c77',
),
);
diff --git a/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php b/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php
index 852d667e4..c2c820fb1 100644
--- a/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php
+++ b/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php
@@ -45,7 +45,7 @@ class ArrayDumperTest extends \PHPUnit_Framework_TestCase
array(
'name' => 'foo',
'version' => '1.0',
- 'version_normalized' => '1.0.0.0'
+ 'version_normalized' => '1.0.0.0',
),
$config
);
@@ -100,7 +100,7 @@ class ArrayDumperTest extends \PHPUnit_Framework_TestCase
return array(
array(
'type',
- 'library'
+ 'library',
),
array(
'time',
@@ -110,46 +110,46 @@ class ArrayDumperTest extends \PHPUnit_Framework_TestCase
),
array(
'authors',
- array('Nils Adermann ', 'Jordi Boggiano ')
+ array('Nils Adermann ', 'Jordi Boggiano '),
),
array(
'homepage',
- 'https://getcomposer.org'
+ 'https://getcomposer.org',
),
array(
'description',
- 'Dependency Manager'
+ 'Dependency Manager',
),
array(
'keywords',
array('package', 'dependency', 'autoload'),
null,
- array('autoload', 'dependency', 'package')
+ array('autoload', 'dependency', 'package'),
),
array(
'bin',
array('bin/composer'),
- 'binaries'
+ 'binaries',
),
array(
'license',
- array('MIT')
+ array('MIT'),
),
array(
'autoload',
- array('psr-0' => array('Composer' => 'src/'))
+ array('psr-0' => array('Composer' => 'src/')),
),
array(
'repositories',
- array('packagist' => false)
+ array('packagist' => false),
),
array(
'scripts',
- array('post-update-cmd' => 'MyVendor\\MyClass::postUpdate')
+ array('post-update-cmd' => 'MyVendor\\MyClass::postUpdate'),
),
array(
'extra',
- array('class' => 'MyVendor\\Installer')
+ array('class' => 'MyVendor\\Installer'),
),
array(
'archive',
@@ -174,7 +174,7 @@ class ArrayDumperTest extends \PHPUnit_Framework_TestCase
array(
'suggest',
array('foo/bar' => 'very useful package'),
- 'suggests'
+ 'suggests',
),
array(
'support',
@@ -184,43 +184,43 @@ class ArrayDumperTest extends \PHPUnit_Framework_TestCase
'require',
array(new Link('foo', 'foo/bar', new Constraint('=', '1.0.0.0'), 'requires', '1.0.0'), new Link('bar', 'bar/baz', new Constraint('=', '1.0.0.0'), 'requires', '1.0.0')),
'requires',
- array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0')
+ array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0'),
),
array(
'require-dev',
array(new Link('foo', 'foo/bar', new Constraint('=', '1.0.0.0'), 'requires', '1.0.0'), new Link('bar', 'bar/baz', new Constraint('=', '1.0.0.0'), 'requires', '1.0.0')),
'devRequires',
- array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0')
+ array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0'),
),
array(
'suggest',
array('foo/bar' => 'very useful package', 'bar/baz' => 'another useful package'),
'suggests',
- array('bar/baz' => 'another useful package', 'foo/bar' => 'very useful package')
+ array('bar/baz' => 'another useful package', 'foo/bar' => 'very useful package'),
),
array(
'provide',
array(new Link('foo', 'foo/bar', new Constraint('=', '1.0.0.0'), 'requires', '1.0.0'), new Link('bar', 'bar/baz', new Constraint('=', '1.0.0.0'), 'requires', '1.0.0')),
'provides',
- array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0')
+ array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0'),
),
array(
'replace',
array(new Link('foo', 'foo/bar', new Constraint('=', '1.0.0.0'), 'requires', '1.0.0'), new Link('bar', 'bar/baz', new Constraint('=', '1.0.0.0'), 'requires', '1.0.0')),
'replaces',
- array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0')
+ array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0'),
),
array(
'conflict',
array(new Link('foo', 'foo/bar', new Constraint('=', '1.0.0.0'), 'requires', '1.0.0'), new Link('bar', 'bar/baz', new Constraint('=', '1.0.0.0'), 'requires', '1.0.0')),
'conflicts',
- array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0')
+ array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0'),
),
array(
'transport-options',
array('ssl' => array('local_cert' => '/opt/certs/test.pem')),
- 'transportOptions'
- )
+ 'transportOptions',
+ ),
);
}
diff --git a/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php b/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php
index b452a4095..10963b55b 100644
--- a/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php
+++ b/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php
@@ -17,7 +17,6 @@ use Composer\Package\Dumper\ArrayDumper;
class ArrayLoaderTest extends \PHPUnit_Framework_TestCase
{
-
/**
* @var ArrayLoader
*/
@@ -124,7 +123,7 @@ class ArrayLoaderTest extends \PHPUnit_Framework_TestCase
'exclude' => array('/foo/bar', 'baz', '!/foo/bar/baz'),
),
'transport-options' => array('ssl' => array('local_cert' => '/opt/certs/test.pem')),
- 'abandoned' => 'foo/bar'
+ 'abandoned' => 'foo/bar',
);
$package = $this->loader->load($config);
@@ -195,7 +194,7 @@ class ArrayLoaderTest extends \PHPUnit_Framework_TestCase
$config = array(
'name' => 'A',
'version' => '1.2.3.4',
- 'abandoned' => 'foo/bar'
+ 'abandoned' => 'foo/bar',
);
$package = $this->loader->load($config);
@@ -207,7 +206,7 @@ class ArrayLoaderTest extends \PHPUnit_Framework_TestCase
{
$config = array(
'name' => 'A',
- 'version' => '1.2.3.4'
+ 'version' => '1.2.3.4',
);
$package = $this->loader->load($config);
diff --git a/tests/Composer/Test/Package/Loader/RootPackageLoaderTest.php b/tests/Composer/Test/Package/Loader/RootPackageLoaderTest.php
index e393d3536..218d6e5ff 100644
--- a/tests/Composer/Test/Package/Loader/RootPackageLoaderTest.php
+++ b/tests/Composer/Test/Package/Loader/RootPackageLoaderTest.php
@@ -41,7 +41,7 @@ class RootPackageLoaderTest extends \PHPUnit_Framework_TestCase
'foo/bar' => '~2.1.0-beta2',
'bar/baz' => '1.0.x-dev as 1.2.0',
'qux/quux' => '1.0.*@rc',
- 'zux/complex' => '~1.0,>=1.0.2@dev'
+ 'zux/complex' => '~1.0,>=1.0.2@dev',
),
'minimum-stability' => 'alpha',
));
@@ -83,8 +83,6 @@ class RootPackageLoaderTest extends \PHPUnit_Framework_TestCase
$this->assertEquals("No version set (parsed as 1.0.0)", $package->getPrettyVersion());
}
-
-
public function testFeatureBranchPrettyVersion()
{
if (!function_exists('proc_open')) {
diff --git a/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php b/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
index ab61b6c15..4668099bf 100644
--- a/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
+++ b/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
@@ -118,7 +118,7 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
array(
'type' => 'composer',
'url' => 'https://packagist.org/',
- )
+ ),
),
'config' => array(
'bin-dir' => 'bin',
@@ -139,14 +139,14 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
'branch-alias' => array(
'dev-master' => '2.0-dev',
'dev-old' => '1.0.x-dev',
- '3.x-dev' => '3.1.x-dev'
+ '3.x-dev' => '3.1.x-dev',
),
),
'bin' => array(
'bin/foo',
'bin/bar',
),
- 'transport-options' => array('ssl' => array('local_cert' => '/opt/certs/test.pem'))
+ 'transport-options' => array('ssl' => array('local_cert' => '/opt/certs/test.pem')),
),
),
array( // test as array
@@ -220,8 +220,8 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
'name' => 'foo',
),
array(
- 'name : invalid value (foo), must match [A-Za-z0-9][A-Za-z0-9_.-]*/[A-Za-z0-9][A-Za-z0-9_.-]*'
- )
+ 'name : invalid value (foo), must match [A-Za-z0-9][A-Za-z0-9_.-]*/[A-Za-z0-9][A-Za-z0-9_.-]*',
+ ),
),
array(
array(
@@ -230,7 +230,7 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
),
array(
'homepage : should be a string, integer given',
- )
+ ),
),
array(
array(
@@ -241,7 +241,7 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
),
array(
'support.source : invalid value, must be a string',
- )
+ ),
),
array(
array(
@@ -249,8 +249,8 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
'autoload' => 'strings',
),
array(
- 'autoload : should be an array, string given'
- )
+ 'autoload : should be an array, string given',
+ ),
),
array(
array(
@@ -262,8 +262,8 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
),
),
array(
- 'autoload : invalid value (psr0), must be one of psr-0, psr-4, classmap, files'
- )
+ 'autoload : invalid value (psr0), must be one of psr-0, psr-4, classmap, files',
+ ),
),
array(
array(
@@ -271,8 +271,8 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
'transport-options' => 'test',
),
array(
- 'transport-options : should be an array, string given'
- )
+ 'transport-options : should be an array, string given',
+ ),
),
);
}
@@ -286,8 +286,8 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
'homepage' => 'foo:bar',
),
array(
- 'homepage : invalid value (foo:bar), must be an http/https URL'
- )
+ 'homepage : invalid value (foo:bar), must be an http/https URL',
+ ),
),
array(
array(
@@ -304,7 +304,7 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
'support.forum : invalid value (foo:bar), must be an http/https URL',
'support.issues : invalid value (foo:bar), must be an http/https URL',
'support.wiki : invalid value (foo:bar), must be an http/https URL',
- )
+ ),
),
array(
array(
@@ -322,35 +322,35 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
'require.bar/foo : unbound version constraints (dev-master) should be avoided',
'require.bar/hacked : unbound version constraints (@stable) should be avoided',
),
- false
+ false,
),
array(
array(
'name' => 'foo/bar',
'extra' => array(
'branch-alias' => array(
- '5.x-dev' => '3.1.x-dev'
+ '5.x-dev' => '3.1.x-dev',
),
- )
+ ),
),
array(
- 'extra.branch-alias.5.x-dev : the target branch (3.1.x-dev) is not a valid numeric alias for this version'
+ 'extra.branch-alias.5.x-dev : the target branch (3.1.x-dev) is not a valid numeric alias for this version',
),
- false
+ false,
),
array(
array(
'name' => 'foo/bar',
'extra' => array(
'branch-alias' => array(
- '5.x-dev' => '3.1-dev'
+ '5.x-dev' => '3.1-dev',
),
- )
+ ),
),
array(
- 'extra.branch-alias.5.x-dev : the target branch (3.1-dev) is not a valid numeric alias for this version'
+ 'extra.branch-alias.5.x-dev : the target branch (3.1-dev) is not a valid numeric alias for this version',
),
- false
+ false,
),
);
}
diff --git a/tests/Composer/Test/Package/LockerTest.php b/tests/Composer/Test/Package/LockerTest.php
index 2a45b1c66..79f82e74d 100644
--- a/tests/Composer/Test/Package/LockerTest.php
+++ b/tests/Composer/Test/Package/LockerTest.php
@@ -71,8 +71,8 @@ class LockerTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue(array(
'packages' => array(
array('name' => 'pkg1', 'version' => '1.0.0-beta'),
- array('name' => 'pkg2', 'version' => '0.1.10')
- )
+ array('name' => 'pkg2', 'version' => '0.1.10'),
+ ),
)));
$repo = $locker->getLockedRepository();
@@ -127,12 +127,12 @@ class LockerTest extends \PHPUnit_Framework_TestCase
->with(array(
'_readme' => array('This file locks the dependencies of your project to a known state',
'Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file',
- 'This file is @gener'.'ated automatically'),
+ 'This file is @gener'.'ated automatically', ),
'hash' => $hash,
'content-hash' => $contentHash,
'packages' => array(
array('name' => 'pkg1', 'version' => '1.0.0-beta'),
- array('name' => 'pkg2', 'version' => '0.1.10')
+ array('name' => 'pkg2', 'version' => '0.1.10'),
),
'packages-dev' => array(),
'aliases' => array(),
diff --git a/tests/Composer/Test/Plugin/PluginInstallerTest.php b/tests/Composer/Test/Plugin/PluginInstallerTest.php
index 4af7197f7..b449d7e90 100644
--- a/tests/Composer/Test/Plugin/PluginInstallerTest.php
+++ b/tests/Composer/Test/Plugin/PluginInstallerTest.php
@@ -216,7 +216,7 @@ class PluginInstallerTest extends TestCase
}
/**
- * @param string $newPluginApiVersion
+ * @param string $newPluginApiVersion
* @param CompletePackage[] $plugins
*/
private function setPluginApiVersionWithPlugins($newPluginApiVersion, array $plugins = array())
diff --git a/tests/Composer/Test/Repository/ComposerRepositoryTest.php b/tests/Composer/Test/Repository/ComposerRepositoryTest.php
index 06fa58b6a..3b35714df 100644
--- a/tests/Composer/Test/Repository/ComposerRepositoryTest.php
+++ b/tests/Composer/Test/Repository/ComposerRepositoryTest.php
@@ -75,8 +75,8 @@ class ComposerRepositoryTest extends TestCase
array('foo/bar' => array(
'name' => 'foo/bar',
'versions' => array(
- '1.0.0' => array('name' => 'foo/bar', 'version' => '1.0.0')
- )
+ '1.0.0' => array('name' => 'foo/bar', 'version' => '1.0.0'),
+ ),
)),
),
// New repository format
@@ -110,7 +110,7 @@ class ComposerRepositoryTest extends TestCase
$properties = array(
'cache' => $cache,
'loader' => new ArrayLoader(),
- 'providerListing' => array('p/a.json' => array('sha256' => 'xxx'))
+ 'providerListing' => array('p/a.json' => array('sha256' => 'xxx')),
);
foreach ($properties as $property => $value) {
@@ -140,7 +140,7 @@ class ComposerRepositoryTest extends TestCase
'name' => 'a',
'version' => '0.6',
)),
- )
+ ),
)));
$pool = $this->getMock('Composer\DependencyResolver\Pool');
diff --git a/tests/Composer/Test/Repository/FilesystemRepositoryTest.php b/tests/Composer/Test/Repository/FilesystemRepositoryTest.php
index fa1ec6d5b..6f8b71d20 100644
--- a/tests/Composer/Test/Repository/FilesystemRepositoryTest.php
+++ b/tests/Composer/Test/Repository/FilesystemRepositoryTest.php
@@ -26,7 +26,7 @@ class FilesystemRepositoryTest extends TestCase
->expects($this->once())
->method('read')
->will($this->returnValue(array(
- array('name' => 'package1', 'version' => '1.0.0-beta', 'type' => 'vendor')
+ array('name' => 'package1', 'version' => '1.0.0-beta', 'type' => 'vendor'),
)));
$json
->expects($this->once())
@@ -94,7 +94,7 @@ class FilesystemRepositoryTest extends TestCase
->expects($this->once())
->method('write')
->with(array(
- array('name' => 'mypkg', 'type' => 'library', 'version' => '0.1.10', 'version_normalized' => '0.1.10.0')
+ array('name' => 'mypkg', 'type' => 'library', 'version' => '0.1.10', 'version_normalized' => '0.1.10.0'),
));
$repository->addPackage($this->getPackage('mypkg', '0.1.10'));
diff --git a/tests/Composer/Test/Repository/PathRepositoryTest.php b/tests/Composer/Test/Repository/PathRepositoryTest.php
index 9dd7c1249..47b7ac24f 100644
--- a/tests/Composer/Test/Repository/PathRepositoryTest.php
+++ b/tests/Composer/Test/Repository/PathRepositoryTest.php
@@ -15,9 +15,6 @@ namespace Composer\Repository;
use Composer\Package\Loader\ArrayLoader;
use Composer\Semver\VersionParser;
use Composer\TestCase;
-use Composer\IO\NullIO;
-use Composer\Config;
-use Composer\Package\BasePackage;
class PathRepositoryTest extends TestCase
{
diff --git a/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php b/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php
index 1d9d39767..3e68282f4 100644
--- a/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php
+++ b/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php
@@ -106,18 +106,18 @@ class ChannelReaderTest extends TestCase
'ext',
'xml'
),
- )
+ ),
)
)
- )
+ ),
)
- )
+ ),
)
);
$packages = $ref->invoke($reader, $channelInfo, new VersionParser());
- $expectedPackage = new CompletePackage('pear-test.loc/sample', '1.0.0.1' , '1.0.0.1');
+ $expectedPackage = new CompletePackage('pear-test.loc/sample', '1.0.0.1', '1.0.0.1');
$expectedPackage->setType('pear-library');
$expectedPackage->setDistType('file');
$expectedPackage->setDescription('description');
diff --git a/tests/Composer/Test/Repository/PearRepositoryTest.php b/tests/Composer/Test/Repository/PearRepositoryTest.php
index 7eaad13e7..f076d72cc 100644
--- a/tests/Composer/Test/Repository/PearRepositoryTest.php
+++ b/tests/Composer/Test/Repository/PearRepositoryTest.php
@@ -40,7 +40,7 @@ class PearRepositoryTest extends TestCase
);
$repoConfig = array(
- 'url' => $url
+ 'url' => $url,
);
$this->createRepository($repoConfig);
@@ -64,7 +64,7 @@ class PearRepositoryTest extends TestCase
public function testRepositoryRead($url, array $expectedPackages)
{
$repoConfig = array(
- 'url' => $url
+ 'url' => $url,
);
if (!@file_get_contents('http://'.$url)) {
@@ -88,37 +88,37 @@ class PearRepositoryTest extends TestCase
'pear.php.net',
array(
array('name' => 'pear-pear.php.net/PEAR', 'version' => '1.9.4'),
- )
+ ),
),
array(
'pear.pdepend.org',
array(
array('name' => 'pear-pear.pdepend.org/PHP_Depend', 'version' => '1.0.5'),
- )
+ ),
),
array(
'pear.phpmd.org',
array(
array('name' => 'pear-pear.phpmd.org/PHP_PMD', 'version' => '1.3.3'),
- )
+ ),
),
array(
'pear.doctrine-project.org',
array(
array('name' => 'pear-pear.doctrine-project.org/DoctrineORM', 'version' => '2.2.2'),
- )
+ ),
),
array(
'pear.symfony-project.com',
array(
array('name' => 'pear-pear.symfony-project.com/YAML', 'version' => '1.0.6'),
- )
+ ),
),
array(
'pear.pirum-project.org',
array(
array('name' => 'pear-pear.pirum-project.org/Pirum', 'version' => '1.1.4'),
- )
+ ),
),
);
}
diff --git a/tests/Composer/Test/Util/GitHubTest.php b/tests/Composer/Test/Util/GitHubTest.php
index 1363afd15..83d18dbe4 100644
--- a/tests/Composer/Test/Util/GitHubTest.php
+++ b/tests/Composer/Test/Util/GitHubTest.php
@@ -18,8 +18,8 @@ use RecursiveArrayIterator;
use RecursiveIteratorIterator;
/**
-* @author Rob Bast
-*/
+ * @author Rob Bast
+ */
class GitHubTest extends \PHPUnit_Framework_TestCase
{
private $username = 'username';
diff --git a/tests/Composer/Test/Util/PerforceTest.php b/tests/Composer/Test/Util/PerforceTest.php
index dc727096d..f4d12d1be 100644
--- a/tests/Composer/Test/Util/PerforceTest.php
+++ b/tests/Composer/Test/Util/PerforceTest.php
@@ -53,7 +53,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
'depot' => self::TEST_DEPOT,
'branch' => self::TEST_BRANCH,
'p4user' => self::TEST_P4USER,
- 'unique_perforce_client_name' => self::TEST_CLIENT_NAME
+ 'unique_perforce_client_name' => self::TEST_CLIENT_NAME,
);
}
@@ -222,9 +222,9 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
'depot' => 'depot',
'branch' => 'branch',
'p4user' => 'user',
- 'p4password' => 'TEST_PASSWORD'
+ 'p4password' => 'TEST_PASSWORD',
);
- $this->perforce = new Perforce($repoConfig, 'port', 'path', $this->processExecutor, false, $this->getMockIOInterface(), 'TEST');
+ $this->perforce = new Perforce($repoConfig, 'port', 'path', $this->processExecutor, false, $this->getMockIOInterface(), 'TEST');
$password = $this->perforce->queryP4Password();
$this->assertEquals('TEST_PASSWORD', $password);
}
@@ -476,7 +476,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
'name' => 'test/perforce',
'description' => 'Basic project for testing',
'minimum-stability' => 'dev',
- 'autoload' => array('psr-0' => array())
+ 'autoload' => array('psr-0' => array()),
);
$this->assertEquals($expected, $result);
}
@@ -517,7 +517,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
'name' => 'test/perforce',
'description' => 'Basic project for testing',
'minimum-stability' => 'dev',
- 'autoload' => array('psr-0' => array())
+ 'autoload' => array('psr-0' => array()),
);
$this->assertEquals($expected, $result);
}
@@ -546,7 +546,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
'name' => 'test/perforce',
'description' => 'Basic project for testing',
'minimum-stability' => 'dev',
- 'autoload' => array('psr-0' => array())
+ 'autoload' => array('psr-0' => array()),
);
$this->assertEquals($expected, $result);
}
@@ -588,7 +588,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
'name' => 'test/perforce',
'description' => 'Basic project for testing',
'minimum-stability' => 'dev',
- 'autoload' => array('psr-0' => array())
+ 'autoload' => array('psr-0' => array()),
);
$this->assertEquals($expected, $result);
}
@@ -662,7 +662,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
'"psr-0" : {',
'}',
'}',
- '}'
+ '}',
);
return implode($composer_json);
@@ -688,7 +688,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
'SubmitOptions: revertunchanged',
PHP_EOL,
'LineEnd: local',
- PHP_EOL
+ PHP_EOL,
);
if ($withStream) {
$expectedArray[] = 'Stream:';
diff --git a/tests/Composer/Test/Util/StreamContextFactoryTest.php b/tests/Composer/Test/Util/StreamContextFactoryTest.php
index 2cc419670..590a868fd 100644
--- a/tests/Composer/Test/Util/StreamContextFactoryTest.php
+++ b/tests/Composer/Test/Util/StreamContextFactoryTest.php
@@ -52,11 +52,11 @@ class StreamContextFactoryTest extends \PHPUnit_Framework_TestCase
return array(
array(
$a = array('http' => array('follow_location' => 1, 'max_redirects' => 20)), array(),
- array('options' => $a), array()
+ array('options' => $a), array(),
),
array(
$a = array('http' => array('method' => 'GET', 'max_redirects' => 20, 'follow_location' => 1)), array('http' => array('method' => 'GET')),
- array('options' => $a, 'notification' => $f = function () {}), array('notification' => $f)
+ array('options' => $a, 'notification' => $f = function () {}), array('notification' => $f),
),
);
}
@@ -143,8 +143,8 @@ class StreamContextFactoryTest extends \PHPUnit_Framework_TestCase
'follow_location' => 1,
), 'ssl' => array(
'SNI_enabled' => true,
- 'SNI_server_name' => 'example.org'
- )
+ 'SNI_server_name' => 'example.org',
+ ),
);
if (PHP_VERSION_ID >= 50600) {
unset($expected['ssl']['SNI_server_name']);
@@ -173,8 +173,8 @@ class StreamContextFactoryTest extends \PHPUnit_Framework_TestCase
'follow_location' => 1,
), 'ssl' => array(
'SNI_enabled' => true,
- 'SNI_server_name' => 'example.org'
- )
+ 'SNI_server_name' => 'example.org',
+ ),
);
if (PHP_VERSION_ID >= 50600) {
unset($expected['ssl']['SNI_server_name']);
@@ -221,17 +221,17 @@ class StreamContextFactoryTest extends \PHPUnit_Framework_TestCase
{
$options = array(
'http' => array(
- 'header' => "X-Foo: bar\r\nContent-Type: application/json\r\nAuthorization: Basic aW52YWxpZA=="
- )
+ 'header' => "X-Foo: bar\r\nContent-Type: application/json\r\nAuthorization: Basic aW52YWxpZA==",
+ ),
);
$expectedOptions = array(
'http' => array(
'header' => array(
"X-Foo: bar",
"Authorization: Basic aW52YWxpZA==",
- "Content-Type: application/json"
- )
- )
+ "Content-Type: application/json",
+ ),
+ ),
);
$context = StreamContextFactory::getContext('http://example.org', $options);
$ctxoptions = stream_context_get_options($context);
diff --git a/tests/Composer/Test/Util/SvnTest.php b/tests/Composer/Test/Util/SvnTest.php
index b1f19ca1a..c54c9c504 100644
--- a/tests/Composer/Test/Util/SvnTest.php
+++ b/tests/Composer/Test/Util/SvnTest.php
@@ -60,9 +60,9 @@ class SvnTest extends \PHPUnit_Framework_TestCase
$config->merge(array(
'config' => array(
'http-basic' => array(
- 'svn.apache.org' => array('username' => 'foo', 'password' => 'bar')
- )
- )
+ 'svn.apache.org' => array('username' => 'foo', 'password' => 'bar'),
+ ),
+ ),
));
$svn = new Svn($url, new NullIO, $config);
@@ -81,9 +81,9 @@ class SvnTest extends \PHPUnit_Framework_TestCase
array(
'config' => array(
'http-basic' => array(
- 'svn.apache.org' => array('username' => 'foo', 'password' => 'bar')
- )
- )
+ 'svn.apache.org' => array('username' => 'foo', 'password' => 'bar'),
+ ),
+ ),
)
);
@@ -104,9 +104,9 @@ class SvnTest extends \PHPUnit_Framework_TestCase
array(
'config' => array(
'http-basic' => array(
- 'svn.apache.org' => array('username' => 'foo', 'password' => 'bar')
- )
- )
+ 'svn.apache.org' => array('username' => 'foo', 'password' => 'bar'),
+ ),
+ ),
)
);