merged branch pborreli/typos-friday (PR #6364)

This PR was merged into the master branch.

Commits
-------

c84907b Merge pull request #3 from Tobion/patch-5
9ab5e4f fix typos in PhpMatcherDumper
60eeacd Fixed typos
4a073e6 [Form] Fixed duplicate case expression

Discussion
----------

Fixed Typos

---------------------------------------------------------------------------

by Tobion at 2012-12-14T22:51:05Z

👍 Thanks for fixing some of my typos.
@pborreli see pborreli/symfony#3
This commit is contained in:
Fabien Potencier 2012-12-15 08:49:02 +01:00
commit c3f1a4652f
18 changed files with 27 additions and 31 deletions

View File

@ -73,7 +73,7 @@ class EntityChoiceListTest extends DoctrineOrmTestCase
* @expectedException Symfony\Component\Form\Exception\FormException
* @expectedMessage Entity "Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIdentEntity" passed to the choice field must have a "__toString()" method defined (or you can also override the "property" option).
*/
public function testEntitesMustHaveAToStringMethod()
public function testEntitiesMustHaveAToStringMethod()
{
$entity1 = new NoToStringSingleIdentEntity(1, 'Foo');
$entity2 = new NoToStringSingleIdentEntity(2, 'Bar');

View File

@ -18,7 +18,7 @@ use Symfony\Component\Form\Exception\StringCastException;
use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList;
/**
* Widely inspirated by the EntityChoiceList.
* Widely inspired by the EntityChoiceList.
*
* @author William Durand <william.durand1@gmail.com>
*/
@ -369,7 +369,7 @@ class ModelChoiceList extends ObjectChoiceList
*
* @param ColumnMap $column
*
* @return boolean
* @return Boolean
*/
private function isInteger(\ColumnMap $column)
{

View File

@ -37,6 +37,7 @@ class ExceptionController
/**
* Converts an Exception to a Response.
*
* @param Request $request The request
* @param FlattenException $exception A FlattenException instance
* @param DebugLoggerInterface $logger A DebugLoggerInterface instance
* @param string $format The format to use for rendering (html, xml, ...)

View File

@ -174,7 +174,7 @@
*
* @param request the request object
* @param max <subjected for removal>
* @param threshold the threshold (lower bound) of the length of the timeline (in miliseconds).
* @param threshold the threshold (lower bound) of the length of the timeline (in milliseconds).
* @param width the width of the canvas.
*/
this.drawOne = function(request, max, threshold, width)

View File

@ -38,7 +38,8 @@ class ReferenceDumper
}
/**
* @param int $depth
* @param NodeInterface $node
* @param integer $depth
*/
private function writeNode(NodeInterface $node, $depth = 0)
{

View File

@ -886,7 +886,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
/**
* Returns file permissions as three digits (i.e. 755)
*
* @param string $filepath
* @param string $filePath
*
* @return integer
*/

View File

@ -273,7 +273,7 @@ class Regex implements ValueInterface
}
/**
* @param array $replacements
* @param array $replacement
*
* @return Regex
*/

View File

@ -165,12 +165,6 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
case 'Symfony\Component\Validator\Constraints\MaxCount':
return new TypeGuess('collection', array(), Guess::LOW_CONFIDENCE);
case 'Symfony\Component\Validator\Constraints\Time':
return new TypeGuess('time', array('input'=>'string'), Guess::HIGH_CONFIDENCE);
case 'Symfony\Component\Validator\Constraints\Url':
return new TypeGuess('url', array(), Guess::HIGH_CONFIDENCE);
case 'Symfony\Component\Validator\Constraints\True':
case 'Symfony\Component\Validator\Constraints\False':
return new TypeGuess('checkbox', array(), Guess::MEDIUM_CONFIDENCE);

View File

@ -866,7 +866,7 @@ class StubIntlDateFormatterTest extends LocaleTestCase
public function parseErrorProvider()
{
return array(
$data = array(
// 1 char month
array('y-MMMMM-d', '1970-J-1'),
array('y-MMMMM-d', '1970-S-1'),

View File

@ -692,13 +692,13 @@ class Process
/**
* Stops the process.
*
* @param float $timeout The timeout in seconds
* @param integer $timeout The timeout in seconds
*
* @return integer The exit-code of the process
*
* @throws RuntimeException if the process got signaled
*/
public function stop($timeout=10)
public function stop($timeout = 10)
{
$timeoutMicro = (int) $timeout*10E6;
if ($this->isRunning()) {

View File

@ -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

View File

@ -145,7 +145,7 @@ class YamlFileLoader extends FileLoader
* @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 @@ class YamlFileLoader extends FileLoader
}
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)
));
}

View File

@ -100,7 +100,7 @@ EOF;
}
/**
* Generates PHP code recursively to match a RouteCollection with all child routes and child collections.
* Generates PHP code to match a RouteCollection with all its routes.
*
* @param RouteCollection $routes A RouteCollection instance
* @param Boolean $supportsRedirections Whether redirections are supported by the base class
@ -143,9 +143,9 @@ EOF;
/**
* 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
*/
@ -323,9 +323,9 @@ EOF;
/**
* Groups consecutive routes having the same hostname regex.
*
* The results is a collection of collections of routes having the same hostname regex.
* The result is a collection of collections of routes having the same hostname regex.
*
* @param DumperCollection $routes Flat collection of DumperRoutes
* @param RouteCollection $routes A flat RouteCollection
*
* @return DumperCollection A collection with routes grouped by hostname regex in sub-collections
*/
@ -354,7 +354,7 @@ EOF;
* Organizes the routes into a prefix tree.
*
* Routes order is preserved such that traversing the tree will traverse the
* routes in the origin order
* routes in the origin order.
*
* @param DumperCollection $collection A collection of routes
*

View File

@ -389,7 +389,7 @@ class Route implements \Serializable
/**
* 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
*/

View File

@ -98,7 +98,7 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest
$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 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest
$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);
}

View File

@ -225,7 +225,7 @@ class RouteCompilerTest extends \PHPUnit_Framework_TestCase
),
),
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 File

@ -36,7 +36,7 @@ class RouteTest extends \PHPUnit_Framework_TestCase
$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()

View File

@ -28,7 +28,7 @@ class Dumper
/**
* Sets the indentation.
*
* @param integer $num The amount of spaces to use for intendation of nested nodes.
* @param integer $num The amount of spaces to use for indentation of nested nodes.
*/
public function setIndentation($num)
{