CS fixes
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)
|
||||
{
|
||||
|
@ -142,7 +142,7 @@ class ClassLoader
|
|||
* Loads the given class or interface.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
* @return Boolean|null True, if loaded
|
||||
* @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
|
||||
* @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')
|
||||
{
|
||||
|
|
|
@ -72,7 +72,7 @@ class Config
|
|||
* Checks whether a setting exists
|
||||
*
|
||||
* @param string $key
|
||||
* @return Boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function has($key)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -154,7 +154,7 @@ class Factory
|
|||
}
|
||||
|
||||
/**
|
||||
* @param IO\IOInterface $io
|
||||
* @param IOInterface $io
|
||||
* @param Config $config
|
||||
* @return Repository\RepositoryManager
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ interface InstallerInterface
|
|||
* Decides if the installer supports the given type
|
||||
*
|
||||
* @param string $packageType
|
||||
* @return Boolean
|
||||
* @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);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class ProjectInstaller implements InstallerInterface
|
|||
* Decides if the installer supports the given type
|
||||
*
|
||||
* @param string $packageType
|
||||
* @return Boolean
|
||||
* @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);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class Filesystem
|
|||
*
|
||||
* @param string $from
|
||||
* @param string $to
|
||||
* @param Boolean $directories if true, the source/target are considered to be directories
|
||||
* @param bool $directories if true, the source/target are considered to be directories
|
||||
* @return string
|
||||
*/
|
||||
public function findShortestPath($from, $to, $directories = false)
|
||||
|
@ -99,7 +99,7 @@ class Filesystem
|
|||
*
|
||||
* @param string $from
|
||||
* @param string $to
|
||||
* @param Boolean $directories if true, the source/target are considered to be directories
|
||||
* @param bool $directories if true, the source/target are considered to be directories
|
||||
* @return string
|
||||
*/
|
||||
public function findShortestPathCode($from, $to, $directories = false)
|
||||
|
@ -139,7 +139,7 @@ class Filesystem
|
|||
* Checks if the given path is absolute
|
||||
*
|
||||
* @param string $path
|
||||
* @return Boolean
|
||||
* @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);
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ class Svn
|
|||
* @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 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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue