diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index b05e863a0..bc54f495d 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -312,6 +312,7 @@ EOF; // path starts with vendor dir return $vendorPath . substr($path, strlen($relVendorPath)); } + return strtr(getcwd(), '\\', '/').'/'.$path; } @@ -407,6 +408,7 @@ REGISTER_AUTOLOAD; $file .= <<register(); $filesCode + return \$loader; } diff --git a/src/Composer/Autoload/ClassMapGenerator.php b/src/Composer/Autoload/ClassMapGenerator.php index fe5a9b769..c54919efb 100644 --- a/src/Composer/Autoload/ClassMapGenerator.php +++ b/src/Composer/Autoload/ClassMapGenerator.php @@ -40,8 +40,8 @@ class ClassMapGenerator /** * Iterate over all files in the given directory searching for classes * - * @param Iterator|string $dir The directory to search in or an iterator - * @param string $whitelist Regex that matches against the file path + * @param Iterator|string $dir The directory to search in or an iterator + * @param string $whitelist Regex that matches against the file path * * @return array A class map array */ diff --git a/src/Composer/Command/StatusCommand.php b/src/Composer/Command/StatusCommand.php index b0c873189..a96d62353 100644 --- a/src/Composer/Command/StatusCommand.php +++ b/src/Composer/Command/StatusCommand.php @@ -13,7 +13,6 @@ namespace Composer\Command; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Composer\Downloader\VcsDownloader; diff --git a/src/Composer/DependencyResolver/DefaultPolicy.php b/src/Composer/DependencyResolver/DefaultPolicy.php index 51440f088..9217b5ba4 100644 --- a/src/Composer/DependencyResolver/DefaultPolicy.php +++ b/src/Composer/DependencyResolver/DefaultPolicy.php @@ -146,8 +146,8 @@ class DefaultPolicy implements PolicyInterface * Replace constraints are ignored. This method should only be used for * prioritisation, not for actual constraint verification. * - * @param PackageInterface $source - * @param PackageInterface $target + * @param PackageInterface $source + * @param PackageInterface $target * @return bool */ protected function replaces(PackageInterface $source, PackageInterface $target) diff --git a/src/Composer/DependencyResolver/Solver.php b/src/Composer/DependencyResolver/Solver.php index 0013548c8..f71f9c9bc 100644 --- a/src/Composer/DependencyResolver/Solver.php +++ b/src/Composer/DependencyResolver/Solver.php @@ -524,7 +524,7 @@ class Solver if (!$job) { $why->disable(); - + return; } diff --git a/src/Composer/Downloader/DownloadManager.php b/src/Composer/Downloader/DownloadManager.php index 68ce59d28..4b4bf3ec4 100644 --- a/src/Composer/Downloader/DownloadManager.php +++ b/src/Composer/Downloader/DownloadManager.php @@ -30,8 +30,8 @@ class DownloadManager /** * Initializes download manager. * - * @param bool $preferSource prefer downloading from source - * @param Filesystem|null $filesystem custom Filesystem object + * @param bool $preferSource prefer downloading from source + * @param Filesystem|null $filesystem custom Filesystem object */ public function __construct($preferSource = false, Filesystem $filesystem = null) { diff --git a/src/Composer/Downloader/VcsDownloader.php b/src/Composer/Downloader/VcsDownloader.php index c1cf2050f..0713a843d 100644 --- a/src/Composer/Downloader/VcsDownloader.php +++ b/src/Composer/Downloader/VcsDownloader.php @@ -154,16 +154,16 @@ abstract class VcsDownloader implements DownloaderInterface * Checks for changes to the local copy * * @param string $path package directory - * @return string|null changes or null + * @return string|null changes or null */ abstract public function getLocalChanges($path); /** * Fetches the commit logs between two commits * - * @param string $fromReference the source reference - * @param string $toReference the target reference - * @param string $path the package path + * @param string $fromReference the source reference + * @param string $toReference the target reference + * @param string $path the package path * @return string */ abstract protected function getCommitLogs($fromReference, $toReference, $path); diff --git a/src/Composer/Installer/InstallationManager.php b/src/Composer/Installer/InstallationManager.php index e013673f5..136495c69 100644 --- a/src/Composer/Installer/InstallationManager.php +++ b/src/Composer/Installer/InstallationManager.php @@ -56,7 +56,7 @@ class InstallationManager public function disableCustomInstallers() { foreach ($this->installers as $i => $installer) { - if ( ! $installer instanceof InstallerInstaller) { + if (!$installer instanceof InstallerInstaller) { continue; } diff --git a/src/Composer/Package/Loader/JsonLoader.php b/src/Composer/Package/Loader/JsonLoader.php index 19e047c9a..a693e70c0 100644 --- a/src/Composer/Package/Loader/JsonLoader.php +++ b/src/Composer/Package/Loader/JsonLoader.php @@ -27,7 +27,7 @@ class JsonLoader } /** - * @param string|JsonFile $json A filename, json string or JsonFile instance to load the package from + * @param string|JsonFile $json A filename, json string or JsonFile instance to load the package from * @return \Composer\Package\PackageInterface */ public function load($json) diff --git a/src/Composer/Package/Loader/LoaderInterface.php b/src/Composer/Package/Loader/LoaderInterface.php index f0645805f..7fd03c49e 100644 --- a/src/Composer/Package/Loader/LoaderInterface.php +++ b/src/Composer/Package/Loader/LoaderInterface.php @@ -22,7 +22,7 @@ interface LoaderInterface /** * Converts a package from an array to a real instance * - * @param array $package Package config + * @param array $package Package config * @return \Composer\Package\PackageInterface */ public function load(array $package); diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index 4b91d78fa..af731b61b 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -76,7 +76,7 @@ class Filesystem return; } - throw new \RuntimeException(sprintf('Could not rename "%s" to "%s".', $source, $target)); + throw new \RuntimeException(sprintf('Could not rename "%s" to "%s".', $source, $target)); } }