From 2f4df9d45901f691cd16719c64dc2bcc1ce392b2 Mon Sep 17 00:00:00 2001 From: Pascal Borreli Date: Fri, 27 Dec 2013 11:36:18 +0000 Subject: [PATCH] Fixed typos --- src/Composer/EventDispatcher/EventDispatcher.php | 4 ++-- src/Composer/Factory.php | 1 + src/Composer/Package/Version/VersionParser.php | 7 ++++--- src/Composer/Plugin/PluginManager.php | 6 ++++-- src/Composer/Repository/Vcs/VcsDriver.php | 1 + src/Composer/Util/NoProxyPattern.php | 4 ++-- src/Composer/Util/StreamContextFactory.php | 2 +- tests/Composer/Test/Package/BasePackageTest.php | 2 +- 8 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/Composer/EventDispatcher/EventDispatcher.php b/src/Composer/EventDispatcher/EventDispatcher.php index 9c2aee91f..f1e94e6d5 100644 --- a/src/Composer/EventDispatcher/EventDispatcher.php +++ b/src/Composer/EventDispatcher/EventDispatcher.php @@ -72,8 +72,8 @@ class EventDispatcher /** * Dispatch a script event. * - * @param string $eventName The constant in ScriptEvents - * @param Event $event + * @param string $eventName The constant in ScriptEvents + * @param Script\Event $event */ public function dispatchScript($eventName, Script\Event $event = null) { diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index 1db8c5864..f829cb459 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -285,6 +285,7 @@ class Factory /** * @param IOInterface $io * @param Config $config + * @param EventDispatcher $eventDispatcher * @return Repository\RepositoryManager */ protected function createRepositoryManager(IOInterface $io, Config $config, EventDispatcher $eventDispatcher = null) diff --git a/src/Composer/Package/Version/VersionParser.php b/src/Composer/Package/Version/VersionParser.php index ea37d821d..ee13b77a5 100644 --- a/src/Composer/Package/Version/VersionParser.php +++ b/src/Composer/Package/Version/VersionParser.php @@ -375,9 +375,10 @@ class VersionParser * * Support function for {@link parseConstraint()} * - * @param array $matches Array with version parts in array indexes 1,2,3,4 - * @param int $position 1,2,3,4 - which segment of the version to decrement - * @param string $pad The string to pad version parts after $position + * @param array $matches Array with version parts in array indexes 1,2,3,4 + * @param int $position 1,2,3,4 - which segment of the version to decrement + * @param int $increment + * @param string $pad The string to pad version parts after $position * @return string The new version */ private function manipulateVersionString($matches, $position, $increment = 0, $pad = '0') diff --git a/src/Composer/Plugin/PluginManager.php b/src/Composer/Plugin/PluginManager.php index de4257e6a..d7c3ae07a 100644 --- a/src/Composer/Plugin/PluginManager.php +++ b/src/Composer/Plugin/PluginManager.php @@ -43,7 +43,9 @@ class PluginManager /** * Initializes plugin manager * - * @param Composer $composer + * @param Composer $composer + * @param IOInterface $io + * @param RepositoryInterface $globalRepository */ public function __construct(Composer $composer, IOInterface $io, RepositoryInterface $globalRepository = null) { @@ -126,7 +128,7 @@ class PluginManager $this->registerPackage($package); } - // Backward compatability + // Backward compatibility if ('composer-installer' === $package->getType()) { $this->registerPackage($package); } diff --git a/src/Composer/Repository/Vcs/VcsDriver.php b/src/Composer/Repository/Vcs/VcsDriver.php index 6effb2235..f1112074e 100644 --- a/src/Composer/Repository/Vcs/VcsDriver.php +++ b/src/Composer/Repository/Vcs/VcsDriver.php @@ -104,6 +104,7 @@ abstract class VcsDriver implements VcsDriverInterface /** * Return if current repository url is local * + * @param string $url * @return boolean Repository url is local */ protected static function isLocalUrl($url) diff --git a/src/Composer/Util/NoProxyPattern.php b/src/Composer/Util/NoProxyPattern.php index 16f7488d0..533dbc19c 100644 --- a/src/Composer/Util/NoProxyPattern.php +++ b/src/Composer/Util/NoProxyPattern.php @@ -107,7 +107,7 @@ class NoProxyPattern } /** - * Check an IP adress against a CIDR + * Check an IP address against a CIDR * * http://framework.zend.com/svn/framework/extras/incubator/library/ZendX/Whois/Adapter/Cidr.php * @@ -141,7 +141,7 @@ class NoProxyPattern $check = ($a << 24) + ($b << 16) + ($c << 8) + $d; // If the ip is within the range, including highest/lowest values, - // then it's witin the CIDR range + // then it's within the CIDR range return $check >= $low && $check <= $high; } } diff --git a/src/Composer/Util/StreamContextFactory.php b/src/Composer/Util/StreamContextFactory.php index 9ed131b02..1c3c20e44 100644 --- a/src/Composer/Util/StreamContextFactory.php +++ b/src/Composer/Util/StreamContextFactory.php @@ -120,7 +120,7 @@ final class StreamContextFactory } /** - * A bug in PHP prevents the headers from correctly beeing sent when a content-type header is present and + * A bug in PHP prevents the headers from correctly being sent when a content-type header is present and * NOT at the end of the array * * This method fixes the array by moving the content-type header to the end diff --git a/tests/Composer/Test/Package/BasePackageTest.php b/tests/Composer/Test/Package/BasePackageTest.php index 6e9f8f05a..1fe0ece84 100644 --- a/tests/Composer/Test/Package/BasePackageTest.php +++ b/tests/Composer/Test/Package/BasePackageTest.php @@ -25,7 +25,7 @@ class BasePackageTest extends \PHPUnit_Framework_TestCase try { $package->setRepository($repository); } catch (\Exception $e) { - $this->fail('Set againt the same repository is allowed.'); + $this->fail('Set against the same repository is allowed.'); } }