diff --git a/src/Composer/Downloader/ZipDownloader.php b/src/Composer/Downloader/ZipDownloader.php index f32cf6a30..ef265350c 100644 --- a/src/Composer/Downloader/ZipDownloader.php +++ b/src/Composer/Downloader/ZipDownloader.php @@ -74,10 +74,10 @@ class ZipDownloader extends ArchiveDownloader /** * extract $file to $path with "unzip" command * - * @param string $file File to extract - * @param string $path Path where to extract file - * @param bool $isLastChance If true it is called as a fallback and should throw an exception - * @return bool Success status + * @param string $file File to extract + * @param string $path Path where to extract file + * @param bool $isLastChance If true it is called as a fallback and should throw an exception + * @return bool Success status */ protected function extractWithSystemUnzip($file, $path, $isLastChance) { @@ -121,10 +121,10 @@ class ZipDownloader extends ArchiveDownloader /** * extract $file to $path with ZipArchive * - * @param string $file File to extract - * @param string $path Path where to extract file - * @param bool $isLastChance If true it is called as a fallback and should throw an exception - * @return bool Success status + * @param string $file File to extract + * @param string $path Path where to extract file + * @param bool $isLastChance If true it is called as a fallback and should throw an exception + * @return bool Success status */ protected function extractWithZipArchive($file, $path, $isLastChance) { diff --git a/src/Composer/Installer/SuggestedPackagesReporter.php b/src/Composer/Installer/SuggestedPackagesReporter.php index 7f4230017..ed89ec02b 100644 --- a/src/Composer/Installer/SuggestedPackagesReporter.php +++ b/src/Composer/Installer/SuggestedPackagesReporter.php @@ -126,7 +126,7 @@ class SuggestedPackagesReporter } /** - * @param string $string + * @param string $string * @return string */ private function escapeOutput($string) @@ -137,7 +137,7 @@ class SuggestedPackagesReporter } /** - * @param string $string + * @param string $string * @return string */ private function removeControlCharacters($string) diff --git a/src/Composer/Package/Loader/ValidatingArrayLoader.php b/src/Composer/Package/Loader/ValidatingArrayLoader.php index 53ca868f1..b0c254351 100644 --- a/src/Composer/Package/Loader/ValidatingArrayLoader.php +++ b/src/Composer/Package/Loader/ValidatingArrayLoader.php @@ -63,9 +63,9 @@ class ValidatingArrayLoader implements LoaderInterface unset($this->config['version']); } } - + if (!empty($this->config['config']['platform'])) { - foreach ((array)$this->config['config']['platform'] as $key=>$platform) { + foreach ((array) $this->config['config']['platform'] as $key => $platform) { try { $this->versionParser->normalize($platform); } catch (\Exception $e) { diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php index d62deb7c1..9b134def2 100644 --- a/src/Composer/Repository/ComposerRepository.php +++ b/src/Composer/Repository/ComposerRepository.php @@ -499,7 +499,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito if (!empty($mirror['dist-url'])) { $this->distMirrors[] = array( 'url' => $this->canonicalizeUrl($mirror['dist-url']), - 'preferred' => !empty($mirror['preferred']) + 'preferred' => !empty($mirror['preferred']), ); } } diff --git a/src/Composer/Repository/Vcs/GitLabDriver.php b/src/Composer/Repository/Vcs/GitLabDriver.php index 66eda8145..3e8b70edd 100644 --- a/src/Composer/Repository/Vcs/GitLabDriver.php +++ b/src/Composer/Repository/Vcs/GitLabDriver.php @@ -445,9 +445,9 @@ class GitLabDriver extends VcsDriver } /** - * @param array $configuredDomains - * @param string $guessedDomain - * @param array $urlParts + * @param array $configuredDomains + * @param string $guessedDomain + * @param array $urlParts * @return bool|string */ private static function determineOrigin(array $configuredDomains, $guessedDomain, array &$urlParts) diff --git a/src/Composer/Repository/Vcs/HgDriver.php b/src/Composer/Repository/Vcs/HgDriver.php index d9df58412..cf256fa1d 100644 --- a/src/Composer/Repository/Vcs/HgDriver.php +++ b/src/Composer/Repository/Vcs/HgDriver.php @@ -16,7 +16,6 @@ use Composer\Config; use Composer\Util\ProcessExecutor; use Composer\Util\Filesystem; use Composer\IO\IOInterface; -use Symfony\Component\Process\Process; /** * @author Per Bernhardt diff --git a/src/Composer/Util/ConfigValidator.php b/src/Composer/Util/ConfigValidator.php index ecc035150..9953e92d4 100644 --- a/src/Composer/Util/ConfigValidator.php +++ b/src/Composer/Util/ConfigValidator.php @@ -89,7 +89,7 @@ class ConfigValidator 'License %s must not contain extra spaces, make sure to trim it.', json_encode($manifest['license']) ); - } else if ('proprietary' !== $manifest['license'] && array() !== $manifest['license'] && !$licenseValidator->validate($manifest['license'])) { + } elseif ('proprietary' !== $manifest['license'] && array() !== $manifest['license'] && !$licenseValidator->validate($manifest['license'])) { $warnings[] = sprintf( 'License %s is not a valid SPDX license identifier, see https://spdx.org/licenses/ if you use an open license.' . PHP_EOL . diff --git a/tests/Composer/Test/Downloader/ZipDownloaderTest.php b/tests/Composer/Test/Downloader/ZipDownloaderTest.php index 041116bc7..3b5c46373 100644 --- a/tests/Composer/Test/Downloader/ZipDownloaderTest.php +++ b/tests/Composer/Test/Downloader/ZipDownloaderTest.php @@ -32,7 +32,6 @@ class ZipDownloaderTest extends TestCase $this->config = $this->getMock('Composer\Config'); } - public function tearDown() { $fs = new Filesystem; diff --git a/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php b/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php index cde057186..590ba99ef 100644 --- a/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php @@ -401,7 +401,7 @@ JSON; $options = array( 'ssl' => array( 'verify_peer' => false, - ) + ), ); $projectData = <<