phpDoc cleanup, removed unused imports, variables and parameters.
parent
818c3e707a
commit
eb77c0b7f5
|
@ -18,7 +18,7 @@ use Composer\Installer\InstallationManager;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
use Composer\Package\AliasPackage;
|
use Composer\Package\AliasPackage;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\WritableRepositoryInterface;
|
||||||
use Composer\Util\Filesystem;
|
use Composer\Util\Filesystem;
|
||||||
use Composer\Script\ScriptEvents;
|
use Composer\Script\ScriptEvents;
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class AutoloadGenerator
|
||||||
$this->runScripts = (boolean) $runScripts;
|
$this->runScripts = (boolean) $runScripts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dump(Config $config, InstalledRepositoryInterface $localRepo, PackageInterface $mainPackage, InstallationManager $installationManager, $targetDir, $scanPsr0Packages = false, $suffix = '')
|
public function dump(Config $config, WritableRepositoryInterface $localRepo, PackageInterface $mainPackage, InstallationManager $installationManager, $targetDir, $scanPsr0Packages = false, $suffix = '')
|
||||||
{
|
{
|
||||||
if ($this->classMapAuthoritative) {
|
if ($this->classMapAuthoritative) {
|
||||||
// Force scanPsr0Packages when classmap is authoritative
|
// Force scanPsr0Packages when classmap is authoritative
|
||||||
|
|
|
@ -221,6 +221,7 @@ class BaseDependencyCommand extends BaseCommand
|
||||||
/**
|
/**
|
||||||
* @var PackageInterface $package
|
* @var PackageInterface $package
|
||||||
* @var Link $link
|
* @var Link $link
|
||||||
|
* @var array|bool $children
|
||||||
*/
|
*/
|
||||||
list($package, $link, $children) = $result;
|
list($package, $link, $children) = $result;
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ EOT
|
||||||
foreach ($repos as $repo) {
|
foreach ($repos as $repo) {
|
||||||
foreach ($repo->findPackages($packageName) as $package) {
|
foreach ($repo->findPackages($packageName) as $package) {
|
||||||
$packageExists = true;
|
$packageExists = true;
|
||||||
if ($this->handlePackage($package, $input->getOption('homepage'), $input->getOption('show'))) {
|
if ($package instanceof CompletePackageInterface && $this->handlePackage($package, $input->getOption('homepage'), $input->getOption('show'))) {
|
||||||
$handled = true;
|
$handled = true;
|
||||||
break 2;
|
break 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Composer\Repository\CompositeRepository;
|
use Composer\Repository\CompositeRepository;
|
||||||
use Composer\Repository\PlatformRepository;
|
use Composer\Repository\PlatformRepository;
|
||||||
use Composer\Repository\RepositoryFactory;
|
|
||||||
use Composer\Repository\RepositoryInterface;
|
use Composer\Repository\RepositoryInterface;
|
||||||
use Composer\Plugin\CommandEvent;
|
use Composer\Plugin\CommandEvent;
|
||||||
use Composer\Plugin\PluginEvents;
|
use Composer\Plugin\PluginEvents;
|
||||||
|
|
|
@ -80,7 +80,8 @@ class Config
|
||||||
private $useEnvironment;
|
private $useEnvironment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bool $useEnvironment Use COMPOSER_ environment variables to replace config settings
|
* @param bool $useEnvironment Use COMPOSER_ environment variables to replace config settings
|
||||||
|
* @param string $baseDir Optional base directory of the config
|
||||||
*/
|
*/
|
||||||
public function __construct($useEnvironment = true, $baseDir = null)
|
public function __construct($useEnvironment = true, $baseDir = null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,12 +27,20 @@ use Symfony\Component\Console\Question\Question;
|
||||||
*/
|
*/
|
||||||
class ConsoleIO extends BaseIO
|
class ConsoleIO extends BaseIO
|
||||||
{
|
{
|
||||||
|
/** @var InputInterface */
|
||||||
protected $input;
|
protected $input;
|
||||||
|
/** @var OutputInterface */
|
||||||
protected $output;
|
protected $output;
|
||||||
|
/** @var HelperSet */
|
||||||
protected $helperSet;
|
protected $helperSet;
|
||||||
|
/** @var string */
|
||||||
protected $lastMessage;
|
protected $lastMessage;
|
||||||
|
/** @var string */
|
||||||
protected $lastMessageErr;
|
protected $lastMessageErr;
|
||||||
|
|
||||||
|
/** @var float */
|
||||||
private $startTime;
|
private $startTime;
|
||||||
|
/** @var array<int, int> */
|
||||||
private $verbosityMap;
|
private $verbosityMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,6 +64,9 @@ class ConsoleIO extends BaseIO
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param float $startTime
|
||||||
|
*/
|
||||||
public function enableDebugging($startTime)
|
public function enableDebugging($startTime)
|
||||||
{
|
{
|
||||||
$this->startTime = $startTime;
|
$this->startTime = $startTime;
|
||||||
|
@ -274,6 +285,9 @@ class ConsoleIO extends BaseIO
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return OutputInterface
|
||||||
|
*/
|
||||||
private function getErrorOutput()
|
private function getErrorOutput()
|
||||||
{
|
{
|
||||||
if ($this->output instanceof ConsoleOutputInterface) {
|
if ($this->output instanceof ConsoleOutputInterface) {
|
||||||
|
|
|
@ -15,9 +15,7 @@ namespace Composer\Installer;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Util\Filesystem;
|
use Composer\Util\Filesystem;
|
||||||
use Composer\Util\Platform;
|
|
||||||
use Composer\Util\ProcessExecutor;
|
use Composer\Util\ProcessExecutor;
|
||||||
use Composer\Util\Silencer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility to handle installation of package "bin"/binaries for PEAR packages
|
* Utility to handle installation of package "bin"/binaries for PEAR packages
|
||||||
|
|
|
@ -18,7 +18,6 @@ use Composer\Downloader\PearPackageExtractor;
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Util\Platform;
|
use Composer\Util\Platform;
|
||||||
use Composer\Util\ProcessExecutor;
|
|
||||||
use Composer\Util\Filesystem;
|
use Composer\Util\Filesystem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,7 +29,7 @@ class SuggestedPackagesReporter
|
||||||
protected $suggestedPackages = array();
|
protected $suggestedPackages = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Composer\IO\IOInterface
|
* @var IOInterface
|
||||||
*/
|
*/
|
||||||
private $io;
|
private $io;
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
namespace Composer\Package\Loader;
|
namespace Composer\Package\Loader;
|
||||||
|
|
||||||
use Composer\Package\BasePackage;
|
use Composer\Package\BasePackage;
|
||||||
use Composer\Package\PackageInterface;
|
|
||||||
use Composer\Package\AliasPackage;
|
use Composer\Package\AliasPackage;
|
||||||
use Composer\Config;
|
use Composer\Config;
|
||||||
|
use Composer\Package\RootPackageInterface;
|
||||||
use Composer\Repository\RepositoryFactory;
|
use Composer\Repository\RepositoryFactory;
|
||||||
use Composer\Package\Version\VersionGuesser;
|
use Composer\Package\Version\VersionGuesser;
|
||||||
use Composer\Package\Version\VersionParser;
|
use Composer\Package\Version\VersionParser;
|
||||||
|
@ -59,7 +59,7 @@ class RootPackageLoader extends ArrayLoader
|
||||||
* @param array $config package data
|
* @param array $config package data
|
||||||
* @param string $class FQCN to be instantiated
|
* @param string $class FQCN to be instantiated
|
||||||
* @param string $cwd cwd of the root package to be used to guess the version if it is not provided
|
* @param string $cwd cwd of the root package to be used to guess the version if it is not provided
|
||||||
* @return PackageInterface
|
* @return RootPackageInterface
|
||||||
*/
|
*/
|
||||||
public function load(array $config, $class = 'Composer\Package\RootPackage', $cwd = null)
|
public function load(array $config, $class = 'Composer\Package\RootPackage', $cwd = null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,7 +53,6 @@ class ChannelReader extends BaseChannelReader
|
||||||
$xml = $this->requestXml($url, "/channel.xml");
|
$xml = $this->requestXml($url, "/channel.xml");
|
||||||
|
|
||||||
$channelName = (string) $xml->name;
|
$channelName = (string) $xml->name;
|
||||||
$channelSummary = (string) $xml->summary;
|
|
||||||
$channelAlias = (string) $xml->suggestedalias;
|
$channelAlias = (string) $xml->suggestedalias;
|
||||||
|
|
||||||
$supportedVersions = array_keys($this->readerMap);
|
$supportedVersions = array_keys($this->readerMap);
|
||||||
|
|
|
@ -70,9 +70,12 @@ class RepositoryFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param IOInterface $io
|
||||||
|
* @param Config $config
|
||||||
|
* @param array $repoConfig
|
||||||
* @return RepositoryInterface
|
* @return RepositoryInterface
|
||||||
*/
|
*/
|
||||||
public static function createRepo($io, $config, array $repoConfig)
|
public static function createRepo(IOInterface $io, Config $config, array $repoConfig)
|
||||||
{
|
{
|
||||||
$rm = static::manager($io, $config, null, Factory::createRemoteFilesystem($io, $config));
|
$rm = static::manager($io, $config, null, Factory::createRemoteFilesystem($io, $config));
|
||||||
$repos = static::createRepos($rm, array($repoConfig));
|
$repos = static::createRepos($rm, array($repoConfig));
|
||||||
|
@ -81,6 +84,9 @@ class RepositoryFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param IOInterface|null $io
|
||||||
|
* @param Config|null $config
|
||||||
|
* @param RepositoryManager|null $rm
|
||||||
* @return RepositoryInterface[]
|
* @return RepositoryInterface[]
|
||||||
*/
|
*/
|
||||||
public static function defaultRepos(IOInterface $io = null, Config $config = null, RepositoryManager $rm = null)
|
public static function defaultRepos(IOInterface $io = null, Config $config = null, RepositoryManager $rm = null)
|
||||||
|
|
|
@ -17,7 +17,6 @@ use Composer\Json\JsonFile;
|
||||||
use Composer\Util\ProcessExecutor;
|
use Composer\Util\ProcessExecutor;
|
||||||
use Composer\Util\Filesystem;
|
use Composer\Util\Filesystem;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
use Composer\Downloader\TransportException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Per Bernhardt <plb@webfactory.de>
|
* @author Per Bernhardt <plb@webfactory.de>
|
||||||
|
|
|
@ -66,9 +66,9 @@ class ErrorHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register error handler
|
* Register error handler.
|
||||||
*
|
*
|
||||||
* @static
|
* @param IOInterface|null $io
|
||||||
*/
|
*/
|
||||||
public static function register(IOInterface $io = null)
|
public static function register(IOInterface $io = null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,6 @@ namespace Composer\Util;
|
||||||
|
|
||||||
use Composer\Config;
|
use Composer\Config;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
use Composer\Downloader\TransportException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||||
|
|
|
@ -70,6 +70,7 @@ class GitLab
|
||||||
/**
|
/**
|
||||||
* Authorizes a GitLab domain interactively via OAuth.
|
* Authorizes a GitLab domain interactively via OAuth.
|
||||||
*
|
*
|
||||||
|
* @param string $scheme Scheme used in the origin URL
|
||||||
* @param string $originUrl The host this GitLab instance is located at
|
* @param string $originUrl The host this GitLab instance is located at
|
||||||
* @param string $message The reason this authorization is required
|
* @param string $message The reason this authorization is required
|
||||||
*
|
*
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
namespace Composer\Util;
|
namespace Composer\Util;
|
||||||
|
|
||||||
use Composer\Config;
|
use Composer\Config;
|
||||||
use Composer\Downloader\TransportException;
|
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue