From 66e9dcddf44e84f6550ad6430a2b391b0cfa569c Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 23 Jun 2012 11:58:18 +0200 Subject: [PATCH] CS fixes --- src/Composer/Autoload/AutoloadGenerator.php | 2 +- src/Composer/Autoload/ClassLoader.php | 10 ++-- src/Composer/Command/Command.php | 14 +++--- src/Composer/Command/DependsCommand.php | 2 +- src/Composer/Command/InitCommand.php | 2 +- src/Composer/Composer.php | 26 +++++----- src/Composer/Config.php | 4 +- src/Composer/Console/Application.php | 4 +- src/Composer/Downloader/DownloadManager.php | 6 +-- src/Composer/Factory.php | 48 +++++++++---------- src/Composer/IO/ConsoleIO.php | 2 +- src/Composer/IO/IOInterface.php | 14 +++--- .../Installer/InstallationManager.php | 2 +- src/Composer/Installer/InstallerInterface.php | 6 +-- src/Composer/Installer/ProjectInstaller.php | 4 +- src/Composer/Json/JsonFile.php | 12 ++--- src/Composer/Package/AliasPackage.php | 4 +- src/Composer/Package/Locker.php | 10 ++-- src/Composer/Package/PackageInterface.php | 2 +- .../Repository/CompositeRepository.php | 2 +- .../Repository/PlatformRepository.php | 1 - .../Repository/RepositoryInterface.php | 2 +- src/Composer/Repository/Vcs/VcsDriver.php | 4 +- .../Repository/Vcs/VcsDriverInterface.php | 4 +- src/Composer/Util/Filesystem.php | 16 +++---- src/Composer/Util/RemoteFilesystem.php | 4 +- src/Composer/Util/Svn.php | 12 ++--- .../Fixtures/Package_v2.1/package.xml | 2 +- 28 files changed, 110 insertions(+), 111 deletions(-) diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index 5ae4491a5..3c59ffaf7 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -132,7 +132,7 @@ EOF; if ($includePathFile = $this->getIncludePathsFile($packageMap, $filesystem, $relVendorPath, $vendorPath, $vendorPathCode, $appBaseDirCode)) { file_put_contents($targetDir.'/include_paths.php', $includePathFile); } - file_put_contents($vendorPath.'/autoload.php', $this->getAutoloadFile($vendorPathToTargetDirCode, true, true, (Boolean) $includePathFile, $targetDirLoader, $filesCode)); + file_put_contents($vendorPath.'/autoload.php', $this->getAutoloadFile($vendorPathToTargetDirCode, true, true, (bool) $includePathFile, $targetDirLoader, $filesCode)); copy(__DIR__.'/ClassLoader.php', $targetDir.'/ClassLoader.php'); } diff --git a/src/Composer/Autoload/ClassLoader.php b/src/Composer/Autoload/ClassLoader.php index 5b9574e93..d1c2cd57f 100644 --- a/src/Composer/Autoload/ClassLoader.php +++ b/src/Composer/Autoload/ClassLoader.php @@ -102,7 +102,7 @@ class ClassLoader /** * Turns on searching the include path for class files. * - * @param Boolean $useIncludePath + * @param bool $useIncludePath */ public function setUseIncludePath($useIncludePath) { @@ -113,7 +113,7 @@ class ClassLoader * Can be used to check if the autoloader uses the include path to check * for classes. * - * @return Boolean + * @return bool */ public function getUseIncludePath() { @@ -123,7 +123,7 @@ class ClassLoader /** * Registers this instance as an autoloader. * - * @param Boolean $prepend Whether to prepend the autoloader or not + * @param bool $prepend Whether to prepend the autoloader or not */ public function register($prepend = false) { @@ -141,8 +141,8 @@ class ClassLoader /** * Loads the given class or interface. * - * @param string $class The name of the class - * @return Boolean|null True, if loaded + * @param string $class The name of the class + * @return bool|null True, if loaded */ public function loadClass($class) { diff --git a/src/Composer/Command/Command.php b/src/Composer/Command/Command.php index 271cdbc65..849f83778 100644 --- a/src/Composer/Command/Command.php +++ b/src/Composer/Command/Command.php @@ -27,18 +27,18 @@ use Symfony\Component\Console\Command\Command as BaseCommand; abstract class Command extends BaseCommand { /** - * @var \Composer\Composer + * @var Composer */ private $composer; /** - * @var \Composer\IO\IOInterface + * @var IOInterface */ private $io; /** - * @param bool $required - * @return \Composer\Composer + * @param bool $required + * @return Composer */ public function getComposer($required = true) { @@ -59,7 +59,7 @@ abstract class Command extends BaseCommand } /** - * @param \Composer\Composer $composer + * @param Composer $composer */ public function setComposer(Composer $composer) { @@ -67,7 +67,7 @@ abstract class Command extends BaseCommand } /** - * @return \Composer\IO\IOInterface + * @return IOInterface */ public function getIO() { @@ -85,7 +85,7 @@ abstract class Command extends BaseCommand } /** - * @param \Composer\IO\IOInterface $io + * @param IOInterface $io */ public function setIO(IOInterface $io) { diff --git a/src/Composer/Command/DependsCommand.php b/src/Composer/Command/DependsCommand.php index 46f6a9b5f..4f6d3313b 100644 --- a/src/Composer/Command/DependsCommand.php +++ b/src/Composer/Command/DependsCommand.php @@ -74,7 +74,7 @@ EOT $needle = $input->getArgument('package'); $references = array(); - $verbose = (Boolean) $input->getOption('verbose'); + $verbose = (bool) $input->getOption('verbose'); $repos = $composer->getRepositoryManager()->getRepositories(); $types = $input->getOption('link-type'); diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index e80b43277..b78a41c3c 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -381,7 +381,7 @@ EOT * @param string $ignoreFile * @param string $vendor * - * @return Boolean + * @return bool */ protected function hasVendorIgnore($ignoreFile, $vendor = 'vendor') { diff --git a/src/Composer/Composer.php b/src/Composer/Composer.php index e2e9dfc39..5b85e172a 100644 --- a/src/Composer/Composer.php +++ b/src/Composer/Composer.php @@ -57,8 +57,8 @@ class Composer private $config; /** - * @param Package\PackageInterface $package - * @return void + * @param Package\PackageInterface $package + * @return void */ public function setPackage(PackageInterface $package) { @@ -66,7 +66,7 @@ class Composer } /** - * @return Package\PackageInterface + * @return Package\PackageInterface */ public function getPackage() { @@ -74,7 +74,7 @@ class Composer } /** - * @param Config $config + * @param Config $config */ public function setConfig(Config $config) { @@ -82,7 +82,7 @@ class Composer } /** - * @return Config + * @return Config */ public function getConfig() { @@ -90,7 +90,7 @@ class Composer } /** - * @param Package\Locker $locker + * @param Package\Locker $locker */ public function setLocker(Locker $locker) { @@ -98,7 +98,7 @@ class Composer } /** - * @return Package\Locker + * @return Package\Locker */ public function getLocker() { @@ -106,7 +106,7 @@ class Composer } /** - * @param Repository\RepositoryManager $manager + * @param Repository\RepositoryManager $manager */ public function setRepositoryManager(RepositoryManager $manager) { @@ -114,7 +114,7 @@ class Composer } /** - * @return Repository\RepositoryManager + * @return Repository\RepositoryManager */ public function getRepositoryManager() { @@ -122,7 +122,7 @@ class Composer } /** - * @param Downloader\DownloadManager $manager + * @param Downloader\DownloadManager $manager */ public function setDownloadManager(DownloadManager $manager) { @@ -130,7 +130,7 @@ class Composer } /** - * @return Downloader\DownloadManager + * @return Downloader\DownloadManager */ public function getDownloadManager() { @@ -138,7 +138,7 @@ class Composer } /** - * @param Installer\InstallationManager $manager + * @param Installer\InstallationManager $manager */ public function setInstallationManager(InstallationManager $manager) { @@ -146,7 +146,7 @@ class Composer } /** - * @return Installer\InstallationManager + * @return Installer\InstallationManager */ public function getInstallationManager() { diff --git a/src/Composer/Config.php b/src/Composer/Config.php index 090227340..b4ea02af6 100644 --- a/src/Composer/Config.php +++ b/src/Composer/Config.php @@ -71,8 +71,8 @@ class Config /** * Checks whether a setting exists * - * @param string $key - * @return Boolean + * @param string $key + * @return bool */ public function has($key) { diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 8dc58b8ce..e1f57d654 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -81,8 +81,8 @@ class Application extends BaseApplication } /** - * @param bool $required - * @return \Composer\Composer + * @param bool $required + * @return \Composer\Composer */ public function getComposer($required = true) { diff --git a/src/Composer/Downloader/DownloadManager.php b/src/Composer/Downloader/DownloadManager.php index d07d9eb1c..9fd7ea6b7 100644 --- a/src/Composer/Downloader/DownloadManager.php +++ b/src/Composer/Downloader/DownloadManager.php @@ -30,7 +30,7 @@ class DownloadManager /** * Initializes download manager. * - * @param Boolean $preferSource prefer downloading from source + * @param bool $preferSource prefer downloading from source */ public function __construct($preferSource = false, Filesystem $filesystem = null) { @@ -41,7 +41,7 @@ class DownloadManager /** * Makes downloader prefer source installation over the dist. * - * @param Boolean $preferSource prefer downloading from source + * @param bool $preferSource prefer downloading from source */ public function setPreferSource($preferSource) { @@ -123,7 +123,7 @@ class DownloadManager * * @param PackageInterface $package package instance * @param string $targetDir target dir - * @param Boolean $preferSource prefer installation from source + * @param bool $preferSource prefer installation from source * * @throws InvalidArgumentException if package have no urls to download from */ diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index 721bfb6c9..869df4871 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -70,11 +70,11 @@ class Factory /** * Creates a Composer instance * - * @param IOInterface $io IO instance - * @param array|string|null $localConfig either a configuration array or a filename to read from, if null it will - * read from the default filename - * @throws \InvalidArgumentException - * @return Composer + * @param IOInterface $io IO instance + * @param array|string|null $localConfig either a configuration array or a filename to read from, if null it will + * read from the default filename + * @throws \InvalidArgumentException + * @return Composer */ public function createComposer(IOInterface $io, $localConfig = null) { @@ -154,9 +154,9 @@ class Factory } /** - * @param IO\IOInterface $io - * @param Config $config - * @return Repository\RepositoryManager + * @param IOInterface $io + * @param Config $config + * @return Repository\RepositoryManager */ protected function createRepositoryManager(IOInterface $io, Config $config) { @@ -173,8 +173,8 @@ class Factory } /** - * @param Repository\RepositoryManager $rm - * @param string $vendorDir + * @param Repository\RepositoryManager $rm + * @param string $vendorDir */ protected function addLocalRepository(RepositoryManager $rm, $vendorDir) { @@ -183,8 +183,8 @@ class Factory } /** - * @param array $localConfig - * @return array + * @param array $localConfig + * @return array */ protected function addPackagistRepository(array $localConfig) { @@ -217,8 +217,8 @@ class Factory } /** - * @param IO\IOInterface $io - * @return Downloader\DownloadManager + * @param IO\IOInterface $io + * @return Downloader\DownloadManager */ public function createDownloadManager(IOInterface $io) { @@ -236,12 +236,12 @@ class Factory } /** - * @param Repository\RepositoryManager $rm - * @param Downloader\DownloadManager $dm - * @param string $vendorDir - * @param string $binDir - * @param IO\IOInterface $io - * @return Installer\InstallationManager + * @param Repository\RepositoryManager $rm + * @param Downloader\DownloadManager $dm + * @param string $vendorDir + * @param string $binDir + * @param IO\IOInterface $io + * @return Installer\InstallationManager */ protected function createInstallationManager(Repository\RepositoryManager $rm, Downloader\DownloadManager $dm, $vendorDir, $binDir, IOInterface $io) { @@ -254,8 +254,8 @@ class Factory } /** - * @param Repository\RepositoryManager $rm - * @param Installer\InstallationManager $im + * @param Repository\RepositoryManager $rm + * @param Installer\InstallationManager $im */ protected function purgePackages(Repository\RepositoryManager $rm, Installer\InstallationManager $im) { @@ -270,8 +270,8 @@ class Factory } /** - * @param IOInterface $io IO instance - * @param mixed $config either a configuration array or a filename to read from, if null it will read from + * @param IOInterface $io IO instance + * @param mixed $config either a configuration array or a filename to read from, if null it will read from * the default filename * @return Composer */ diff --git a/src/Composer/IO/ConsoleIO.php b/src/Composer/IO/ConsoleIO.php index 5f6f8d08f..08872baf7 100644 --- a/src/Composer/IO/ConsoleIO.php +++ b/src/Composer/IO/ConsoleIO.php @@ -65,7 +65,7 @@ class ConsoleIO implements IOInterface */ public function isVerbose() { - return (Boolean) $this->input->getOption('verbose'); + return (bool) $this->input->getOption('verbose'); } /** diff --git a/src/Composer/IO/IOInterface.php b/src/Composer/IO/IOInterface.php index e2adb2f9a..539688530 100644 --- a/src/Composer/IO/IOInterface.php +++ b/src/Composer/IO/IOInterface.php @@ -22,21 +22,21 @@ interface IOInterface /** * Is this input means interactive? * - * @return Boolean + * @return bool */ public function isInteractive(); /** * Is this input verbose? * - * @return Boolean + * @return bool */ public function isVerbose(); /** * Is this output decorated? * - * @return Boolean + * @return bool */ public function isDecorated(); @@ -44,7 +44,7 @@ interface IOInterface * Writes a message to the output. * * @param string|array $messages The message as an array of lines or a single string - * @param Boolean $newline Whether to add a newline or not + * @param bool $newline Whether to add a newline or not */ public function write($messages, $newline = true); @@ -52,7 +52,7 @@ interface IOInterface * Overwrites a previous message to the output. * * @param string|array $messages The message as an array of lines or a single string - * @param Boolean $newline Whether to add a newline or not + * @param bool $newline Whether to add a newline or not * @param integer $size The size of line */ public function overwrite($messages, $newline = true, $size = 80); @@ -75,9 +75,9 @@ interface IOInterface * The question will be asked until the user answers by nothing, yes, or no. * * @param string|array $question The question to ask - * @param Boolean $default The default answer if the user enters nothing + * @param bool $default The default answer if the user enters nothing * - * @return Boolean true if the user has confirmed, false otherwise + * @return bool true if the user has confirmed, false otherwise */ public function askConfirmation($question, $default = true); diff --git a/src/Composer/Installer/InstallationManager.php b/src/Composer/Installer/InstallationManager.php index 2aeda8657..0e7e7a947 100644 --- a/src/Composer/Installer/InstallationManager.php +++ b/src/Composer/Installer/InstallationManager.php @@ -102,7 +102,7 @@ class InstallationManager * @param InstalledRepositoryInterface $repo repository in which to check * @param PackageInterface $package package instance * - * @return Boolean + * @return bool */ public function isPackageInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) { diff --git a/src/Composer/Installer/InstallerInterface.php b/src/Composer/Installer/InstallerInterface.php index 227e598b2..144cbcdf6 100644 --- a/src/Composer/Installer/InstallerInterface.php +++ b/src/Composer/Installer/InstallerInterface.php @@ -26,8 +26,8 @@ interface InstallerInterface /** * Decides if the installer supports the given type * - * @param string $packageType - * @return Boolean + * @param string $packageType + * @return bool */ public function supports($packageType); @@ -37,7 +37,7 @@ interface InstallerInterface * @param InstalledRepositoryInterface $repo repository in which to check * @param PackageInterface $package package instance * - * @return Boolean + * @return bool */ public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package); diff --git a/src/Composer/Installer/ProjectInstaller.php b/src/Composer/Installer/ProjectInstaller.php index f91fd4405..cbc0ebfaf 100644 --- a/src/Composer/Installer/ProjectInstaller.php +++ b/src/Composer/Installer/ProjectInstaller.php @@ -36,8 +36,8 @@ class ProjectInstaller implements InstallerInterface /** * Decides if the installer supports the given type * - * @param string $packageType - * @return Boolean + * @param string $packageType + * @return bool */ public function supports($packageType) { diff --git a/src/Composer/Json/JsonFile.php b/src/Composer/Json/JsonFile.php index f463c777e..16675deb4 100644 --- a/src/Composer/Json/JsonFile.php +++ b/src/Composer/Json/JsonFile.php @@ -60,7 +60,7 @@ class JsonFile /** * Checks whether json file exists. * - * @return Boolean + * @return bool */ public function exists() { @@ -117,7 +117,7 @@ class JsonFile * Validates the schema of the current json file according to composer-schema.json rules * * @param int $schema a JsonFile::*_SCHEMA constant - * @return Boolean true on success + * @return bool true on success * @throws \UnexpectedValueException */ public function validateSchema($schema = self::STRICT_SCHEMA) @@ -174,9 +174,9 @@ class JsonFile $json = json_encode($data); - $prettyPrint = (Boolean) ($options & self::JSON_PRETTY_PRINT); - $unescapeUnicode = (Boolean) ($options & self::JSON_UNESCAPED_UNICODE); - $unescapeSlashes = (Boolean) ($options & self::JSON_UNESCAPED_SLASHES); + $prettyPrint = (bool) ($options & self::JSON_PRETTY_PRINT); + $unescapeUnicode = (bool) ($options & self::JSON_UNESCAPED_UNICODE); + $unescapeSlashes = (bool) ($options & self::JSON_UNESCAPED_SLASHES); if (!$prettyPrint && !$unescapeUnicode && !$unescapeSlashes) { return $json; @@ -282,7 +282,7 @@ class JsonFile * Validates the syntax of a JSON string * * @param string $json - * @return Boolean true on success + * @return bool true on success * @throws \UnexpectedValueException */ protected static function validateSyntax($json) diff --git a/src/Composer/Package/AliasPackage.php b/src/Composer/Package/AliasPackage.php index b96398f0c..14c0d65b0 100644 --- a/src/Composer/Package/AliasPackage.php +++ b/src/Composer/Package/AliasPackage.php @@ -159,7 +159,7 @@ class AliasPackage extends BasePackage * * Use by the policy for sorting manually aliased packages first, see #576 * - * @param Boolean $value + * @param bool $value */ public function setRootPackageAlias($value) { @@ -168,7 +168,7 @@ class AliasPackage extends BasePackage /** * @see setRootPackageAlias - * @return Boolean + * @return bool */ public function isRootPackageAlias() { diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php index cadf921f2..8b37e6c0d 100644 --- a/src/Composer/Package/Locker.php +++ b/src/Composer/Package/Locker.php @@ -51,8 +51,8 @@ class Locker /** * Checks whether locker were been locked (lockfile found). * - * @param Boolean $dev true to check if dev packages are locked - * @return Boolean + * @param bool $dev true to check if dev packages are locked + * @return bool */ public function isLocked($dev = false) { @@ -71,7 +71,7 @@ class Locker /** * Checks whether the lock file is still up to date with the current hash * - * @return Boolean + * @return bool */ public function isFresh() { @@ -83,7 +83,7 @@ class Locker /** * Searches and returns an array of locked packages, retrieved from registered repositories. * - * @param Boolean $dev true to retrieve the locked dev packages + * @param bool $dev true to retrieve the locked dev packages * @return array */ public function getLockedPackages($dev = false) @@ -170,7 +170,7 @@ class Locker * @param mixed $packages array of dev packages or null if installed without --dev * @param array $aliases array of aliases * - * @return Boolean + * @return bool */ public function setLockData(array $packages, $devPackages, array $aliases, $minimumStability, array $stabilityFlags) { diff --git a/src/Composer/Package/PackageInterface.php b/src/Composer/Package/PackageInterface.php index 4d088ac5f..2b693bafa 100644 --- a/src/Composer/Package/PackageInterface.php +++ b/src/Composer/Package/PackageInterface.php @@ -71,7 +71,7 @@ interface PackageInterface /** * Returns whether the package is a development virtual package or a concrete one * - * @return Boolean + * @return bool */ public function isDev(); diff --git a/src/Composer/Repository/CompositeRepository.php b/src/Composer/Repository/CompositeRepository.php index ddfdf2810..4de713faa 100644 --- a/src/Composer/Repository/CompositeRepository.php +++ b/src/Composer/Repository/CompositeRepository.php @@ -110,7 +110,7 @@ class CompositeRepository implements RepositoryInterface */ public function removePackage(PackageInterface $package) { - foreach($this->repositories as $repository) { + foreach ($this->repositories as $repository) { /* @var $repository RepositoryInterface */ $repository->removePackage($package); } diff --git a/src/Composer/Repository/PlatformRepository.php b/src/Composer/Repository/PlatformRepository.php index e70f2f7db..0a685f2c8 100644 --- a/src/Composer/Repository/PlatformRepository.php +++ b/src/Composer/Repository/PlatformRepository.php @@ -20,7 +20,6 @@ use Composer\Package\Version\VersionParser; */ class PlatformRepository extends ArrayRepository { - protected function initialize() { parent::initialize(); diff --git a/src/Composer/Repository/RepositoryInterface.php b/src/Composer/Repository/RepositoryInterface.php index c18d9f5c0..89602378a 100644 --- a/src/Composer/Repository/RepositoryInterface.php +++ b/src/Composer/Repository/RepositoryInterface.php @@ -27,7 +27,7 @@ interface RepositoryInterface extends \Countable * * @param PackageInterface $package package instance * - * @return Boolean + * @return bool */ public function hasPackage(PackageInterface $package); diff --git a/src/Composer/Repository/Vcs/VcsDriver.php b/src/Composer/Repository/Vcs/VcsDriver.php index 3e2680942..ead688b69 100644 --- a/src/Composer/Repository/Vcs/VcsDriver.php +++ b/src/Composer/Repository/Vcs/VcsDriver.php @@ -57,7 +57,7 @@ abstract class VcsDriver implements VcsDriverInterface public function hasComposerFile($identifier) { try { - return (Boolean) $this->getComposerInformation($identifier); + return (bool) $this->getComposerInformation($identifier); } catch (TransportException $e) { } @@ -94,6 +94,6 @@ abstract class VcsDriver implements VcsDriverInterface protected static function isLocalUrl($url) { - return (Boolean) preg_match('{^(file://|/|[a-z]:[\\\\/])}i', $url); + return (bool) preg_match('{^(file://|/|[a-z]:[\\\\/])}i', $url); } } diff --git a/src/Composer/Repository/Vcs/VcsDriverInterface.php b/src/Composer/Repository/Vcs/VcsDriverInterface.php index a1ad3bad8..47023a91a 100644 --- a/src/Composer/Repository/Vcs/VcsDriverInterface.php +++ b/src/Composer/Repository/Vcs/VcsDriverInterface.php @@ -86,8 +86,8 @@ interface VcsDriverInterface * * @param IOInterface $io IO instance * @param string $url - * @param Boolean $shallow unless true, only shallow checks (url matching typically) should be done - * @return Boolean + * @param bool $shallow unless true, only shallow checks (url matching typically) should be done + * @return bool */ public static function supports(IOInterface $io, $url, $deep = false); } diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index 27f41a308..1b149cfd6 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -56,9 +56,9 @@ class Filesystem /** * Returns the shortest path from $from to $to * - * @param string $from - * @param string $to - * @param Boolean $directories if true, the source/target are considered to be directories + * @param string $from + * @param string $to + * @param bool $directories if true, the source/target are considered to be directories * @return string */ public function findShortestPath($from, $to, $directories = false) @@ -97,9 +97,9 @@ class Filesystem /** * Returns PHP code that, when executed in $from, will return the path to $to * - * @param string $from - * @param string $to - * @param Boolean $directories if true, the source/target are considered to be directories + * @param string $from + * @param string $to + * @param bool $directories if true, the source/target are considered to be directories * @return string */ public function findShortestPathCode($from, $to, $directories = false) @@ -138,8 +138,8 @@ class Filesystem /** * Checks if the given path is absolute * - * @param string $path - * @return Boolean + * @param string $path + * @return bool */ public function isAbsolutePath($path) { diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 32d84e1b5..61b40684b 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -49,7 +49,7 @@ class RemoteFilesystem * @param string $fileName the local filename * @param boolean $progress Display the progression * - * @return Boolean true + * @return bool true */ public function copy($originUrl, $fileUrl, $fileName, $progress = true) { @@ -136,7 +136,7 @@ class RemoteFilesystem // handle copy command if download was successful if (false !== $result && null !== $fileName) { - $result = (Boolean) @file_put_contents($fileName, $result); + $result = (bool) @file_put_contents($fileName, $result); if (false === $result) { throw new TransportException('The "'.$fileUrl.'" file could not be written to '.$fileName); } diff --git a/src/Composer/Util/Svn.php b/src/Composer/Util/Svn.php index 6c3309b45..865fd1387 100644 --- a/src/Composer/Util/Svn.php +++ b/src/Composer/Util/Svn.php @@ -66,11 +66,11 @@ class Svn * Execute an SVN command and try to fix up the process with credentials * if necessary. * - * @param string $command SVN command to run - * @param string $url SVN url - * @param string $cwd Working directory - * @param string $path Target for a checkout - * @param Boolean $verbose Output all output to the user + * @param string $command SVN command to run + * @param string $url SVN url + * @param string $cwd Working directory + * @param string $path Target for a checkout + * @param bool $verbose Output all output to the user * * @return string * @@ -226,7 +226,7 @@ class Svn * * @param string $url * - * @return Boolean + * @return bool */ protected function hasAuth() { diff --git a/tests/Composer/Test/Downloader/Fixtures/Package_v2.1/package.xml b/tests/Composer/Test/Downloader/Fixtures/Package_v2.1/package.xml index 6a982ef60..e49f38bfe 100644 --- a/tests/Composer/Test/Downloader/Fixtures/Package_v2.1/package.xml +++ b/tests/Composer/Test/Downloader/Fixtures/Package_v2.1/package.xml @@ -22,4 +22,4 @@ - \ No newline at end of file +