minor #12856 [2.5] CS Fixes And Removed Unused Imports (GrahamCampbell)

This PR was merged into the 2.5 branch.

Discussion
----------

[2.5] CS Fixes And Removed Unused Imports

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

##### This pull request fixes some cs issues in symfony 2.5.

I've applied the same set of fixes that I did to the 2.3 branch.

There are far fewer fixes than there were for 2.3, so I've just done them all at once.

Commits
-------

ed4fb54 CS fixes
This commit is contained in:
Fabien Potencier 2014-12-05 12:58:26 +01:00
commit 002595a66b
68 changed files with 204 additions and 204 deletions

View File

@ -310,10 +310,10 @@ abstract class AbstractDoctrineExtension extends Extension
/**
* Loads a cache driver.
*
* @param string $cacheDriverServiceId The cache driver name.
* @param string $objectManagerName The object manager name.
* @param array $cacheDriver The cache driver mapping.
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container The ContainerBuilder instance.
* @param string $cacheDriverServiceId The cache driver name.
* @param string $objectManagerName The object manager name.
* @param array $cacheDriver The cache driver mapping.
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container The ContainerBuilder instance.
*
* @return string
*

View File

@ -167,7 +167,7 @@ class ConsoleHandler extends AbstractProcessingHandler implements EventSubscribe
/**
* Updates the logging level based on the verbosity setting of the console output.
*
* @return bool Whether the handler is enabled and verbosity is not set to quiet.
* @return bool Whether the handler is enabled and verbosity is not set to quiet.
*/
private function updateLevel()
{

View File

@ -108,9 +108,9 @@ EOF
}
/**
* @param string $warmupDir
* @param string $realCacheDir
* @param bool $enableOptionalWarmers
* @param string $warmupDir
* @param string $realCacheDir
* @param bool $enableOptionalWarmers
*/
protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = true)
{

View File

@ -74,8 +74,8 @@ abstract class Descriptor implements DescriptorInterface
/**
* Writes content to output.
*
* @param string $content
* @param bool $decorated
* @param string $content
* @param bool $decorated
*/
protected function write($content, $decorated = false)
{

View File

@ -48,10 +48,10 @@ class AssetsExtension extends \Twig_Extension
*
* Absolute paths (i.e. http://...) are returned unmodified.
*
* @param string $path A public path
* @param string $packageName The name of the asset package to use
* @param bool $absolute Whether to return an absolute URL or a relative one
* @param string|bool|null $version A specific version
* @param string $path A public path
* @param string $packageName The name of the asset package to use
* @param bool $absolute Whether to return an absolute URL or a relative one
* @param string|bool|null $version A specific version
*
* @return string A public path which takes into account the base path and URL path
*/
@ -93,8 +93,9 @@ class AssetsExtension extends \Twig_Extension
*
* @param string $url The URL that has to be absolute
*
* @return string The absolute URL
* @throws \RuntimeException
*
* @return string The absolute URL
*/
private function ensureUrlIsAbsolute($url)
{

View File

@ -77,7 +77,7 @@ class Psr4ClassLoader
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend
* @param bool $prepend
*/
public function register($prepend = false)
{

View File

@ -815,8 +815,8 @@ class Application
*
* Can be useful to force terminal dimensions for functional tests.
*
* @param int $width The width
* @param int $height The height
* @param int $width The width
* @param int $height The height
*
* @return Application The current application
*/
@ -1050,8 +1050,8 @@ class Application
* Finds alternative of $name among $collection,
* if nothing is found in $collection, try in $abbrevs
*
* @param string $name The string
* @param array|\Traversable $collection The collection
* @param string $name The string
* @param array|\Traversable $collection The collection
*
* @return array A sorted array of similar string
*/

View File

@ -59,8 +59,8 @@ abstract class Descriptor implements DescriptorInterface
/**
* Writes content to output.
*
* @param string $content
* @param bool $decorated
* @param string $content
* @param bool $decorated
*/
protected function write($content, $decorated = false)
{

View File

@ -150,7 +150,7 @@ class ProgressBar
/**
* Gets the progress bar start time.
*
* @return int The progress bar start time
* @return int The progress bar start time
*/
public function getStartTime()
{
@ -160,7 +160,7 @@ class ProgressBar
/**
* Gets the progress bar maximal steps.
*
* @return int The progress bar max steps
* @return int The progress bar max steps
*/
public function getMaxSteps()
{
@ -170,7 +170,7 @@ class ProgressBar
/**
* Gets the progress bar step.
*
* @return int The progress bar step
* @return int The progress bar step
*/
public function getStep()
{
@ -180,7 +180,7 @@ class ProgressBar
/**
* Gets the progress bar step width.
*
* @return int The progress bar step width
* @return int The progress bar step width
*/
public function getStepWidth()
{
@ -190,7 +190,7 @@ class ProgressBar
/**
* Gets the current progress bar percent.
*
* @return int The current progress bar percent
* @return int The current progress bar percent
*/
public function getProgressPercent()
{
@ -200,7 +200,7 @@ class ProgressBar
/**
* Sets the progress bar width.
*
* @param int $size The progress bar size
* @param int $size The progress bar size
*/
public function setBarWidth($size)
{
@ -210,7 +210,7 @@ class ProgressBar
/**
* Gets the progress bar width.
*
* @return int The progress bar size
* @return int The progress bar size
*/
public function getBarWidth()
{
@ -299,7 +299,7 @@ class ProgressBar
/**
* Sets the redraw frequency.
*
* @param int $freq The frequency in steps
* @param int $freq The frequency in steps
*/
public function setRedrawFrequency($freq)
{
@ -328,7 +328,7 @@ class ProgressBar
/**
* Advances the progress output X steps.
*
* @param int $step Number of steps to advance
* @param int $step Number of steps to advance
*
* @throws \LogicException
*/
@ -340,7 +340,7 @@ class ProgressBar
/**
* Sets the current progress.
*
* @param int $step The current progress
* @param int $step The current progress
*
* @throws \LogicException
*/

View File

@ -164,7 +164,7 @@ class QuestionHelper extends Helper
* Autocompletes a question.
*
* @param OutputInterface $output
* @param Question $question
* @param Question $question
*
* @return string
*/
@ -281,9 +281,9 @@ class QuestionHelper extends Helper
/**
* Gets a hidden response from user.
*
* @param OutputInterface $output An Output instance
* @param OutputInterface $output An Output instance
*
* @return string The answer
* @return string The answer
*
* @throws \RuntimeException In case the fallback is deactivated and the response cannot be hidden
*/
@ -341,11 +341,11 @@ class QuestionHelper extends Helper
/**
* Validates an attempt.
*
* @param callable $interviewer A callable that will ask for a question and return the result
* @param OutputInterface $output An Output instance
* @param Question $question A Question instance
* @param callable $interviewer A callable that will ask for a question and return the result
* @param OutputInterface $output An Output instance
* @param Question $question A Question instance
*
* @return string The validated response
* @return string The validated response
*
* @throws \Exception In case the max number of attempts has been reached and no valid response has been given
*/
@ -370,7 +370,7 @@ class QuestionHelper extends Helper
/**
* Returns a valid unix shell.
*
* @return string|bool The valid shell name, false in case no valid shell is found
* @return string|bool The valid shell name, false in case no valid shell is found
*/
private function getShell()
{

View File

@ -296,9 +296,9 @@ class Table
/**
* Renders table cell with padding.
*
* @param array $row
* @param int $column
* @param string $cellFormat
* @param array $row
* @param int $column
* @param string $cellFormat
*/
private function renderCell(array $row, $column, $cellFormat)
{
@ -339,7 +339,7 @@ class Table
/**
* Gets column width.
*
* @param int $column
* @param int $column
*
* @return int
*/
@ -364,8 +364,8 @@ class Table
/**
* Gets cell width.
*
* @param array $row
* @param int $column
* @param array $row
* @param int $column
*
* @return int
*/

View File

@ -228,7 +228,7 @@ class TableStyle
/**
* Sets cell padding type.
*
* @param int $padType STR_PAD_*
* @param int $padType STR_PAD_*
*
* @return TableStyle
*/

View File

@ -96,8 +96,10 @@ class ConsoleLogger extends AbstractLogger
* Interpolates context values into the message placeholders
*
* @author PHP Framework Interoperability Group
* @param string $message
* @param array $context
*
* @param string $message
* @param array $context
*
* @return string
*/
private function interpolate($message, array $context)

View File

@ -47,7 +47,7 @@ class ChoiceQuestion extends Question
*
* When multiselect is set to true, multiple choices can be answered.
*
* @param bool $multiselect
* @param bool $multiselect
*
* @return ChoiceQuestion The current instance
*/

View File

@ -72,7 +72,7 @@ class Question
/**
* Sets whether the user response must be hidden or not.
*
* @param bool $hidden
* @param bool $hidden
*
* @return Question The current instance
*
@ -102,7 +102,7 @@ class Question
/**
* Sets whether to fallback on non-hidden question if the response can not be hidden.
*
* @param bool $fallback
* @param bool $fallback
*
* @return Question The current instance
*/
@ -179,7 +179,7 @@ class Question
*
* Null means an unlimited number of attempts.
*
* @param null|int $attempts
* @param null|int $attempts
*
* @return Question The current instance
*

View File

@ -119,7 +119,7 @@ class ApplicationTester
/**
* Gets the status code returned by the last execution of the application.
*
* @return int The status code
* @return int The status code
*/
public function getStatusCode()
{

View File

@ -123,7 +123,7 @@ class CommandTester
/**
* Gets the status code returned by the last execution of the application.
*
* @return int The status code
* @return int The status code
*/
public function getStatusCode()
{

View File

@ -140,7 +140,7 @@ class DebugClassLoader
*
* @param string $class The name of the class
*
* @return bool|null True, if loaded
* @return bool|null True, if loaded
*
* @throws \RuntimeException
*/
@ -213,7 +213,7 @@ class DebugClassLoader
chdir($cwd);
}
if ( 0 === substr_compare($real, $tail, -strlen($tail), strlen($tail), true)
if (0 === substr_compare($real, $tail, -strlen($tail), strlen($tail), true)
&& 0 !== substr_compare($real, $tail, -strlen($tail), strlen($tail), false)
) {
throw new \RuntimeException(sprintf('Case mismatch between class and source file names: %s vs %s', $class, $real));

View File

@ -88,7 +88,7 @@ class ErrorHandler
/**
* Sets the level at which the conversion to Exception is done.
*
* @param int|null $level The level (null to use the error_reporting() value and 0 to disable)
* @param int|null $level The level (null to use the error_reporting() value and 0 to disable)
*/
public function setLevel($level)
{
@ -98,7 +98,7 @@ class ErrorHandler
/**
* Sets the display_errors flag value.
*
* @param int $displayErrors The display_errors flag value
* @param int $displayErrors The display_errors flag value
*/
public function setDisplayErrors($displayErrors)
{

View File

@ -30,7 +30,7 @@ class DecoratorServicePass implements CompilerPassInterface
}
$definition->setDecoratedService(null);
list ($inner, $renamedId) = $decorated;
list($inner, $renamedId) = $decorated;
if (!$renamedId) {
$renamedId = $id.'.inner';
}

View File

@ -142,7 +142,7 @@ class XmlDumper extends Dumper
$service->setAttribute('lazy', 'true');
}
if (null !== $decorated = $definition->getDecoratedService()) {
list ($decorated, $renamedId) = $decorated;
list($decorated, $renamedId) = $decorated;
$service->setAttribute('decorates', $decorated);
if (null !== $renamedId) {
$service->setAttribute('decoration-inner-name', $renamedId);

View File

@ -140,7 +140,7 @@ class YamlDumper extends Dumper
}
if (null !== $decorated = $definition->getDecoratedService()) {
list ($decorated, $renamedId) = $decorated;
list($decorated, $renamedId) = $decorated;
$code .= sprintf(" decorates: %s\n", $decorated);
if (null !== $renamedId) {
$code .= sprintf(" decoration_inner_name: %s\n", $renamedId);

View File

@ -32,9 +32,9 @@ class Token
/**
* Constructor.
*
* @param int $type The type of the token
* @param string $value The token value
* @param int $cursor The cursor position in the source
* @param int $type The type of the token
* @param string $value The token value
* @param int $cursor The cursor position in the source
*/
public function __construct($type, $value, $cursor)
{
@ -56,8 +56,8 @@ class Token
/**
* Tests the current token for a type and/or a value.
*
* @param array|int $type The type to test
* @param string|null $value The token value
* @param array|int $type The type to test
* @param string|null $value The token value
*
* @return bool
*/

View File

@ -32,8 +32,8 @@ class Filesystem
* @param string $targetFile The target filename
* @param bool $override Whether to override an existing file or not
*
* @throws FileNotFoundException When originFile doesn't exist
* @throws IOException When copy fails
* @throws FileNotFoundException When originFile doesn't exist
* @throws IOException When copy fails
*/
public function copy($originFile, $targetFile, $override = false)
{

View File

@ -65,7 +65,7 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase
}
/**
* @param int $expectedFilePerms expected file permissions as three digits (i.e. 755)
* @param int $expectedFilePerms expected file permissions as three digits (i.e. 755)
* @param string $filePath
*/
protected function assertFilePermissions($expectedFilePerms, $filePath)

View File

@ -242,9 +242,9 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
/**
* Rounds a number according to the configured precision and rounding mode.
*
* @param int|float $number A number.
* @param int|float $number A number.
*
* @return int|float The rounded number.
* @return int|float The rounded number.
*/
private function round($number)
{

View File

@ -1128,8 +1128,8 @@ class Form implements \IteratorAggregate, FormInterface
/**
* Utility function for indenting multi-line strings.
*
* @param string $string The string
* @param int $level The number of spaces to use for indentation
* @param string $string The string
* @param int $level The number of spaces to use for indentation
*
* @return string The indented string
*/

View File

@ -61,12 +61,12 @@ class FormError implements \Serializable
* Any array key in $messageParameters will be used as a placeholder in
* $messageTemplate.
*
* @param string $message The translated error message
* @param string|null $messageTemplate The template for the error message
* @param array $messageParameters The parameters that should be
* substituted in the message template
* @param int|null $messagePluralization The value for error message pluralization
* @param mixed $cause The cause of the error
* @param string $message The translated error message
* @param string|null $messageTemplate The template for the error message
* @param array $messageParameters The parameters that should be
* substituted in the message template
* @param int|null $messagePluralization The value for error message pluralization
* @param mixed $cause The cause of the error
*
* @see \Symfony\Component\Translation\Translator
*/

View File

@ -128,7 +128,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/**
* Returns the current position of the iterator.
*
* @return int The 0-indexed position.
* @return int The 0-indexed position.
*/
public function key()
{
@ -138,7 +138,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/**
* Returns whether the iterator's position is valid.
*
* @return bool Whether the iterator is valid.
* @return bool Whether the iterator is valid.
*/
public function valid()
{
@ -159,9 +159,9 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/**
* Returns whether a position exists in the iterator.
*
* @param int $position The position
* @param int $position The position
*
* @return bool Whether that position exists
* @return bool Whether that position exists
*/
public function offsetExists($position)
{
@ -171,7 +171,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/**
* Returns the element at a position in the iterator.
*
* @param int $position The position
* @param int $position The position
*
* @return FormError|FormErrorIterator The element at the given position
*
@ -210,7 +210,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
* Returns whether the current element of the iterator can be recursed
* into.
*
* @return bool Whether the current element is an instance of this class
* @return bool Whether the current element is an instance of this class
*/
public function hasChildren()
{
@ -240,7 +240,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
*
* $count = count($form->getErrors(true, true));
*
* @return int The number of iterated elements
* @return int The number of iterated elements
*/
public function count()
{
@ -250,7 +250,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/**
* Sets the position of the iterator.
*
* @param int $position The new position
* @param int $position The new position
*
* @throws OutOfBoundsException If the position is invalid
*/

View File

@ -94,9 +94,9 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable
/**
* Returns the errors of this form.
*
* @param bool $deep Whether to include errors of child forms as well
* @param bool $flatten Whether to flatten the list of errors in case
* $deep is set to true
* @param bool $deep Whether to include errors of child forms as well
* @param bool $flatten Whether to flatten the list of errors in case
* $deep is set to true
*
* @return FormErrorIterator An iterator over the {@link FormError}
* instances that where added to this form

View File

@ -213,7 +213,7 @@ class ViolationMapperTest extends \PHPUnit_Framework_TestCase
$violation = $this->getConstraintViolation('children[address].data.street');
$parent = $this->getForm('parent');
$child = $this->getForm('address', 'address');
$grandChild = $this->getForm('street' , 'street');
$grandChild = $this->getForm('street', 'street');
$parent->add($child);
$child->add($grandChild);

View File

@ -28,7 +28,7 @@ class ServerParams
/**
* Returns maximum post size in bytes.
*
* @return null|int The maximum post size in bytes
* @return null|int The maximum post size in bytes
*/
public function getPostMaxSize()
{

View File

@ -139,7 +139,7 @@ class JsonResponse extends Response
/**
* Sets options used while encoding data to JSON.
*
* @param int $encodingOptions
* @param int $encodingOptions
*
* @return JsonResponse
*/

View File

@ -148,7 +148,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta
/**
* Returns the number of attributes.
*
* @return int The number of attributes
* @return int The number of attributes
*/
public function count()
{

View File

@ -56,8 +56,8 @@ class MetadataBag implements SessionBagInterface
/**
* Constructor.
*
* @param string $storageKey The key used to store bag in the session.
* @param int $updateThreshold The time to wait between two UPDATED updates
* @param string $storageKey The key used to store bag in the session.
* @param int $updateThreshold The time to wait between two UPDATED updates
*/
public function __construct($storageKey = '_sf2_meta', $updateThreshold = 0)
{

View File

@ -19,9 +19,9 @@ class ValueExporter
/**
* Converts a PHP value to a string.
*
* @param mixed $value The PHP value
* @param int $depth only for internal usage
* @param bool $deep only for internal usage
* @param mixed $value The PHP value
* @param int $depth only for internal usage
* @param bool $deep only for internal usage
*
* @return string The string representation of the given value
*/

View File

@ -90,7 +90,7 @@ class KernelEvent extends Event
/**
* Checks if this is a master request.
*
* @return bool True if the request is a master request
* @return bool True if the request is a master request
*
* @api
*/

View File

@ -104,7 +104,7 @@ class ExceptionListener implements EventSubscriberInterface
* Clones the request for the exception.
*
* @param \Exception $exception The thrown exception.
* @param Request $request The original request.
* @param Request $request The original request.
*
* @return Request $request The cloned request.
*/

View File

@ -13,7 +13,6 @@ namespace Symfony\Component\HttpKernel\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\KernelEvents;
/**

View File

@ -21,9 +21,9 @@ class UnprocessableEntityHttpException extends HttpException
/**
* Constructor.
*
* @param string $message The internal exception message
* @param \Exception $previous The previous exception
* @param int $code The internal exception code
* @param string $message The internal exception message
* @param \Exception $previous The previous exception
* @param int $code The internal exception code
*/
public function __construct($message = null, \Exception $previous = null, $code = 0)
{

View File

@ -11,8 +11,6 @@
namespace Symfony\Component\HttpKernel\Tests\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle\ExtensionAbsentBundle;
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand;
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\ExtensionPresentBundle;

View File

@ -906,7 +906,7 @@ class Process
*
* To disable the timeout, set this value to null.
*
* @param int|float|null $timeout The timeout in seconds
* @param int|float|null $timeout The timeout in seconds
*
* @return self The current Process instance.
*
@ -957,7 +957,7 @@ class Process
/**
* Sets PTY mode.
*
* @param bool $bool
* @param bool $bool
*
* @return self
*/
@ -1338,7 +1338,7 @@ class Process
/**
* Validates and returns the filtered timeout.
*
* @param int|float|null $timeout
* @param int|float|null $timeout
*
* @return float|null
*

View File

@ -213,7 +213,7 @@ class PropertyAccessor implements PropertyAccessorInterface
* @return array The values read in the path.
*
* @throws UnexpectedTypeException If a value within the path is neither object nor array.
* @throws NoSuchIndexException If a non-existing index is accessed
* @throws NoSuchIndexException If a non-existing index is accessed
*/
private function &readPropertiesUntil(&$objectOrArray, PropertyPathInterface $propertyPath, $lastIndex, $ignoreInvalidIndices = true)
{
@ -519,7 +519,7 @@ class PropertyAccessor implements PropertyAccessorInterface
* @param object $object The object to write to
* @param string $property The property to write
*
* @return bool Whether the property is writable
* @return bool Whether the property is writable
*/
private function isPropertyWritable($object, $property)
{

View File

@ -85,7 +85,7 @@ class PropertyAccessorBuilder
}
/**
* @return bool true is exceptions in read context for array is enabled
* @return bool true is exceptions in read context for array is enabled
*/
public function isExceptionOnInvalidIndexEnabled()
{

View File

@ -92,7 +92,7 @@ interface PropertyAccessorInterface
* @param object|array $objectOrArray The object or array to check
* @param string|PropertyPathInterface $propertyPath The property path to check
*
* @return bool Whether the value can be set
* @return bool Whether the value can be set
*
* @throws Exception\InvalidArgumentException If the property path is invalid
*/
@ -107,7 +107,7 @@ interface PropertyAccessorInterface
* @param object|array $objectOrArray The object or array to check
* @param string|PropertyPathInterface $propertyPath The property path to check
*
* @return bool Whether the property path can be read
* @return bool Whether the property path can be read
*
* @throws Exception\InvalidArgumentException If the property path is invalid
*/

View File

@ -268,7 +268,7 @@ class Route implements \Serializable
*
* @param string $scheme
*
* @return bool true if the scheme requirement exists, otherwise false
* @return bool true if the scheme requirement exists, otherwise false
*/
public function hasScheme($scheme)
{

View File

@ -114,6 +114,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
* ACL entries have the CASCADE option on their foreign key so they will also get deleted
*
* @param SecurityIdentityInterface $sid
*
* @throws \InvalidArgumentException
*/
public function deleteSecurityIdentity(SecurityIdentityInterface $sid)
@ -368,7 +369,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
* Updates a user security identity when the user's username changes
*
* @param UserSecurityIdentity $usid
* @param string $oldUsername
* @param string $oldUsername
*/
public function updateUserSecurityIdentity(UserSecurityIdentity $usid, $oldUsername)
{
@ -653,7 +654,9 @@ QUERY;
* Constructs the SQL to delete a security identity.
*
* @param SecurityIdentityInterface $sid
*
* @throws \InvalidArgumentException
*
* @return string
*/
protected function getDeleteSecurityIdentityIdSql(SecurityIdentityInterface $sid)
@ -692,7 +695,8 @@ QUERY;
* Constructs the SQL for updating a user security identity.
*
* @param UserSecurityIdentity $usid
* @param string $oldUsername
* @param string $oldUsername
*
* @return string
*/
protected function getUpdateUserSecurityIdentitySql(UserSecurityIdentity $usid, $oldUsername)

View File

@ -62,7 +62,7 @@ interface CsrfTokenManagerInterface
*
* @param CsrfToken $token A CSRF token
*
* @return bool Returns true if the token is valid, false otherwise
* @return bool Returns true if the token is valid, false otherwise
*/
public function isTokenValid(CsrfToken $token);
}

View File

@ -40,8 +40,8 @@ class NativeSessionTokenStorage implements TokenStorageInterface
/**
* Initializes the storage with a session namespace.
*
* @param string $namespace The namespace under which the token is stored
* in the session
* @param string $namespace The namespace under which the token is stored
* in the session
*/
public function __construct($namespace = self::SESSION_NAMESPACE)
{

View File

@ -53,7 +53,7 @@ interface TokenStorageInterface
*
* @param string $tokenId The token ID
*
* @return bool Whether a token exists with the given ID
* @return bool Whether a token exists with the given ID
*/
public function hasToken($tokenId);
}

View File

@ -38,11 +38,11 @@ class SimplePreAuthenticationListener implements ListenerInterface
/**
* Constructor.
*
* @param SecurityContextInterface $securityContext A SecurityContext instance
* @param AuthenticationManagerInterface $authenticationManager An AuthenticationManagerInterface instance
* @param string $providerKey
* @param SimplePreAuthenticatorInterface $simpleAuthenticator A SimplePreAuthenticatorInterface instance
* @param LoggerInterface $logger A LoggerInterface instance
* @param SecurityContextInterface $securityContext A SecurityContext instance
* @param AuthenticationManagerInterface $authenticationManager An AuthenticationManagerInterface instance
* @param string $providerKey
* @param SimplePreAuthenticatorInterface $simpleAuthenticator A SimplePreAuthenticatorInterface instance
* @param LoggerInterface $logger A LoggerInterface instance
*/
public function __construct(SecurityContextInterface $securityContext, AuthenticationManagerInterface $authenticationManager, $providerKey, SimplePreAuthenticatorInterface $simpleAuthenticator, LoggerInterface $logger = null)
{

View File

@ -157,7 +157,7 @@ class SwitchUserListenerTest extends \PHPUnit_Framework_TestCase
$this->securityContext->expects($this->any())->method('getToken')->will($this->returnValue($token));
$this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('kuba'));
$this->request->query->expects($this->once())->method('remove', '_switch_user');
$this->request->query->expects($this->any())->method('all')->will($this->returnValue(array('page' => 3,'section' => 2)));
$this->request->query->expects($this->any())->method('all')->will($this->returnValue(array('page' => 3, 'section' => 2)));
$this->request->expects($this->any())->method('getUri')->will($this->returnValue('/'));
$this->request->server->expects($this->once())->method('set')->with('QUERY_STRING', 'page=3&section=2');

View File

@ -157,7 +157,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
/**
* Returns a matching normalizer.
*
* @param object $data The object to get the serializer for
* @param object $data The object to get the serializer for
* @param string $format format name, present to give the option to normalizers to act differently based on formats
*
* @return NormalizerInterface|null

View File

@ -56,8 +56,8 @@ class Package implements PackageInterface
/**
* Applies version to the supplied path.
*
* @param string $path A path
* @param string|bool|null $version A specific version
* @param string $path A path
* @param string|bool|null $version A specific version
*
* @return string The versionized path
*/

View File

@ -105,9 +105,9 @@ class CoreAssetsHelper extends Helper implements PackageInterface
*
* Absolute paths (i.e. http://...) are returned unmodified.
*
* @param string $path A public path
* @param string $packageName The name of the asset package to use
* @param string|bool|null $version A specific version
* @param string $path A public path
* @param string $packageName The name of the asset package to use
* @param string|bool|null $version A specific version
*
* @return string A public path which takes into account the base path and URL path
*/

View File

@ -54,9 +54,9 @@ class JsonFileLoader extends ArrayLoader implements LoaderInterface
/**
* Translates JSON_ERROR_* constant into meaningful message.
*
* @param int $errorCode Error code returned by json_last_error() call
* @param int $errorCode Error code returned by json_last_error() call
*
* @return string Message string
* @return string Message string
*/
private function getJSONErrorMessage($errorCode)
{

View File

@ -77,8 +77,8 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface
* supports the 2.4 context API.
*
* @param ExecutionContextInterface $context The context to use
* @param string $message The violation message
* @param array $parameters The message parameters
* @param string $message The violation message
* @param array $parameters The message parameters
*
* @return ConstraintViolationBuilderInterface The violation builder
*
@ -126,9 +126,9 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface
* won't know what an "object", "array" or "resource" is and will be
* confused by the violation message.
*
* @param mixed $value The value to format as string
* @param int $format A bitwise combination of the format
* constants in this class
* @param mixed $value The value to format as string
* @param int $format A bitwise combination of the format
* constants in this class
*
* @return string The string representation of the passed value
*/
@ -186,9 +186,9 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface
* Each of the values is converted to a string using
* {@link formatValue()}. The values are then concatenated with commas.
*
* @param array $values A list of values
* @param int $format A bitwise combination of the format
* constants in this class
* @param array $values A list of values
* @param int $format A bitwise combination of the format
* constants in this class
*
* @return string The string representation of the value list
*

View File

@ -110,9 +110,9 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable
/**
* Returns whether the given offset exists in the sequence.
*
* @param int $offset The offset
* @param int $offset The offset
*
* @return bool Whether the offset exists
* @return bool Whether the offset exists
*
* @deprecated Implemented for backwards compatibility with Symfony < 2.5.
* To be removed in Symfony 3.0.
@ -125,7 +125,7 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable
/**
* Returns the group at the given offset.
*
* @param int $offset The offset
* @param int $offset The offset
*
* @return string The group a the given offset
*
@ -149,8 +149,8 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable
/**
* Sets the group at the given offset.
*
* @param int $offset The offset
* @param string $value The group name
* @param int $offset The offset
* @param string $value The group name
*
* @deprecated Implemented for backwards compatibility with Symfony < 2.5.
* To be removed in Symfony 3.0.
@ -169,7 +169,7 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable
/**
* Removes the group at the given offset.
*
* @param int $offset The offset
* @param int $offset The offset
*
* @deprecated Implemented for backwards compatibility with Symfony < 2.5.
* To be removed in Symfony 3.0.
@ -182,7 +182,7 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable
/**
* Returns the number of groups in the sequence.
*
* @return int The number of groups
* @return int The number of groups
*
* @deprecated Implemented for backwards compatibility with Symfony < 2.5.
* To be removed in Symfony 3.0.

View File

@ -123,13 +123,13 @@ class ExecutionContext implements ExecutionContextInterface
/**
* Creates a new execution context.
*
* @param ValidatorInterface $validator The validator
* @param mixed $root The root value of the
* validated object graph
* @param TranslatorInterface $translator The translator
* @param string|null $translationDomain The translation domain to
* use for translating
* violation messages
* @param ValidatorInterface $validator The validator
* @param mixed $root The root value of the
* validated object graph
* @param TranslatorInterface $translator The translator
* @param string|null $translationDomain The translation domain to
* use for translating
* violation messages
*
* @internal Called by {@link ExecutionContextFactory}. Should not be used
* in user code.

View File

@ -38,10 +38,10 @@ class ExecutionContextFactory implements ExecutionContextFactoryInterface
/**
* Creates a new context factory.
*
* @param TranslatorInterface $translator The translator
* @param string|null $translationDomain The translation domain to
* use for translating
* violation messages
* @param TranslatorInterface $translator The translator
* @param string|null $translationDomain The translation domain to
* use for translating
* violation messages
*/
public function __construct(TranslatorInterface $translator, $translationDomain = null)
{

View File

@ -139,9 +139,9 @@ interface ExecutionContextInterface extends LegacyExecutionContextInterface
/**
* Marks an object as validated in a specific validation group.
*
* @param string $cacheKey The hash of the object
* @param string $groupHash The group's name or hash, if it is group
* sequence
* @param string $cacheKey The hash of the object
* @param string $groupHash The group's name or hash, if it is group
* sequence
*
* @internal Used by the validator engine. Should not be called by user
* code.
@ -151,12 +151,12 @@ interface ExecutionContextInterface extends LegacyExecutionContextInterface
/**
* Returns whether an object was validated in a specific validation group.
*
* @param string $cacheKey The hash of the object
* @param string $groupHash The group's name or hash, if it is group
* sequence
* @param string $cacheKey The hash of the object
* @param string $groupHash The group's name or hash, if it is group
* sequence
*
* @return bool Whether the object was already validated for that
* group
* @return bool Whether the object was already validated for that
* group
*
* @internal Used by the validator engine. Should not be called by user
* code.
@ -166,7 +166,7 @@ interface ExecutionContextInterface extends LegacyExecutionContextInterface
/**
* Marks a constraint as validated for an object.
*
* @param string $cacheKey The hash of the object
* @param string $cacheKey The hash of the object
* @param string $constraintHash The hash of the constraint
*
* @internal Used by the validator engine. Should not be called by user
@ -177,10 +177,10 @@ interface ExecutionContextInterface extends LegacyExecutionContextInterface
/**
* Returns whether a constraint was validated for an object.
*
* @param string $cacheKey The hash of the object
* @param string $cacheKey The hash of the object
* @param string $constraintHash The hash of the constraint
*
* @return bool Whether the constraint was already validated
* @return bool Whether the constraint was already validated
*
* @internal Used by the validator engine. Should not be called by user
* code.

View File

@ -46,7 +46,7 @@ interface ClassMetadataInterface extends MetadataInterface, LegacyPropertyMetada
*
* If it is, you can access the group sequence with {@link getGroupSequence()}.
*
* @return bool Returns true if the "Default" group is overridden
* @return bool Returns true if the "Default" group is overridden
*
* @see \Symfony\Component\Validator\Constraints\GroupSequence
*/
@ -71,8 +71,8 @@ interface ClassMetadataInterface extends MetadataInterface, LegacyPropertyMetada
* This interface will be used to obtain the group sequence when an object
* of this class is validated.
*
* @return bool Returns true if the "Default" group is overridden by
* a dynamic group sequence
* @return bool Returns true if the "Default" group is overridden by
* a dynamic group sequence
*
* @see \Symfony\Component\Validator\GroupSequenceProviderInterface
*/

View File

@ -146,7 +146,7 @@ class LazyLoadingMetadataFactory implements MetadataFactoryInterface
*
* @param string|object $value A class name or an object
*
* @return bool Whether metadata can be returned for that class
* @return bool Whether metadata can be returned for that class
*/
public function hasMetadataFor($value)
{

View File

@ -34,7 +34,7 @@ interface MetadataInterface extends LegacyMetadataInterface
/**
* Returns the strategy for cascading objects.
*
* @return int The cascading strategy
* @return int The cascading strategy
*
* @see CascadingStrategy
*/
@ -43,7 +43,7 @@ interface MetadataInterface extends LegacyMetadataInterface
/**
* Returns the strategy for traversing traversable objects.
*
* @return int The traversal strategy
* @return int The traversal strategy
*
* @see TraversalStrategy
*/

View File

@ -313,17 +313,17 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
* traversal, the object will be iterated and each nested object will be
* validated instead.
*
* @param object $object The object to cascade
* @param string $propertyPath The current property path
* @param string[] $groups The validated groups
* @param int $traversalStrategy The strategy for traversing the
* cascaded object
* @param ExecutionContextInterface $context The current execution context
* @param object $object The object to cascade
* @param string $propertyPath The current property path
* @param string[] $groups The validated groups
* @param int $traversalStrategy The strategy for traversing the
* cascaded object
* @param ExecutionContextInterface $context The current execution context
*
* @throws NoSuchMetadataException If the object has no associated metadata
* and does not implement {@link \Traversable}
* or if traversal is disabled via the
* $traversalStrategy argument
* @throws NoSuchMetadataException If the object has no associated metadata
* and does not implement {@link \Traversable}
* or if traversal is disabled via the
* $traversalStrategy argument
* @throws UnsupportedMetadataException If the metadata returned by the
* metadata factory does not implement
* {@link ClassMetadataInterface}
@ -384,11 +384,11 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
* @param array|\Traversable $collection The collection
* @param string $propertyPath The current property path
* @param string[] $groups The validated groups
* @param bool $stopRecursion Whether to disable
* @param bool $stopRecursion Whether to disable
* recursive iteration. For
* backwards compatibility
* with Symfony < 2.5.
* @param ExecutionContextInterface $context The current execution context
* @param ExecutionContextInterface $context The current execution context
*
* @see ClassNode
* @see CollectionNode
@ -832,12 +832,12 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
/**
* Validates a node's value against all constraints in the given group.
*
* @param mixed $value The validated value
* @param string $cacheKey The key for caching the
* validated value
* @param MetadataInterface $metadata The metadata of the value
* @param string $group The group to validate
* @param ExecutionContextInterface $context The execution context
* @param mixed $value The validated value
* @param string $cacheKey The key for caching the
* validated value
* @param MetadataInterface $metadata The metadata of the value
* @param string $group The group to validate
* @param ExecutionContextInterface $context The execution context
*/
private function validateInGroup($value, $cacheKey, MetadataInterface $metadata, $group, ExecutionContextInterface $context)
{

View File

@ -174,7 +174,7 @@ interface ValidatorBuilderInterface
/**
* Sets the API version that the returned validator should support.
*
* @param int $apiVersion The required API version
* @param int $apiVersion The required API version
*
* @return ValidatorBuilderInterface The builder object
*

View File

@ -82,7 +82,7 @@ interface ConstraintViolationBuilderInterface
* Sets the number which determines how the plural form of the violation
* message is chosen when it is translated.
*
* @param int $number The number for determining the plural form
* @param int $number The number for determining the plural form
*
* @return ConstraintViolationBuilderInterface This builder
*

View File

@ -11,10 +11,6 @@
namespace Symfony\Component\Validator\Violation;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintViolation;
use Symfony\Component\Validator\ConstraintViolationList;
use Symfony\Component\Validator\ExecutionContextInterface;
use Symfony\Component\Validator\Util\PropertyPath;