Permalink
Browse files

Fixed typos

  • Loading branch information...
1 parent 7edf1d2 commit 1363a968ceb5bd9a0b5994868d1880289b5de093 @pborreli pborreli committed Dec 14, 2012
View
@@ -70,7 +70,7 @@ CHANGELOG
it disallows the slash (`/`) and the next char. Using the previous char added
no value and was problematic because the route `/index.{_format}` would be
matched by `/index.ht/ml`.
- * The default requirement now uses possesive quantifiers when possible which
+ * The default requirement now uses possessive quantifiers when possible which
improves matching performance by up to 20% because it prevents backtracking
when it's not needed.
* The ConfigurableRequirementsInterface can now also be used to disable the requirements
@@ -145,7 +145,7 @@ protected function parseImport(RouteCollection $collection, array $config, $path
* @param string $path The loaded file path
*
* @throws \InvalidArgumentException If one of the provided config keys is not supported,
- * something is missing or the combination is nonesense
+ * something is missing or the combination is nonsense
*/
protected function validate($config, $name, $path)
{
@@ -154,7 +154,7 @@ protected function validate($config, $name, $path)
}
if ($extraKeys = array_diff(array_keys($config), self::$availableKeys)) {
throw new \InvalidArgumentException(sprintf(
- 'The routing file "%s" contains unsupport keys for "%s": "%s". Expected one of: "%s".',
+ 'The routing file "%s" contains unsupported keys for "%s": "%s". Expected one of: "%s".',
$path, $name, implode('", "', $extraKeys), implode('", "', self::$availableKeys)
));
}
@@ -143,9 +143,9 @@ private function compileRoutes(RouteCollection $routes, $supportsRedirections)
/**
* Generates PHP code recursively to match a tree of routes
*
- * @param DumperPrefixCollection $routes A DumperPrefixCollection instance
+ * @param DumperPrefixCollection $collection A DumperPrefixCollection instance
* @param Boolean $supportsRedirections Whether redirections are supported by the base class
- * @param string $prefix Prefix of the parent collection
+ * @param string $parentPrefix Prefix of the parent collection
*
* @return string PHP code
*/
View
@@ -389,7 +389,7 @@ public function getRequirement($key)
/**
* Checks if a requirement is set for the given key.
*
- * @param string $name A variable name
+ * @param string $key A variable name
*
* @return Boolean true if a requirement is specified, false otherwise
*/
@@ -98,7 +98,7 @@ public function testLoad($className, $routeDatas = array(), $methodArgs = array(
$this->reader
->expects($this->once())
->method('getMethodAnnotations')
- ->will($this->returnValue(array($this->getAnnotedRoute($routeDatas))))
+ ->will($this->returnValue(array($this->getAnnotatedRoute($routeDatas))))
;
$routeCollection = $this->loader->load($className);
$route = $routeCollection->get($routeDatas['name']);
@@ -109,7 +109,7 @@ public function testLoad($className, $routeDatas = array(), $methodArgs = array(
$this->assertSame(array_replace($routeDatas['defaults'], $methodArgs), $route->getDefaults(), '->load preserves defaults annotation');
}
- private function getAnnotedRoute($datas)
+ private function getAnnotatedRoute($datas)
{
return new \Symfony\Component\Routing\Annotation\Route($datas);
}
@@ -225,7 +225,7 @@ public function provideCompileWithHostnameData()
),
),
array(
- 'Route with variable at begining of hostname',
+ 'Route with variable at beginning of hostname',
array('/hello', array(), array(), array(), '{locale}.example.{tld}'),
'/hello', '#^/hello$#s', array('locale', 'tld'), array(), array(
array('text', '/hello'),
View
@@ -36,7 +36,7 @@ public function testPattern()
$this->assertEquals('/bar', $route->getPattern(), '->setPattern() adds a / at the beginning of the pattern if needed');
$this->assertEquals($route, $route->setPattern(''), '->setPattern() implements a fluent interface');
$route->setPattern('//path');
- $this->assertEquals('/path', $route->getPattern(), '->setPattern() does not allow two slahes "//" at the beginning of the pattern as it would be confused with a network path when generating the path from the route');
+ $this->assertEquals('/path', $route->getPattern(), '->setPattern() does not allow two slashes "//" at the beginning of the pattern as it would be confused with a network path when generating the path from the route');
}
public function testOptions()

0 comments on commit 1363a96

Please sign in to comment.