Merge branch '3.0' into 3.1

* 3.0:
  fixed CS
  fixed CS
  fixed form tests
  [Console] Fix formatting of SymfonyStyle::comment()
  [Form] fix post max size translation type extension for >= 2.8
  removed dots at the end of @param and @return
  fixed typo
This commit is contained in:
Fabien Potencier 2016-06-29 07:41:56 +02:00
commit 6bed60b467
221 changed files with 969 additions and 901 deletions

View File

@ -69,9 +69,9 @@ class ContainerAwareEventManager extends EventManager
/**
* Gets the listeners of a specific event or all listeners.
*
* @param string $event The name of the event.
* @param string $event The name of the event
*
* @return array The event listeners for the specified event, or all event listeners.
* @return array The event listeners for the specified event, or all event listeners
*/
public function getListeners($event = null)
{
@ -83,7 +83,7 @@ class ContainerAwareEventManager extends EventManager
*
* @param string $event
*
* @return bool TRUE if the specified event has any listeners, FALSE otherwise.
* @return bool TRUE if the specified event has any listeners, FALSE otherwise
*/
public function hasListeners($event)
{
@ -93,8 +93,8 @@ class ContainerAwareEventManager extends EventManager
/**
* Adds an event listener that listens on the specified events.
*
* @param string|array $events The event(s) to listen on.
* @param object|string $listener The listener object.
* @param string|array $events The event(s) to listen on
* @param object|string $listener The listener object
*
* @throws \RuntimeException
*/

View File

@ -40,7 +40,7 @@ abstract class AbstractDoctrineExtension extends Extension
protected $drivers = array();
/**
* @param array $objectManager A configured object manager.
* @param array $objectManager A configured object manager
* @param ContainerBuilder $container A ContainerBuilder instance
*
* @throws \InvalidArgumentException
@ -300,8 +300,8 @@ abstract class AbstractDoctrineExtension extends Extension
/**
* Loads a configured object manager metadata, query or result cache driver.
*
* @param array $objectManager A configured object manager.
* @param ContainerBuilder $container A ContainerBuilder instance.
* @param array $objectManager A configured object manager
* @param ContainerBuilder $container A ContainerBuilder instance
* @param string $cacheName
*
* @throws \InvalidArgumentException In case of unknown driver type.
@ -314,10 +314,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
*
@ -404,12 +404,12 @@ abstract class AbstractDoctrineExtension extends Extension
/**
* Returns a modified version of $managerConfigs.
*
* The manager called $autoMappedManager will map all bundles that are not mepped by other managers.
* The manager called $autoMappedManager will map all bundles that are not mapped by other managers.
*
* @param array $managerConfigs
* @param array $bundles
*
* @return array The modified version of $managerConfigs.
* @return array The modified version of $managerConfigs
*/
protected function fixManagersAutoMappings(array $managerConfigs, array $bundles)
{

View File

@ -105,18 +105,18 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
* The $aliasMap parameter can be used to define bundle namespace shortcuts like the
* DoctrineBundle provides automatically for objects in the default Entity/Document folder.
*
* @param Definition|Reference $driver Driver DI definition or reference.
* @param string[] $namespaces List of namespaces handled by $driver.
* @param Definition|Reference $driver Driver DI definition or reference
* @param string[] $namespaces List of namespaces handled by $driver
* @param string[] $managerParameters List of container parameters that could
* hold the manager name.
* @param string $driverPattern Pattern for the metadata driver service name.
* @param string $driverPattern Pattern for the metadata driver service name
* @param string $enabledParameter Service container parameter that must be
* present to enable the mapping. Set to false
* to not do any check, optional.
* @param string $configurationPattern Pattern for the Configuration service name.
* @param string $configurationPattern Pattern for the Configuration service name
* @param string $registerAliasMethodName Name of Configuration class method to
* register alias.
* @param string[] $aliasMap Map of alias to namespace.
* @param string[] $aliasMap Map of alias to namespace
*
* @since Support for bundle alias was added in Symfony 2.6
*/
@ -218,7 +218,7 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
*
* @param ContainerBuilder $container
*
* @return string The name of the active manager.
* @return string The name of the active manager
*
* @throws InvalidArgumentException If none of the managerParameters is found in the container.
*/

View File

@ -21,7 +21,7 @@ interface EntityLoaderInterface
/**
* Returns an array of entities that are valid choices in the corresponding choice list.
*
* @return array The entities.
* @return array The entities
*/
public function getEntities();
@ -31,9 +31,9 @@ interface EntityLoaderInterface
* @param string $identifier The identifier field of the object. This method
* is not applicable for fields with multiple
* identifiers.
* @param array $values The values of the identifiers.
* @param array $values The values of the identifiers
*
* @return array The entities.
* @return array The entities
*/
public function getEntitiesByIds($identifier, array $values);
}

View File

@ -105,9 +105,9 @@ class IdReader
*
* This method assumes that the object has a single-column ID.
*
* @param object $object The object.
* @param object $object The object
*
* @return mixed The ID value.
* @return mixed The ID value
*/
public function getIdValue($object)
{
@ -138,7 +138,7 @@ class IdReader
*
* This method assumes that the object has a single-column ID.
*
* @return string The name of the ID field.
* @return string The name of the ID field
*/
public function getIdField()
{

View File

@ -35,7 +35,7 @@ class ORMQueryBuilderLoader implements EntityLoaderInterface
/**
* Construct an ORM Query Builder Loader.
*
* @param QueryBuilder $queryBuilder The query builder for creating the query builder.
* @param QueryBuilder $queryBuilder The query builder for creating the query builder
*/
public function __construct(QueryBuilder $queryBuilder)
{

View File

@ -56,9 +56,9 @@ abstract class DoctrineType extends AbstractType
*
* For backwards compatibility, objects are cast to strings by default.
*
* @param object $choice The object.
* @param object $choice The object
*
* @return string The string representation of the object.
* @return string The string representation of the object
*
* @internal This method is public to be usable as callback. It should not
* be used in user code.
@ -75,12 +75,12 @@ abstract class DoctrineType extends AbstractType
* a single-column integer ID. In that case, the value of the field is
* the ID of the object. That ID is also used as field name.
*
* @param object $choice The object.
* @param int|string $key The choice key.
* @param object $choice The object
* @param int|string $key The choice key
* @param string $value The choice value. Corresponds to the object's
* ID here.
*
* @return string The field name.
* @return string The field name
*
* @internal This method is public to be usable as callback. It should not
* be used in user code.

View File

@ -168,7 +168,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

@ -33,7 +33,7 @@ class DeprecationErrorHandler
* - use a number to define the upper bound of allowed deprecations,
* making the test suite fail whenever more notices are trigerred.
*
* @param int|string|false $mode The reporting mode. Defaults to not allowing any deprecations.
* @param int|string|false $mode The reporting mode, defaults to not allowing any deprecations
*/
public static function register($mode = 0)
{

View File

@ -27,7 +27,7 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
private $isSkipped = array();
/**
* @param array $mockedNamespaces List of namespaces, indexed by mocked features (time-sensitive or dns-sensitive).
* @param array $mockedNamespaces List of namespaces, indexed by mocked features (time-sensitive or dns-sensitive)
*/
public function __construct(array $mockedNamespaces = array())
{

View File

@ -33,7 +33,7 @@ class LazyServiceProjectServiceContainer extends Container
*
* @param bool $lazyLoad whether to try lazy-loading the service with a proxy
*
* @return stdClass A stdClass instance.
* @return stdClass A stdClass instance
*/
public function getFooService($lazyLoad = true)
{

View File

@ -33,7 +33,7 @@ class LazyServiceProjectServiceContainer extends Container
*
* @param bool $lazyLoad whether to try lazy-loading the service with a proxy
*
* @return stdClass A stdClass instance.
* @return stdClass A stdClass instance
*/
public function getFooService($lazyLoad = true)
{

View File

@ -104,9 +104,9 @@ class FormExtension extends \Twig_Extension implements \Twig_Extension_InitRunti
/**
* Makes a technical name human readable.
*
* @param string $text The text to humanize.
* @param string $text The text to humanize
*
* @return string The humanized text.
* @return string The humanized text
*/
public function humanize($text)
{
@ -129,10 +129,10 @@ class FormExtension extends \Twig_Extension implements \Twig_Extension_InitRunti
* seems to be much more efficient at executing filters than at executing
* methods of an object.
*
* @param ChoiceView $choice The choice to check.
* @param string|array $selectedValue The selected value to compare.
* @param ChoiceView $choice The choice to check
* @param string|array $selectedValue The selected value to compare
*
* @return bool Whether the choice is selected.
* @return bool Whether the choice is selected
*
* @see ChoiceView::isSelected()
*/

View File

@ -70,11 +70,11 @@ class TwigRendererEngine extends AbstractRendererEngine implements TwigRendererE
*
* @see getResourceForBlock()
*
* @param string $cacheKey The cache key of the form view.
* @param FormView $view The form view for finding the applying themes.
* @param string $blockName The name of the block to load.
* @param string $cacheKey The cache key of the form view
* @param FormView $view The form view for finding the applying themes
* @param string $blockName The name of the block to load
*
* @return bool True if the resource could be loaded, false otherwise.
* @return bool True if the resource could be loaded, false otherwise
*/
protected function loadResourceForBlockName($cacheKey, FormView $view, $blockName)
{
@ -141,7 +141,7 @@ class TwigRendererEngine extends AbstractRendererEngine implements TwigRendererE
/**
* Loads the resources for all blocks in a theme.
*
* @param string $cacheKey The cache key for storing the resource.
* @param string $cacheKey The cache key for storing the resource
* @param mixed $theme The theme to load the block from. This parameter
* is passed by reference, because it might be necessary
* to initialize the theme first. Any changes made to

View File

@ -184,7 +184,7 @@
<tag name="form.type_extension" extended-type="Symfony\Component\Form\Extension\Core\Type\SubmitType" />
</service>
<service id="form.type_extension.upload.validator" class="Symfony\Component\Form\Extension\Validator\Type\UploadValidatorExtension">
<tag name="form.type_extension" alias="form" />
<tag name="form.type_extension" extended-type="Symfony\Component\Form\Extension\Core\Type\FormType" />
<argument type="service" id="translator"/>
<argument type="string">%validator.translation_domain%</argument>
</service>

View File

@ -21,7 +21,7 @@ class RedirectableUrlMatcher extends BaseMatcher
/**
* Redirects the user to another URL.
*
* @param string $path The path info to redirect to.
* @param string $path The path info to redirect to
* @param string $route The route that matched
* @param string $scheme The URL scheme (null to keep the current one)
*

View File

@ -202,9 +202,9 @@ class FormHelper extends Helper
/**
* Renders a block of the template.
*
* @param FormView $view The view for determining the used themes.
* @param string $blockName The name of the block to render.
* @param array $variables The variable to pass to the template.
* @param FormView $view The view for determining the used themes
* @param string $blockName The name of the block to render
* @param array $variables The variable to pass to the template
*
* @return string The HTML markup
*/

View File

@ -1,3 +1,3 @@
// This service is an alias for the service service_1
 // This service is an alias for the service service_1

View File

@ -1,3 +1,3 @@
// This service is an alias for the service service_2
 // This service is an alias for the service service_2

View File

@ -169,7 +169,7 @@ class SecurityDataCollector extends DataCollector
* Checks if the data contains information about inherited roles. Still the inherited
* roles can be an empty array.
*
* @return bool true if the profile was contains inherited role information.
* @return bool true if the profile was contains inherited role information
*/
public function supportsRoleHierarchy()
{

View File

@ -28,7 +28,7 @@ class ExceptionController
protected $twig;
/**
* @var bool Show error (false) or exception (true) pages by default.
* @var bool Show error (false) or exception (true) pages by default
*/
protected $debug;

View File

@ -160,7 +160,7 @@
/**
* Query an element with a CSS selector.
*
* @param string selector a CSS-selector-compatible query string.
* @param string selector a CSS-selector-compatible query string
*
* @return DOMElement|null
*/
@ -187,7 +187,7 @@
/**
* Check whether this event is a child event.
*
* @return true if it is.
* @return true if it is
*/
function isChildEvent(event)
{
@ -197,7 +197,7 @@
/**
* Check whether this event is categorized in 'section'.
*
* @return true if it is.
* @return true if it is
*/
function isSectionEvent(event)
{
@ -217,8 +217,8 @@
*
* @param request the request object
* @param max <subjected for removal>
* @param threshold the threshold (lower bound) of the length of the timeline (in milliseconds).
* @param width the width of the canvas.
* @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

@ -111,7 +111,7 @@ class Request
/**
* Gets the request raw body data.
*
* @return string The request raw body data.
* @return string The request raw body data
*/
public function getContent()
{

View File

@ -59,8 +59,8 @@ class ApcClassLoader
/**
* Constructor.
*
* @param string $prefix The APC namespace prefix to use.
* @param object $decorated A class loader object that implements the findFile() method.
* @param string $prefix The APC namespace prefix to use
* @param object $decorated A class loader object that implements the findFile() method
*
* @throws \RuntimeException
* @throws \InvalidArgumentException

View File

@ -58,8 +58,8 @@ class WinCacheClassLoader
/**
* Constructor.
*
* @param string $prefix The WinCache namespace prefix to use.
* @param object $decorated A class loader object that implements the findFile() method.
* @param string $prefix The WinCache namespace prefix to use
* @param object $decorated A class loader object that implements the findFile() method
*
* @throws \RuntimeException
* @throws \InvalidArgumentException

View File

@ -58,8 +58,8 @@ class XcacheClassLoader
/**
* Constructor.
*
* @param string $prefix The XCache namespace prefix to use.
* @param object $decorated A class loader object that implements the findFile() method.
* @param string $prefix The XCache namespace prefix to use
* @param object $decorated A class loader object that implements the findFile() method
*
* @throws \RuntimeException
* @throws \InvalidArgumentException

View File

@ -32,7 +32,7 @@ interface ConfigCacheInterface
*
* This check should take the metadata passed to the write() method into consideration.
*
* @return bool Whether the cache is still fresh.
* @return bool Whether the cache is still fresh
*/
public function isFresh();

View File

@ -347,8 +347,8 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
/**
* Merges values together.
*
* @param mixed $leftSide The left side to merge.
* @param mixed $rightSide The right side to merge.
* @param mixed $leftSide The left side to merge
* @param mixed $rightSide The right side to merge
*
* @return mixed The merged values
*

View File

@ -184,7 +184,7 @@ abstract class BaseNode implements NodeInterface
/**
* Returns the name of this node.
*
* @return string The Node's name.
* @return string The Node's name
*/
public function getName()
{
@ -237,9 +237,9 @@ abstract class BaseNode implements NodeInterface
/**
* Normalizes a value, applying all normalization closures.
*
* @param mixed $value Value to normalize.
* @param mixed $value Value to normalize
*
* @return mixed The normalized value.
* @return mixed The normalized value
*/
final public function normalize($value)
{
@ -329,7 +329,7 @@ abstract class BaseNode implements NodeInterface
/**
* Normalizes the value.
*
* @param mixed $value The value to normalize.
* @param mixed $value The value to normalize
*
* @return mixed The normalized value
*/

View File

@ -178,7 +178,7 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition
* This method is applicable to prototype nodes only.
*
* @param string $name The name of the key
* @param bool $removeKeyItem Whether or not the key item should be removed.
* @param bool $removeKeyItem Whether or not the key item should be removed
*
* @return ArrayNodeDefinition
*/

View File

@ -278,8 +278,8 @@ class PrototypedArrayNode extends ArrayNode
/**
* Merges values together.
*
* @param mixed $leftSide The left side to merge.
* @param mixed $rightSide The right side to merge.
* @param mixed $leftSide The left side to merge
* @param mixed $rightSide The right side to merge
*
* @return mixed The merged values
*

View File

@ -57,7 +57,7 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface
/**
* Sets if this node is allowed to have an empty value.
*
* @param bool $boolean True if this entity will accept empty values.
* @param bool $boolean True if this entity will accept empty values
*/
public function setAllowEmptyValue($boolean)
{

View File

@ -54,7 +54,7 @@ class FileResource implements SelfCheckingResourceInterface, \Serializable
}
/**
* @return string The canonicalized, absolute path to the resource.
* @return string The canonicalized, absolute path to the resource
*/
public function getResource()
{

View File

@ -39,10 +39,10 @@ interface ResourceCheckerInterface
/**
* Validates the resource.
*
* @param ResourceInterface $resource The resource to be validated.
* @param int $timestamp The timestamp at which the cache associated with this resource was created.
* @param ResourceInterface $resource The resource to be validated
* @param int $timestamp The timestamp at which the cache associated with this resource was created
*
* @return bool True if the resource has not changed since the given timestamp, false otherwise.
* @return bool True if the resource has not changed since the given timestamp, false otherwise
*/
public function isFresh(ResourceInterface $resource, $timestamp);
}

View File

@ -232,7 +232,7 @@ class Application
/**
* Gets the help message.
*
* @return string A help message.
* @return string A help message
*/
public function getHelp()
{

View File

@ -21,10 +21,10 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce
private $alternatives;
/**
* @param string $message Exception message to throw.
* @param array $alternatives List of similar defined names.
* @param int $code Exception code.
* @param Exception $previous previous exception used for the exception chaining.
* @param string $message Exception message to throw
* @param array $alternatives List of similar defined names
* @param int $code Exception code
* @param Exception $previous previous exception used for the exception chaining
*/
public function __construct($message, array $alternatives = array(), $code = 0, \Exception $previous = null)
{
@ -34,7 +34,7 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce
}
/**
* @return array A list of similar defined names.
* @return array A list of similar defined names
*/
public function getAlternatives()
{

View File

@ -30,7 +30,7 @@ class HelperSet implements \IteratorAggregate
/**
* Constructor.
*
* @param Helper[] $helpers An array of helper.
* @param Helper[] $helpers An array of helper
*/
public function __construct(array $helpers = array())
{

View File

@ -93,7 +93,7 @@ class ArgvInput extends Input
/**
* Parses a short option.
*
* @param string $token The current token.
* @param string $token The current token
*/
private function parseShortOption($token)
{

View File

@ -66,53 +66,10 @@ class SymfonyStyle extends OutputStyle
*/
public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false)
{
$this->autoPrependBlock();
$messages = is_array($messages) ? array_values($messages) : array($messages);
$indentLength = 0;
$lines = array();
if (null !== $type) {
$typePrefix = sprintf('[%s] ', $type);
$indentLength = strlen($typePrefix);
$lineIndentation = str_repeat(' ', $indentLength);
}
// wrap and add newlines for each element
foreach ($messages as $key => $message) {
$message = OutputFormatter::escape($message);
$lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - Helper::strlen($prefix) - $indentLength, PHP_EOL, true)));
// prefix each line with a number of spaces equivalent to the type length
if (null !== $type) {
foreach ($lines as &$line) {
$line = $lineIndentation === substr($line, 0, $indentLength) ? $line : $lineIndentation.$line;
}
}
if (count($messages) > 1 && $key < count($messages) - 1) {
$lines[] = '';
}
}
if (null !== $type) {
$lines[0] = substr_replace($lines[0], $typePrefix, 0, $indentLength);
}
if ($padding && $this->isDecorated()) {
array_unshift($lines, '');
$lines[] = '';
}
foreach ($lines as &$line) {
$line = sprintf('%s%s', $prefix, $line);
$line .= str_repeat(' ', $this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line));
if ($style) {
$line = sprintf('<%s>%s</>', $style, $line);
}
}
$this->writeln($lines);
$this->autoPrependBlock();
$this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, true));
$this->newLine();
}
@ -177,11 +134,10 @@ class SymfonyStyle extends OutputStyle
public function comment($message)
{
$messages = is_array($message) ? array_values($message) : array($message);
foreach ($messages as &$message) {
$message = $this->getFormatter()->format($message);
}
$this->block($messages, null, null, ' // ');
$this->autoPrependBlock();
$this->writeln($this->createBlock($messages, null, null, '<fg=default;bg=default> // </>'));
$this->newLine();
}
/**
@ -437,4 +393,50 @@ class SymfonyStyle extends OutputStyle
return substr($value, -4);
}, array_merge(array($this->bufferedOutput->fetch()), (array) $messages));
}
private function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false)
{
$indentLength = 0;
$prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix);
$lines = array();
if (null !== $type) {
$type = sprintf('[%s] ', $type);
$indentLength = strlen($type);
$lineIndentation = str_repeat(' ', $indentLength);
}
// wrap and add newlines for each element
foreach ($messages as $key => $message) {
if ($escape) {
$message = OutputFormatter::escape($message);
}
$lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, PHP_EOL, true)));
if (count($messages) > 1 && $key < count($messages) - 1) {
$lines[] = '';
}
}
foreach ($lines as $i => &$line) {
if (null !== $type) {
$line = 0 === $i ? $type.$line : $lineIndentation.$line;
}
$line = $prefix.$line;
$line .= str_repeat(' ', $this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line));
if ($style) {
$line = sprintf('<%s>%s</>', $style, $line);
}
}
if ($padding && $this->isDecorated()) {
array_unshift($lines, '');
$lines[] = '';
}
return $lines;
}
}

View File

@ -32,7 +32,7 @@ class CommandTester
/**
* Constructor.
*
* @param Command $command A Command instance to test.
* @param Command $command A Command instance to test
*/
public function __construct(Command $command)
{

View File

@ -0,0 +1,15 @@
<?php
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
use Symfony\Component\Console\Style\SymfonyStyle;
// ensure that nested tags have no effect on the color of the '//' prefix
return function (InputInterface $input, OutputInterface $output) {
$output->setDecorated(true);
$output = new SymfonyStyle($input, $output);
$output->comment(
'Lorem ipsum dolor sit <comment>amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</comment> Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum'
);
};

View File

@ -0,0 +1,17 @@
<?php
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
// ensure that block() behaves properly with a prefix and without type
return function (InputInterface $input, OutputInterface $output) {
$output = new SymfonyStyleWithForcedLineLength($input, $output);
$output->block(
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum',
null,
null,
'$ ',
true
);
};

View File

@ -0,0 +1,14 @@
<?php
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
// ensure that block() behaves properly with a type and without prefix
return function (InputInterface $input, OutputInterface $output) {
$output = new SymfonyStyleWithForcedLineLength($input, $output);
$output->block(
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum',
'TEST'
);
};

View File

@ -0,0 +1,7 @@
 // Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et 
 // dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea 
 // commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla 
 // pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
 // id est laborum

View File

@ -0,0 +1,6 @@
$ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
$ aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
$ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
$ occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

View File

@ -0,0 +1,7 @@
[TEST] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
laborum

View File

@ -29,7 +29,7 @@ class CssSelectorConverter
private $translator;
/**
* @param bool $html Whether HTML support should be enabled. Disable it for XML documents.
* @param bool $html Whether HTML support should be enabled. Disable it for XML documents
*/
public function __construct($html = true)
{
@ -53,8 +53,8 @@ class CssSelectorConverter
* Optionally, a prefix can be added to the resulting XPath
* expression with the $prefix parameter.
*
* @param string $cssExpr The CSS expression.
* @param string $prefix An optional prefix for the XPath expression.
* @param string $cssExpr The CSS expression
* @param string $prefix An optional prefix for the XPath expression
*
* @return string
*/

View File

@ -353,7 +353,7 @@ class ErrorHandler
* @param int $line
* @param array $context
*
* @return bool Returns false when no handling happens so that the PHP engine can handle the error itself.
* @return bool Returns false when no handling happens so that the PHP engine can handle the error itself
*
* @throws \ErrorException When $this->thrownErrors requests so
*

View File

@ -84,7 +84,7 @@ class ExceptionHandler
*
* @param string $format The format for links to source files
*
* @return string The previous file link format.
* @return string The previous file link format
*/
public function setFileLinkFormat($format)
{

View File

@ -18,7 +18,7 @@ use Symfony\Component\Debug\Exception\ContextErrorException;
class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase
{
/**
* @var int Error reporting level before running tests.
* @var int Error reporting level before running tests
*/
private $errorReporting;

View File

@ -120,7 +120,7 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface
/**
* Returns a service definition given the full name or an alias.
*
* @param string $id A full id or alias for a service definition.
* @param string $id A full id or alias for a service definition
*
* @return Definition|null The definition related to the supplied id
*/

View File

@ -458,7 +458,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* parameter, the value will still be 'bar' as defined in the ContainerBuilder
* constructor.
*
* @param ContainerBuilder $container The ContainerBuilder instance to merge.
* @param ContainerBuilder $container The ContainerBuilder instance to merge
*
* @throws BadMethodCallException When this ContainerBuilder is frozen
*/
@ -944,7 +944,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
*
* @param string $name The tag name
*
* @return array An array of tags with the tagged service as key, holding a list of attribute arrays.
* @return array An array of tags with the tagged service as key, holding a list of attribute arrays
*/
public function findTaggedServiceIds($name)
{
@ -1000,7 +1000,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
/**
* Returns the Service Conditionals.
*
* @param mixed $value An array of conditionals to return.
* @param mixed $value An array of conditionals to return
*
* @return array An array of Service conditionals
*/

View File

@ -25,7 +25,7 @@ class DefinitionDecorator extends Definition
private $changes = array();
/**
* @param string $parent The id of Definition instance to decorate.
* @param string $parent The id of Definition instance to decorate
*/
public function __construct($parent)
{

View File

@ -571,16 +571,16 @@ class PhpDumper extends Dumper
if ($definition->isSynthetic()) {
$return[] = '@throws RuntimeException always since this service is expected to be injected dynamically';
} elseif ($class = $definition->getClass()) {
$return[] = sprintf('@return %s A %s instance.', 0 === strpos($class, '%') ? 'object' : '\\'.ltrim($class, '\\'), ltrim($class, '\\'));
$return[] = sprintf('@return %s A %s instance', 0 === strpos($class, '%') ? 'object' : '\\'.ltrim($class, '\\'), ltrim($class, '\\'));
} elseif ($definition->getFactory()) {
$factory = $definition->getFactory();
if (is_string($factory)) {
$return[] = sprintf('@return object An instance returned by %s().', $factory);
$return[] = sprintf('@return object An instance returned by %s()', $factory);
} elseif (is_array($factory) && (is_string($factory[0]) || $factory[0] instanceof Definition || $factory[0] instanceof Reference)) {
if (is_string($factory[0]) || $factory[0] instanceof Reference) {
$return[] = sprintf('@return object An instance returned by %s::%s().', (string) $factory[0], $factory[1]);
$return[] = sprintf('@return object An instance returned by %s::%s()', (string) $factory[0], $factory[1]);
} elseif ($factory[0] instanceof Definition) {
$return[] = sprintf('@return object An instance returned by %s::%s().', $factory[0]->getClass(), $factory[1]);
$return[] = sprintf('@return object An instance returned by %s::%s()', $factory[0]->getClass(), $factory[1]);
}
}
}

View File

@ -47,7 +47,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getTestService()
{

View File

@ -51,7 +51,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getTestService()
{

View File

@ -45,7 +45,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getBarService()
{

View File

@ -36,7 +36,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getServiceFromAnonymousFactoryService()
{
@ -49,7 +49,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getServiceWithMethodCallAndFactoryService()
{

View File

@ -34,7 +34,7 @@ class ProjectServiceContainer extends Container
*
* This service is autowired.
*
* @return \Foo A Foo instance.
* @return \Foo A Foo instance
*/
protected function getFooService()
{

View File

@ -61,7 +61,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getBarService()
{
@ -80,7 +80,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Baz A Baz instance.
* @return \Baz A Baz instance
*/
protected function getBazService()
{
@ -97,7 +97,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getConfiguredServiceService()
{
@ -114,7 +114,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getConfiguredServiceSimpleService()
{
@ -131,7 +131,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getDecoratedService()
{
@ -144,7 +144,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getDecoratorServiceService()
{
@ -157,7 +157,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getDecoratorServiceWithNameService()
{
@ -170,7 +170,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*
* @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.
*/
@ -187,7 +187,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar A Bar instance.
* @return \Bar A Bar instance
*/
protected function getFactoryServiceService()
{
@ -200,7 +200,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar A Bar instance.
* @return \Bar A Bar instance
*/
protected function getFactoryServiceSimpleService()
{
@ -213,7 +213,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getFooService()
{
@ -237,7 +237,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return object A %baz_class% instance.
* @return object A %baz_class% instance
*/
protected function getFoo_BazService()
{
@ -251,7 +251,7 @@ class ProjectServiceContainer extends Container
/**
* Gets the 'foo_bar' service.
*
* @return object A %foo_class% instance.
* @return object A %foo_class% instance
*/
protected function getFooBarService()
{
@ -266,7 +266,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Foo A Foo instance.
* @return \Foo A Foo instance
*/
protected function getFooWithInlineService()
{
@ -283,7 +283,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getMethodCall1Service()
{
@ -310,7 +310,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \FooBarBaz A FooBarBaz instance.
* @return \FooBarBaz A FooBarBaz instance
*/
protected function getNewFactoryServiceService()
{
@ -340,7 +340,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getServiceFromStaticMethodService()
{
@ -357,7 +357,7 @@ class ProjectServiceContainer extends Container
* If you want to be able to request this service from the container directly,
* make it public, otherwise you might end up with broken code.
*
* @return \ConfClass A ConfClass instance.
* @return \ConfClass A ConfClass instance
*/
protected function getConfiguratorServiceService()
{
@ -378,7 +378,7 @@ class ProjectServiceContainer extends Container
* If you want to be able to request this service from the container directly,
* make it public, otherwise you might end up with broken code.
*
* @return \ConfClass A ConfClass instance.
* @return \ConfClass A ConfClass instance
*/
protected function getConfiguratorServiceSimpleService()
{
@ -395,7 +395,7 @@ class ProjectServiceContainer extends Container
* If you want to be able to request this service from the container directly,
* make it public, otherwise you might end up with broken code.
*
* @return \SimpleFactoryClass A SimpleFactoryClass instance.
* @return \SimpleFactoryClass A SimpleFactoryClass instance
*/
protected function getFactorySimpleService()
{
@ -412,7 +412,7 @@ class ProjectServiceContainer extends Container
* If you want to be able to request this service from the container directly,
* make it public, otherwise you might end up with broken code.
*
* @return \Bar A Bar instance.
* @return \Bar A Bar instance
*/
protected function getInlinedService()
{
@ -434,7 +434,7 @@ class ProjectServiceContainer extends Container
* If you want to be able to request this service from the container directly,
* make it public, otherwise you might end up with broken code.
*
* @return \FactoryClass A FactoryClass instance.
* @return \FactoryClass A FactoryClass instance
*/
protected function getNewFactoryService()
{

View File

@ -66,7 +66,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getBarService()
{
@ -85,7 +85,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Baz A Baz instance.
* @return \Baz A Baz instance
*/
protected function getBazService()
{
@ -102,7 +102,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getConfiguredServiceService()
{
@ -122,7 +122,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getConfiguredServiceSimpleService()
{
@ -139,7 +139,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getDecoratorServiceService()
{
@ -152,7 +152,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*/
protected function getDecoratorServiceWithNameService()
{
@ -165,7 +165,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \stdClass A stdClass instance.
* @return \stdClass A stdClass instance
*
* @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.
*/
@ -182,7 +182,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar A Bar instance.
* @return \Bar A Bar instance
*/
protected function getFactoryServiceService()
{
@ -195,7 +195,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar A Bar instance.
* @return \Bar A Bar instance
*/
protected function getFactoryServiceSimpleService()
{
@ -208,7 +208,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getFooService()
{
@ -232,7 +232,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \BazClass A BazClass instance.
* @return \BazClass A BazClass instance
*/
protected function getFoo_BazService()
{
@ -246,7 +246,7 @@ class ProjectServiceContainer extends Container
/**
* Gets the 'foo_bar' service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getFooBarService()
{
@ -259,7 +259,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Foo A Foo instance.
* @return \Foo A Foo instance
*/
protected function getFooWithInlineService()
{
@ -281,7 +281,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getMethodCall1Service()
{
@ -302,7 +302,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \FooBarBaz A FooBarBaz instance.
* @return \FooBarBaz A FooBarBaz instance
*/
protected function getNewFactoryServiceService()
{
@ -335,7 +335,7 @@ class ProjectServiceContainer extends Container
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Bar\FooClass A Bar\FooClass instance.
* @return \Bar\FooClass A Bar\FooClass instance
*/
protected function getServiceFromStaticMethodService()
{

View File

@ -337,7 +337,7 @@ class Crawler implements \Countable, \IteratorAggregate
*
* @param int $position The position
*
* @return Crawler A new instance of the Crawler with the selected node, or an empty Crawler if it does not exist.
* @return Crawler A new instance of the Crawler with the selected node, or an empty Crawler if it does not exist
*/
public function eq($position)
{
@ -394,7 +394,7 @@ class Crawler implements \Countable, \IteratorAggregate
*
* @param \Closure $closure An anonymous function
*
* @return Crawler A Crawler instance with the selected nodes.
* @return Crawler A Crawler instance with the selected nodes
*/
public function reduce(\Closure $closure)
{

View File

@ -85,7 +85,7 @@ class Form extends Link implements \ArrayAccess
*
* The returned array does not include file fields (@see getFiles).
*
* @return array An array of field values.
* @return array An array of field values
*/
public function getValues()
{
@ -106,7 +106,7 @@ class Form extends Link implements \ArrayAccess
/**
* Gets the file field values.
*
* @return array An array of file field values.
* @return array An array of file field values
*/
public function getFiles()
{
@ -135,7 +135,7 @@ class Form extends Link implements \ArrayAccess
* This method converts fields with the array notation
* (like foo[bar] to arrays) like PHP does.
*
* @return array An array of field values.
* @return array An array of field values
*/
public function getPhpValues()
{
@ -162,7 +162,7 @@ class Form extends Link implements \ArrayAccess
* For a compound file field foo[bar] it will create foo[bar][name],
* instead of foo[name][bar] which would be found in $_FILES.
*
* @return array An array of file field values.
* @return array An array of file field values
*/
public function getPhpFiles()
{

View File

@ -37,7 +37,7 @@ class Event
*
* @see Event::stopPropagation()
*
* @return bool Whether propagation was already stopped for this event.
* @return bool Whether propagation was already stopped for this event
*/
public function isPropagationStopped()
{

View File

@ -161,9 +161,9 @@ class EventDispatcher implements EventDispatcherInterface
* This method can be overridden to add functionality that is executed
* for each listener.
*
* @param callable[] $listeners The event listeners.
* @param string $eventName The name of the event to dispatch.
* @param Event $event The event object to pass to the event handlers/listeners.
* @param callable[] $listeners The event listeners
* @param string $eventName The name of the event to dispatch
* @param Event $event The event object to pass to the event handlers/listeners
*/
protected function doDispatch($listeners, $eventName, Event $event)
{
@ -178,7 +178,7 @@ class EventDispatcher implements EventDispatcherInterface
/**
* Sorts the internal list of listeners for the given event by priority.
*
* @param string $eventName The name of the event.
* @param string $eventName The name of the event
*/
private function sortListeners($eventName)
{

View File

@ -26,7 +26,7 @@ interface EventDispatcherInterface
* @param string $eventName The name of the event to dispatch. The name of
* the event is the name of the method that is
* invoked on listeners.
* @param Event $event The event to pass to the event handlers/listeners.
* @param Event $event The event to pass to the event handlers/listeners
* If not supplied, an empty Event instance is created.
*
* @return Event
@ -49,7 +49,7 @@ interface EventDispatcherInterface
* The subscriber is asked for all the events he is
* interested in and added as a listener for these events.
*
* @param EventSubscriberInterface $subscriber The subscriber.
* @param EventSubscriberInterface $subscriber The subscriber
*/
public function addSubscriber(EventSubscriberInterface $subscriber);

View File

@ -37,8 +37,8 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Encapsulate an event with $subject and $args.
*
* @param mixed $subject The subject of the event, usually an object.
* @param array $arguments Arguments to store in the event.
* @param mixed $subject The subject of the event, usually an object
* @param array $arguments Arguments to store in the event
*/
public function __construct($subject = null, array $arguments = array())
{
@ -49,7 +49,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Getter for subject property.
*
* @return mixed $subject The observer subject.
* @return mixed $subject The observer subject
*/
public function getSubject()
{
@ -59,9 +59,9 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Get argument by key.
*
* @param string $key Key.
* @param string $key Key
*
* @return mixed Contents of array key.
* @return mixed Contents of array key
*
* @throws \InvalidArgumentException If key is not found.
*/
@ -77,8 +77,8 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Add argument to event.
*
* @param string $key Argument name.
* @param mixed $value Value.
* @param string $key Argument name
* @param mixed $value Value
*
* @return GenericEvent
*/
@ -102,7 +102,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Set args property.
*
* @param array $args Arguments.
* @param array $args Arguments
*
* @return GenericEvent
*/
@ -116,7 +116,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Has argument.
*
* @param string $key Key of arguments array.
* @param string $key Key of arguments array
*
* @return bool
*/
@ -128,7 +128,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* ArrayAccess for argument getter.
*
* @param string $key Array key.
* @param string $key Array key
*
* @return mixed
*
@ -142,8 +142,8 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* ArrayAccess for argument setter.
*
* @param string $key Array key to set.
* @param mixed $value Value.
* @param string $key Array key to set
* @param mixed $value Value
*/
public function offsetSet($key, $value)
{
@ -153,7 +153,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* ArrayAccess for unset argument.
*
* @param string $key Array key.
* @param string $key Array key
*/
public function offsetUnset($key)
{
@ -165,7 +165,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* ArrayAccess has argument.
*
* @param string $key Array key.
* @param string $key Array key
*
* @return bool
*/

View File

@ -28,7 +28,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface
/**
* Creates an unmodifiable proxy for an event dispatcher.
*
* @param EventDispatcherInterface $dispatcher The proxied event dispatcher.
* @param EventDispatcherInterface $dispatcher The proxied event dispatcher
*/
public function __construct(EventDispatcherInterface $dispatcher)
{

View File

@ -21,7 +21,7 @@ interface IOExceptionInterface extends ExceptionInterface
/**
* Returns the associated path for the exception.
*
* @return string The path.
* @return string The path
*/
public function getPath();
}

View File

@ -283,7 +283,7 @@ class Filesystem
/**
* Tells whether a file exists and is readable.
*
* @param string $filename Path to the file.
* @param string $filename Path to the file
*
* @throws IOException When windows path is longer than 258 characters
*/
@ -479,11 +479,11 @@ class Filesystem
/**
* Creates a temporary file with support for custom stream wrappers.
*
* @param string $dir The directory where the temporary filename will be created.
* @param string $prefix The prefix of the generated temporary filename.
* Note: Windows uses only the first three characters of prefix.
* @param string $dir The directory where the temporary filename will be created
* @param string $prefix The prefix of the generated temporary filename
* Note: Windows uses only the first three characters of prefix
*
* @return string The new temporary filename (with path), or throw an exception on failure.
* @return string The new temporary filename (with path), or throw an exception on failure
*/
public function tempnam($dir, $prefix)
{
@ -531,8 +531,8 @@ class Filesystem
/**
* Atomically dumps content into a file.
*
* @param string $filename The file to be written to.
* @param string $content The data to write into the file.
* @param string $filename The file to be written to
* @param string $content The data to write into the file
*
* @throws IOException If the file cannot be written to.
*/
@ -576,7 +576,7 @@ class Filesystem
/**
* Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> array(file, tmp)).
*
* @param string $filename The filename to be parsed.
* @param string $filename The filename to be parsed
*
* @return array The filename scheme and hierarchical part
*/

View File

@ -45,7 +45,7 @@ class PathFilterIterator extends MultiplePcreFilterIterator
*
* Use only / as directory separator (on Windows also).
*
* @param string $str Pattern: regexp or dirname.
* @param string $str Pattern: regexp or dirname
*
* @return string regexp corresponding to a given string or regexp
*/

View File

@ -126,11 +126,11 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface
*
* @see getResourceForBlock()
*
* @param string $cacheKey The cache key of the form view.
* @param FormView $view The form view for finding the applying themes.
* @param string $blockName The name of the block to load.
* @param string $cacheKey The cache key of the form view
* @param FormView $view The form view for finding the applying themes
* @param string $blockName The name of the block to load
*
* @return bool True if the resource could be loaded, false otherwise.
* @return bool True if the resource could be loaded, false otherwise
*/
abstract protected function loadResourceForBlockName($cacheKey, FormView $view, $blockName);
@ -148,7 +148,7 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface
* @param int $hierarchyLevel The level in the block hierarchy that
* should be loaded.
*
* @return bool True if the resource could be loaded, false otherwise.
* @return bool True if the resource could be loaded, false otherwise
*/
private function loadResourceForBlockNameHierarchy($cacheKey, FormView $view, array $blockNameHierarchy, $hierarchyLevel)
{

View File

@ -39,7 +39,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Creates a new button from a form configuration.
*
* @param FormConfigInterface $config The button's configuration.
* @param FormConfigInterface $config The button's configuration
*/
public function __construct(FormConfigInterface $config)
{
@ -51,7 +51,7 @@ class Button implements \IteratorAggregate, FormInterface
*
* @param mixed $offset
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function offsetExists($offset)
{
@ -152,7 +152,7 @@ class Button implements \IteratorAggregate, FormInterface
*
* @param string $name
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function has($name)
{
@ -226,7 +226,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Unsupported method.
*
* @return array Always returns an empty array.
* @return array Always returns an empty array
*/
public function getExtraData()
{
@ -236,7 +236,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Returns the button's configuration.
*
* @return FormConfigInterface The configuration.
* @return FormConfigInterface The configuration
*/
public function getConfig()
{
@ -246,7 +246,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Returns whether the button is submitted.
*
* @return bool true if the button was submitted.
* @return bool true if the button was submitted
*/
public function isSubmitted()
{
@ -256,7 +256,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Returns the name by which the button is identified in forms.
*
* @return string The name of the button.
* @return string The name of the button
*/
public function getName()
{
@ -285,7 +285,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Unsupported method.
*
* @return bool Always returns true.
* @return bool Always returns true
*/
public function isValid()
{
@ -295,7 +295,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function isRequired()
{
@ -317,7 +317,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Unsupported method.
*
* @return bool Always returns true.
* @return bool Always returns true
*/
public function isEmpty()
{
@ -327,7 +327,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Unsupported method.
*
* @return bool Always returns true.
* @return bool Always returns true
*/
public function isSynchronized()
{
@ -366,8 +366,8 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Submits data to the button.
*
* @param null|string $submittedData The data.
* @param bool $clearMissing Not used.
* @param null|string $submittedData The data
* @param bool $clearMissing Not used
*
* @return Button The button instance
*
@ -423,7 +423,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Unsupported method.
*
* @return int Always returns 0.
* @return int Always returns 0
*/
public function count()
{
@ -433,7 +433,7 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Unsupported method.
*
* @return \EmptyIterator Always returns an empty iterator.
* @return \EmptyIterator Always returns an empty iterator
*/
public function getIterator()
{

View File

@ -55,8 +55,8 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Creates a new button builder.
*
* @param string $name The name of the button.
* @param array $options The button's options.
* @param string $name The name of the button
* @param array $options The button's options
*
* @throws InvalidArgumentException If the name is empty.
*/
@ -135,7 +135,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
*
* @param string $name
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function has($name)
{
@ -145,7 +145,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Returns the children.
*
* @return array Always returns an empty array.
* @return array Always returns an empty array
*/
public function all()
{
@ -285,7 +285,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
*
* @param bool $disabled Whether the button is disabled
*
* @return ButtonBuilder The button builder.
* @return ButtonBuilder The button builder
*/
public function setDisabled($disabled)
{
@ -395,9 +395,9 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Sets the type of the button.
*
* @param ResolvedFormTypeInterface $type The type of the button.
* @param ResolvedFormTypeInterface $type The type of the button
*
* @return ButtonBuilder The button builder.
* @return ButtonBuilder The button builder
*/
public function setType(ResolvedFormTypeInterface $type)
{
@ -553,7 +553,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function getMapped()
{
@ -563,7 +563,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function getByReference()
{
@ -573,7 +573,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function getCompound()
{
@ -583,7 +583,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Returns the form type used to construct the button.
*
* @return ResolvedFormTypeInterface The button's type.
* @return ResolvedFormTypeInterface The button's type
*/
public function getType()
{
@ -593,7 +593,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return array Always returns an empty array.
* @return array Always returns an empty array
*/
public function getViewTransformers()
{
@ -603,7 +603,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return array Always returns an empty array.
* @return array Always returns an empty array
*/
public function getModelTransformers()
{
@ -620,7 +620,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function getRequired()
{
@ -630,7 +630,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Returns whether the button is disabled.
*
* @return bool Whether the button is disabled.
* @return bool Whether the button is disabled
*/
public function getDisabled()
{
@ -640,7 +640,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function getErrorBubbling()
{
@ -657,7 +657,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Returns additional attributes of the button.
*
* @return array An array of key-value combinations.
* @return array An array of key-value combinations
*/
public function getAttributes()
{
@ -667,9 +667,9 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Returns whether the attribute with the given name exists.
*
* @param string $name The attribute name.
* @param string $name The attribute name
*
* @return bool Whether the attribute exists.
* @return bool Whether the attribute exists
*/
public function hasAttribute($name)
{
@ -679,10 +679,10 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Returns the value of the given attribute.
*
* @param string $name The attribute name.
* @param mixed $default The value returned if the attribute does not exist.
* @param string $name The attribute name
* @param mixed $default The value returned if the attribute does not exist
*
* @return mixed The attribute value.
* @return mixed The attribute value
*/
public function getAttribute($name, $default = null)
{
@ -706,7 +706,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function getDataLocked()
{
@ -744,7 +744,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function getAutoInitialize()
{
@ -754,7 +754,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false
*/
public function getInheritData()
{
@ -764,7 +764,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Returns all options passed during the construction of the button.
*
* @return array The passed options.
* @return array The passed options
*/
public function getOptions()
{
@ -776,7 +776,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
*
* @param string $name The option name,
*
* @return bool Whether the option exists.
* @return bool Whether the option exists
*/
public function hasOption($name)
{
@ -786,10 +786,10 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Returns the value of a specific option.
*
* @param string $name The option name.
* @param mixed $default The value returned if the option does not exist.
* @param string $name The option name
* @param mixed $default The value returned if the option does not exist
*
* @return mixed The option value.
* @return mixed The option value
*/
public function getOption($name, $default = null)
{
@ -799,7 +799,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return int Always returns 0.
* @return int Always returns 0
*/
public function count()
{
@ -809,7 +809,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/**
* Unsupported method.
*
* @return \EmptyIterator Always returns an empty iterator.
* @return \EmptyIterator Always returns an empty iterator
*/
public function getIterator()
{

View File

@ -212,7 +212,7 @@ class ArrayChoiceList implements ChoiceListInterface
* Checks whether the given choices can be cast to strings without
* generating duplicates.
*
* @param array $choices The choices.
* @param array $choices The choices
* @param array|null $cache The cache for previously checked entries. Internal
*
* @return bool Returns true if the choices can be cast to strings and

View File

@ -35,7 +35,7 @@ class ChoiceGroupView implements \IteratorAggregate
/**
* Creates a new choice group view.
*
* @param string $label The label of the group.
* @param string $label The label of the group
* @param ChoiceGroupView[]|ChoiceView[] $choices The choice views in the
* group.
*/

View File

@ -39,7 +39,7 @@ class ChoiceListView
/**
* Creates a new choice list view.
*
* @param ChoiceGroupView[]|ChoiceView[] $choices The choice views.
* @param ChoiceGroupView[]|ChoiceView[] $choices The choice views
* @param ChoiceGroupView[]|ChoiceView[] $preferredChoices The preferred
* choice views.
*/

View File

@ -21,7 +21,7 @@ interface ClickableInterface
/**
* Returns whether this element was clicked.
*
* @return bool Whether this element was clicked.
* @return bool Whether this element was clicked
*/
public function isClicked();
}

View File

@ -19,8 +19,8 @@ interface DataMapperInterface
/**
* Maps properties of some data to a list of forms.
*
* @param mixed $data Structured data.
* @param FormInterface[] $forms A list of {@link FormInterface} instances.
* @param mixed $data Structured data
* @param FormInterface[] $forms A list of {@link FormInterface} instances
*
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported.
*/
@ -29,8 +29,8 @@ interface DataMapperInterface
/**
* Maps the data of a list of forms into the properties of some data.
*
* @param FormInterface[] $forms A list of {@link FormInterface} instances.
* @param mixed $data Structured data.
* @param FormInterface[] $forms A list of {@link FormInterface} instances
* @param mixed $data Structured data
*
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported.
*/

View File

@ -42,9 +42,9 @@ class BooleanToStringTransformer implements DataTransformerInterface
/**
* Transforms a Boolean into a string.
*
* @param bool $value Boolean value.
* @param bool $value Boolean value
*
* @return string String value.
* @return string String value
*
* @throws TransformationFailedException If the given value is not a Boolean.
*/
@ -64,9 +64,9 @@ class BooleanToStringTransformer implements DataTransformerInterface
/**
* Transforms a string into a Boolean.
*
* @param string $value String value.
* @param string $value String value
*
* @return bool Boolean value.
* @return bool Boolean value
*
* @throws TransformationFailedException If the given value is not a string.
*/

View File

@ -53,7 +53,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
*
* @param \DateTimeInterface $dateTime A DateTimeInterface object
*
* @return array Localized date.
* @return array Localized date
*
* @throws TransformationFailedException If the given value is not a \DateTimeInterface
*/

View File

@ -72,7 +72,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
*
* @param \DateTimeInterface $dateTime A DateTimeInterface object
*
* @return string|array Localized date string/array.
* @return string|array Localized date string/array
*
* @throws TransformationFailedException If the given value is not a \DateTimeInterface
* or if the date could not be transformed.

View File

@ -23,7 +23,7 @@ class DateTimeToRfc3339Transformer extends BaseDateTimeTransformer
*
* @param \DateTimeInterface $dateTime A DateTimeInterface object
*
* @return string The formatted date.
* @return string The formatted date
*
* @throws TransformationFailedException If the given value is not a \DateTimeInterface
*/

View File

@ -22,9 +22,9 @@ class IntegerToLocalizedStringTransformer extends NumberToLocalizedStringTransfo
/**
* Constructs a transformer.
*
* @param int $scale Unused.
* @param bool $grouping Whether thousands should be grouped.
* @param int $roundingMode One of the ROUND_ constants in this class.
* @param int $scale Unused
* @param bool $grouping Whether thousands should be grouped
* @param int $roundingMode One of the ROUND_ constants in this class
*/
public function __construct($scale = 0, $grouping = false, $roundingMode = self::ROUND_DOWN)
{

View File

@ -47,7 +47,7 @@ class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransform
*
* @param int|float $value Normalized number
*
* @return string Localized money string.
* @return string Localized money string
*
* @throws TransformationFailedException If the given value is not numeric or
* if the value can not be transformed.

View File

@ -96,9 +96,9 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
/**
* Transforms a number type into localized number.
*
* @param int|float $value Number value.
* @param int|float $value Number value
*
* @return string Localized value.
* @return string Localized value
*
* @throws TransformationFailedException If the given value is not numeric
* or if the value can not be transformed.
@ -233,9 +233,9 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
/**
* Rounds a number according to the configured scale 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

@ -101,9 +101,9 @@ class PercentToLocalizedStringTransformer implements DataTransformerInterface
/**
* Transforms between a percentage value into a normalized format (integer or float).
*
* @param string $value Percentage value.
* @param string $value Percentage value
*
* @return int|float Normalized value.
* @return int|float Normalized value
*
* @throws TransformationFailedException If the given value is not a string or
* if the value could not be transformed.

View File

@ -353,9 +353,9 @@ class ChoiceType extends AbstractType
/**
* Adds the sub fields for an expanded choice field.
*
* @param FormBuilderInterface $builder The form builder.
* @param array $choiceViews The choice view objects.
* @param array $options The build options.
* @param FormBuilderInterface $builder The form builder
* @param array $choiceViews The choice view objects
* @param array $options The build options
*/
private function addSubForms(FormBuilderInterface $builder, array $choiceViews, array $options)
{

View File

@ -48,11 +48,11 @@ class TemplatingRendererEngine extends AbstractRendererEngine
*
* @see getResourceForBlock()
*
* @param string $cacheKey The cache key of the form view.
* @param FormView $view The form view for finding the applying themes.
* @param string $blockName The name of the block to load.
* @param string $cacheKey The cache key of the form view
* @param FormView $view The form view for finding the applying themes
* @param string $blockName The name of the block to load
*
* @return bool True if the resource could be loaded, false otherwise.
* @return bool True if the resource could be loaded, false otherwise
*/
protected function loadResourceForBlockName($cacheKey, FormView $view, $blockName)
{
@ -106,11 +106,11 @@ class TemplatingRendererEngine extends AbstractRendererEngine
/**
* Tries to load the resource for a block from a theme.
*
* @param string $cacheKey The cache key for storing the resource.
* @param string $blockName The name of the block to load a resource for.
* @param mixed $theme The theme to load the block from.
* @param string $cacheKey The cache key for storing the resource
* @param string $blockName The name of the block to load a resource for
* @param mixed $theme The theme to load the block from
*
* @return bool True if the resource could be loaded, false otherwise.
* @return bool True if the resource could be loaded, false otherwise
*/
protected function loadResourceFromTheme($cacheKey, $blockName, $theme)
{

View File

@ -118,9 +118,9 @@ class FormValidator extends ConstraintValidator
/**
* Returns the validation groups of the given form.
*
* @param FormInterface $form The form.
* @param FormInterface $form The form
*
* @return array The validation groups.
* @return array The validation groups
*/
private static function getValidationGroups(FormInterface $form)
{
@ -155,10 +155,10 @@ class FormValidator extends ConstraintValidator
/**
* Post-processes the validation groups option for a given form.
*
* @param array|callable $groups The validation groups.
* @param FormInterface $form The validated form.
* @param array|callable $groups The validation groups
* @param FormInterface $form The validated form
*
* @return array The validation groups.
* @return array The validation groups
*/
private static function resolveValidationGroups($groups, FormInterface $form)
{

View File

@ -53,6 +53,6 @@ class UploadValidatorExtension extends AbstractTypeExtension
*/
public function getExtendedType()
{
return 'form';
return 'Symfony\Component\Form\Extension\Core\Type\FormType';
}
}

View File

@ -55,9 +55,9 @@ class MappingRule
* If the rule matches, the form mapped by the rule is returned.
* Otherwise this method returns false.
*
* @param string $propertyPath The property path to match against the rule.
* @param string $propertyPath The property path to match against the rule
*
* @return null|FormInterface The mapped form or null.
* @return null|FormInterface The mapped form or null
*/
public function match($propertyPath)
{
@ -69,9 +69,9 @@ class MappingRule
/**
* Matches a property path against a prefix of the rule path.
*
* @param string $propertyPath The property path to match against the rule.
* @param string $propertyPath The property path to match against the rule
*
* @return bool Whether the property path is a prefix of the rule or not.
* @return bool Whether the property path is a prefix of the rule or not
*/
public function isPrefix($propertyPath)
{

View File

@ -141,10 +141,10 @@ class ViolationMapper implements ViolationMapperInterface
* If a matching child is found, it is returned. Otherwise
* null is returned.
*
* @param FormInterface $form The form to search.
* @param PropertyPathIteratorInterface $it The iterator at its current position.
* @param FormInterface $form The form to search
* @param PropertyPathIteratorInterface $it The iterator at its current position
*
* @return null|FormInterface The found match or null.
* @return null|FormInterface The found match or null
*/
private function matchChild(FormInterface $form, PropertyPathIteratorInterface $it)
{
@ -212,10 +212,10 @@ class ViolationMapper implements ViolationMapperInterface
/**
* Reconstructs a property path from a violation path and a form tree.
*
* @param ViolationPath $violationPath The violation path.
* @param FormInterface $origin The root form of the tree.
* @param ViolationPath $violationPath The violation path
* @param FormInterface $origin The root form of the tree
*
* @return RelativePath The reconstructed path.
* @return RelativePath The reconstructed path
*/
private function reconstructPath(ViolationPath $violationPath, FormInterface $origin)
{

View File

@ -23,7 +23,7 @@ interface ViolationMapperInterface
* Maps a constraint violation to a form in the form tree under
* the given form.
*
* @param ConstraintViolation $violation The violation to map.
* @param ConstraintViolation $violation The violation to map
* @param FormInterface $form The root form of the tree
* to map it to.
* @param bool $allowNonSynchronized Whether to allow

View File

@ -206,9 +206,9 @@ class ViolationPath implements \IteratorAggregate, PropertyPathInterface
* In this example, "address" and "office" map to forms, while
* "street does not.
*
* @param int $index The element index.
* @param int $index The element index
*
* @return bool Whether the element maps to a form.
* @return bool Whether the element maps to a form
*
* @throws OutOfBoundsException If the offset is invalid.
*/

View File

@ -161,7 +161,7 @@ class Form implements \IteratorAggregate, FormInterface
/**
* Creates a new form based on the given configuration.
*
* @param FormConfigInterface $config The form configuration.
* @param FormConfigInterface $config The form configuration
*
* @throws LogicException if a data mapper is not provided for a compound form
*/
@ -940,8 +940,8 @@ class Form implements \IteratorAggregate, FormInterface
/**
* Adds a child to the form (implements the \ArrayAccess interface).
*
* @param string $name Ignored. The name of the child is used.
* @param FormInterface $child The child to be added.
* @param string $name Ignored. The name of the child is used
* @param FormInterface $child The child to be added
*
* @throws AlreadySubmittedException If the form has already been submitted.
* @throws LogicException When trying to add a child to a non-compound form.

View File

@ -246,9 +246,9 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB
/**
* Converts an unresolved child into a {@link FormBuilder} instance.
*
* @param string $name The name of the unresolved child.
* @param string $name The name of the unresolved child
*
* @return FormBuilder The created instance.
* @return FormBuilder The created instance
*/
private function resolveChild($name)
{

View File

@ -27,7 +27,7 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
* @param string|null $type
* @param array $options
*
* @return FormBuilderInterface The builder object.
* @return FormBuilderInterface The builder object
*/
public function add($child, $type = null, array $options = array());
@ -38,7 +38,7 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
* @param string|null $type The type of the form or null if name is a property
* @param array $options The options
*
* @return FormBuilderInterface The created builder.
* @return FormBuilderInterface The created builder
*/
public function create($name, $type = null, array $options = array());
@ -58,7 +58,7 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
*
* @param string $name
*
* @return FormBuilderInterface The builder object.
* @return FormBuilderInterface The builder object
*/
public function remove($name);

View File

@ -850,7 +850,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
/**
* Validates whether the given variable is a valid form name.
*
* @param string|int $name The tested form name.
* @param string|int $name The tested form name
*
* @throws UnexpectedTypeException If the name is not a string or an integer.
* @throws InvalidArgumentException If the name contains invalid characters.
@ -879,9 +879,9 @@ class FormConfigBuilder implements FormConfigBuilderInterface
* * contains only letters, digits, numbers, underscores ("_"),
* hyphens ("-") and colons (":")
*
* @param string $name The tested form name.
* @param string $name The tested form name
*
* @return bool Whether the name is valid.
* @return bool Whether the name is valid
*/
public static function isValidName($name)
{

View File

@ -22,22 +22,22 @@ interface FormConfigBuilderInterface extends FormConfigInterface
/**
* Adds an event listener to an event on this form.
*
* @param string $eventName The name of the event to listen to.
* @param callable $listener The listener to execute.
* @param string $eventName The name of the event to listen to
* @param callable $listener The listener to execute
* @param int $priority The priority of the listener. Listeners
* with a higher priority are called before
* listeners with a lower priority.
*
* @return self The configuration object.
* @return self The configuration object
*/
public function addEventListener($eventName, $listener, $priority = 0);
/**
* Adds an event subscriber for events on this form.
*
* @param EventSubscriberInterface $subscriber The subscriber to attach.
* @param EventSubscriberInterface $subscriber The subscriber to attach
*
* @return self The configuration object.
* @return self The configuration object
*/
public function addEventSubscriber(EventSubscriberInterface $subscriber);
@ -52,14 +52,14 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* @param DataTransformerInterface $viewTransformer
* @param bool $forcePrepend if set to true, prepend instead of appending
*
* @return self The configuration object.
* @return self The configuration object
*/
public function addViewTransformer(DataTransformerInterface $viewTransformer, $forcePrepend = false);
/**
* Clears the view transformers.
*
* @return self The configuration object.
* @return self The configuration object
*/
public function resetViewTransformers();
@ -74,14 +74,14 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* @param DataTransformerInterface $modelTransformer
* @param bool $forceAppend if set to true, append instead of prepending
*
* @return self The configuration object.
* @return self The configuration object
*/
public function addModelTransformer(DataTransformerInterface $modelTransformer, $forceAppend = false);
/**
* Clears the normalization transformers.
*
* @return self The configuration object.
* @return self The configuration object
*/
public function resetModelTransformers();
@ -91,16 +91,16 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* @param string $name The name of the attribute
* @param mixed $value The value of the attribute
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setAttribute($name, $value);
/**
* Sets the attributes.
*
* @param array $attributes The attributes.
* @param array $attributes The attributes
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setAttributes(array $attributes);
@ -109,7 +109,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
*
* @param DataMapperInterface $dataMapper
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setDataMapper(DataMapperInterface $dataMapper = null);
@ -118,16 +118,16 @@ interface FormConfigBuilderInterface extends FormConfigInterface
*
* @param bool $disabled Whether the form is disabled
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setDisabled($disabled);
/**
* Sets the data used for the client data when no value is submitted.
*
* @param mixed $emptyData The empty data.
* @param mixed $emptyData The empty data
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setEmptyData($emptyData);
@ -136,7 +136,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
*
* @param bool $errorBubbling
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setErrorBubbling($errorBubbling);
@ -145,7 +145,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
*
* @param bool $required
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setRequired($required);
@ -156,7 +156,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* The property path or null if the path should be set
* automatically based on the form's name.
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setPropertyPath($propertyPath);
@ -164,9 +164,9 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* Sets whether the form should be mapped to an element of its
* parent's data.
*
* @param bool $mapped Whether the form should be mapped.
* @param bool $mapped Whether the form should be mapped
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setMapped($mapped);
@ -176,25 +176,25 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* @param bool $byReference Whether the data should be
* modified by reference.
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setByReference($byReference);
/**
* Sets whether the form should read and write the data of its parent.
*
* @param bool $inheritData Whether the form should inherit its parent's data.
* @param bool $inheritData Whether the form should inherit its parent's data
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setInheritData($inheritData);
/**
* Sets whether the form should be compound.
*
* @param bool $compound Whether the form should be compound.
* @param bool $compound Whether the form should be compound
*
* @return self The configuration object.
* @return self The configuration object
*
* @see FormConfigInterface::getCompound()
*/
@ -203,18 +203,18 @@ interface FormConfigBuilderInterface extends FormConfigInterface
/**
* Set the types.
*
* @param ResolvedFormTypeInterface $type The type of the form.
* @param ResolvedFormTypeInterface $type The type of the form
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setType(ResolvedFormTypeInterface $type);
/**
* Sets the initial data of the form.
*
* @param mixed $data The data of the form in application format.
* @param mixed $data The data of the form in application format
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setData($data);
@ -225,34 +225,34 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* this configuration. The data can only be modified then by
* submitting the form.
*
* @param bool $locked Whether to lock the default data.
* @param bool $locked Whether to lock the default data
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setDataLocked($locked);
/**
* Sets the form factory used for creating new forms.
*
* @param FormFactoryInterface $formFactory The form factory.
* @param FormFactoryInterface $formFactory The form factory
*/
public function setFormFactory(FormFactoryInterface $formFactory);
/**
* Sets the target URL of the form.
*
* @param string $action The target URL of the form.
* @param string $action The target URL of the form
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setAction($action);
/**
* Sets the HTTP method used by the form.
*
* @param string $method The HTTP method of the form.
* @param string $method The HTTP method of the form
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setMethod($method);
@ -261,7 +261,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
*
* @param RequestHandlerInterface $requestHandler
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setRequestHandler(RequestHandlerInterface $requestHandler);
@ -275,7 +275,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* In the second case, you need to call
* {@link FormInterface::initialize()} manually.
*
* @return self The configuration object.
* @return self The configuration object
*/
public function setAutoInitialize($initialize);

Some files were not shown because too many files have changed in this diff Show More