main
Jordi Boggiano 12 years ago
parent b566ba77ac
commit 66e9dcddf4

@ -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');
}

@ -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)
{

@ -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)
{

@ -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');

@ -381,7 +381,7 @@ EOT
* @param string $ignoreFile
* @param string $vendor
*
* @return Boolean
* @return bool
*/
protected function hasVendorIgnore($ignoreFile, $vendor = 'vendor')
{

@ -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()
{

@ -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)
{

@ -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)
{

@ -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
*/

@ -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
*/

@ -65,7 +65,7 @@ class ConsoleIO implements IOInterface
*/
public function isVerbose()
{
return (Boolean) $this->input->getOption('verbose');
return (bool) $this->input->getOption('verbose');
}
/**

@ -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);

@ -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)
{

@ -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);

@ -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)
{

@ -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)

@ -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()
{

@ -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)
{

@ -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();

@ -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);
}

@ -20,7 +20,6 @@ use Composer\Package\Version\VersionParser;
*/
class PlatformRepository extends ArrayRepository
{
protected function initialize()
{
parent::initialize();

@ -27,7 +27,7 @@ interface RepositoryInterface extends \Countable
*
* @param PackageInterface $package package instance
*
* @return Boolean
* @return bool
*/
public function hasPackage(PackageInterface $package);

@ -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);
}
}

@ -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);
}

@ -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)
{

@ -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);
}

@ -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()
{

@ -22,4 +22,4 @@
</dir>
</contents>
<phprelease/>
</package>
</package>

Loading…
Cancel
Save