Fix CS
parent
52967c32cf
commit
40800df6bd
|
@ -33,7 +33,7 @@ class FundCommand extends BaseCommand
|
||||||
$this->setName('fund')
|
$this->setName('fund')
|
||||||
->setDescription('Discover how to help fund the maintenance of your dependencies.')
|
->setDescription('Discover how to help fund the maintenance of your dependencies.')
|
||||||
->setDefinition(array(
|
->setDefinition(array(
|
||||||
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text or json', 'text')
|
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text or json', 'text'),
|
||||||
))
|
))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
|
@ -467,7 +467,6 @@ class PoolBuilder
|
||||||
*/
|
*/
|
||||||
private function unlockPackage(Request $request, $name)
|
private function unlockPackage(Request $request, $name)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (
|
if (
|
||||||
// if we unfixed a replaced package name, we also need to unfix the replacer itself
|
// if we unfixed a replaced package name, we also need to unfix the replacer itself
|
||||||
$this->skippedLoad[$name] !== $name
|
$this->skippedLoad[$name] !== $name
|
||||||
|
|
|
@ -138,6 +138,7 @@ abstract class ArchiveDownloader extends FileDownloader
|
||||||
}
|
}
|
||||||
|
|
||||||
$promise = $filesystem->removeDirectoryAsync($temporaryDir);
|
$promise = $filesystem->removeDirectoryAsync($temporaryDir);
|
||||||
|
|
||||||
return $promise->then(function () use ($self, $package, $path, $temporaryDir) {
|
return $promise->then(function () use ($self, $package, $path, $temporaryDir) {
|
||||||
$self->removeCleanupPath($package, $temporaryDir);
|
$self->removeCleanupPath($package, $temporaryDir);
|
||||||
$self->removeCleanupPath($package, $path);
|
$self->removeCleanupPath($package, $path);
|
||||||
|
|
|
@ -218,6 +218,7 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
|
||||||
if (Platform::isWindows()) {
|
if (Platform::isWindows()) {
|
||||||
return ': Junctioning from '.$package->getDistUrl();
|
return ': Junctioning from '.$package->getDistUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ': Symlinking from '.$package->getDistUrl();
|
return ': Symlinking from '.$package->getDistUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ class InstalledVersions
|
||||||
$packages[] = array_keys($installed['versions']);
|
$packages[] = array_keys($installed['versions']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (1 === \count($packages)) {
|
if (1 === \count($packages)) {
|
||||||
return $packages[0];
|
return $packages[0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,6 @@ use Composer\Package\RootPackageInterface;
|
||||||
use Composer\Repository\InstalledArrayRepository;
|
use Composer\Repository\InstalledArrayRepository;
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
use Composer\Repository\InstalledRepository;
|
use Composer\Repository\InstalledRepository;
|
||||||
use Composer\Repository\FilterRepository;
|
|
||||||
use Composer\Repository\RootPackageRepository;
|
use Composer\Repository\RootPackageRepository;
|
||||||
use Composer\Repository\PlatformRepository;
|
use Composer\Repository\PlatformRepository;
|
||||||
use Composer\Repository\RepositoryInterface;
|
use Composer\Repository\RepositoryInterface;
|
||||||
|
|
|
@ -199,6 +199,7 @@ class BinaryInstaller
|
||||||
$proxyCode = "#!/usr/bin/env php";
|
$proxyCode = "#!/usr/bin/env php";
|
||||||
}
|
}
|
||||||
$binPathExported = var_export($binPath, true);
|
$binPathExported = var_export($binPath, true);
|
||||||
|
|
||||||
return $proxyCode . "\n" . <<<PROXY
|
return $proxyCode . "\n" . <<<PROXY
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ use Composer\IO\IOInterface;
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Util\Filesystem;
|
use Composer\Util\Filesystem;
|
||||||
use Composer\Installer\InstallationManager;
|
|
||||||
use React\Promise\PromiseInterface;
|
use React\Promise\PromiseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -375,7 +375,6 @@ class ArrayLoader implements LoaderInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
isset($config['default-branch'])
|
isset($config['default-branch'])
|
||||||
&& $config['default-branch'] === true
|
&& $config['default-branch'] === true
|
||||||
|
|
|
@ -17,13 +17,11 @@ use Composer\EventDispatcher\EventSubscriberInterface;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
use Composer\Package\CompletePackage;
|
use Composer\Package\CompletePackage;
|
||||||
use Composer\Package\Package;
|
use Composer\Package\Package;
|
||||||
use Composer\Package\RootPackage;
|
|
||||||
use Composer\Package\Version\VersionParser;
|
use Composer\Package\Version\VersionParser;
|
||||||
use Composer\Repository\RepositoryInterface;
|
use Composer\Repository\RepositoryInterface;
|
||||||
use Composer\Repository\InstalledRepository;
|
use Composer\Repository\InstalledRepository;
|
||||||
use Composer\Repository\RootPackageRepository;
|
use Composer\Repository\RootPackageRepository;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Package\RootPackageInterface;
|
|
||||||
use Composer\Package\Link;
|
use Composer\Package\Link;
|
||||||
use Composer\Semver\Constraint\Constraint;
|
use Composer\Semver\Constraint\Constraint;
|
||||||
use Composer\Plugin\Capability\Capability;
|
use Composer\Plugin\Capability\Capability;
|
||||||
|
|
|
@ -123,7 +123,6 @@ class FilesystemRepository extends WritableArrayRepository
|
||||||
|
|
||||||
$this->file->write($data);
|
$this->file->write($data);
|
||||||
|
|
||||||
|
|
||||||
if ($this->dumpVersions) {
|
if ($this->dumpVersions) {
|
||||||
$versions = $this->generateInstalledVersions($installationManager, $devMode);
|
$versions = $this->generateInstalledVersions($installationManager, $devMode);
|
||||||
|
|
||||||
|
|
|
@ -146,6 +146,7 @@ class Filesystem
|
||||||
$promise = $this->getProcess()->executeAsync($cmd);
|
$promise = $this->getProcess()->executeAsync($cmd);
|
||||||
|
|
||||||
$self = $this;
|
$self = $this;
|
||||||
|
|
||||||
return $promise->then(function ($process) use ($directory, $self) {
|
return $promise->then(function ($process) use ($directory, $self) {
|
||||||
// clear stat cache because external processes aren't tracked by the php stat cache
|
// clear stat cache because external processes aren't tracked by the php stat cache
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
@ -165,7 +166,8 @@ class Filesystem
|
||||||
*
|
*
|
||||||
* @return bool|null Returns null, when no edge case was hit. Otherwise a bool whether removal was successfull
|
* @return bool|null Returns null, when no edge case was hit. Otherwise a bool whether removal was successfull
|
||||||
*/
|
*/
|
||||||
private function removeEdgeCases($directory) {
|
private function removeEdgeCases($directory)
|
||||||
|
{
|
||||||
if ($this->isSymlinkedDirectory($directory)) {
|
if ($this->isSymlinkedDirectory($directory)) {
|
||||||
return $this->unlinkSymlinkedDirectory($directory);
|
return $this->unlinkSymlinkedDirectory($directory);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,9 +84,8 @@ class HttpDownloader
|
||||||
* @param string $url URL to download
|
* @param string $url URL to download
|
||||||
* @param array $options Stream context options e.g. https://www.php.net/manual/en/context.http.php
|
* @param array $options Stream context options e.g. https://www.php.net/manual/en/context.http.php
|
||||||
* although not all options are supported when using the default curl downloader
|
* although not all options are supported when using the default curl downloader
|
||||||
* @return Response
|
|
||||||
*
|
|
||||||
* @throws TransportException
|
* @throws TransportException
|
||||||
|
* @return Response
|
||||||
*/
|
*/
|
||||||
public function get($url, $options = array())
|
public function get($url, $options = array())
|
||||||
{
|
{
|
||||||
|
@ -122,9 +121,8 @@ class HttpDownloader
|
||||||
* @param string $url URL to download
|
* @param string $url URL to download
|
||||||
* @param array $options Stream context options e.g. https://www.php.net/manual/en/context.http.php
|
* @param array $options Stream context options e.g. https://www.php.net/manual/en/context.http.php
|
||||||
* although not all options are supported when using the default curl downloader
|
* although not all options are supported when using the default curl downloader
|
||||||
* @return Promise
|
|
||||||
*
|
|
||||||
* @throws TransportException
|
* @throws TransportException
|
||||||
|
* @return Promise
|
||||||
*/
|
*/
|
||||||
public function add($url, $options = array())
|
public function add($url, $options = array())
|
||||||
{
|
{
|
||||||
|
@ -140,9 +138,8 @@ class HttpDownloader
|
||||||
* @param string $to Path to copy to
|
* @param string $to Path to copy to
|
||||||
* @param array $options Stream context options e.g. https://www.php.net/manual/en/context.http.php
|
* @param array $options Stream context options e.g. https://www.php.net/manual/en/context.http.php
|
||||||
* although not all options are supported when using the default curl downloader
|
* although not all options are supported when using the default curl downloader
|
||||||
* @return Response
|
|
||||||
*
|
|
||||||
* @throws TransportException
|
* @throws TransportException
|
||||||
|
* @return Response
|
||||||
*/
|
*/
|
||||||
public function copy($url, $to, $options = array())
|
public function copy($url, $to, $options = array())
|
||||||
{
|
{
|
||||||
|
@ -159,9 +156,8 @@ class HttpDownloader
|
||||||
* @param string $to Path to copy to
|
* @param string $to Path to copy to
|
||||||
* @param array $options Stream context options e.g. https://www.php.net/manual/en/context.http.php
|
* @param array $options Stream context options e.g. https://www.php.net/manual/en/context.http.php
|
||||||
* although not all options are supported when using the default curl downloader
|
* although not all options are supported when using the default curl downloader
|
||||||
* @return Promise
|
|
||||||
*
|
|
||||||
* @throws TransportException
|
* @throws TransportException
|
||||||
|
* @return Promise
|
||||||
*/
|
*/
|
||||||
public function addCopy($url, $to, $options = array())
|
public function addCopy($url, $to, $options = array())
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,14 +47,14 @@ class ZipArchiverTest extends ArchiverTest
|
||||||
|
|
||||||
if (empty($files)) {
|
if (empty($files)) {
|
||||||
$files = array(
|
$files = array(
|
||||||
'file.txt' => NULL,
|
'file.txt' => null,
|
||||||
'foo/bar/baz' => NULL,
|
'foo/bar/baz' => null,
|
||||||
'x/baz' => NULL,
|
'x/baz' => null,
|
||||||
'x/includeme' => NULL,
|
'x/includeme' => null,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!Platform::isWindows()) {
|
if (!Platform::isWindows()) {
|
||||||
$files['foo' . getcwd() . '/file.txt'] = NULL;
|
$files['foo' . getcwd() . '/file.txt'] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Set up repository
|
// Set up repository
|
||||||
|
@ -86,7 +86,7 @@ class ZipArchiverTest extends ArchiverTest
|
||||||
$currentWorkDir = getcwd();
|
$currentWorkDir = getcwd();
|
||||||
chdir($this->testDir);
|
chdir($this->testDir);
|
||||||
foreach ($files as $path => $content) {
|
foreach ($files as $path => $content) {
|
||||||
if ($files[$path] === NULL) {
|
if ($files[$path] === null) {
|
||||||
$files[$path] = 'content';
|
$files[$path] = 'content';
|
||||||
}
|
}
|
||||||
$this->writeFile($path, $files[$path], $currentWorkDir);
|
$this->writeFile($path, $files[$path], $currentWorkDir);
|
||||||
|
|
Loading…
Reference in New Issue