From 5dbcdc6ff4ef35b9b1d83ab4a9e41baf1caafe30 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Thu, 8 Aug 2019 16:01:55 +0200 Subject: [PATCH] cleanup remaining param and internal Intl FulLTransformer --- .../Console/Descriptor/Descriptor.php | 2 - .../Bundle/FrameworkBundle/Routing/Router.php | 1 - .../Templating/Helper/ActionsHelper.php | 3 +- .../Translation/Translator.php | 4 -- .../Component/Cache/Traits/MemcachedTrait.php | 1 - .../Descriptor/DescriptorInterface.php | 1 - .../Formatter/OutputFormatterStyle.php | 1 - .../Console/Helper/DescriptorHelper.php | 1 - .../Dumper/DumperInterface.php | 2 - .../Core/EventListener/ResizeFormListener.php | 2 - .../Component/Form/Tests/AbstractFormTest.php | 32 +++-------- .../Component/Form/Tests/CompoundFormTest.php | 5 +- .../Component/Form/Tests/SimpleFormTest.php | 3 +- .../Handler/MemcachedSessionHandler.php | 1 - .../Storage/Handler/MongoDbSessionHandler.php | 3 - .../Storage/Handler/PdoSessionHandler.php | 1 - .../Storage/Handler/RedisSessionHandler.php | 1 - .../Session/Storage/NativeSessionStorage.php | 1 - .../HttpKernel/Fragment/FragmentHandler.php | 1 - .../Fragment/FragmentRendererInterface.php | 3 +- .../DateFormat/FullTransformer.php | 55 +++---------------- .../DateFormatter/DateFormat/Transformer.php | 1 - .../Component/Process/Tests/ProcessTest.php | 10 +--- .../Dumper/GeneratorDumperInterface.php | 2 - .../Matcher/Dumper/MatcherDumperInterface.php | 2 - src/Symfony/Component/Routing/Route.php | 4 +- .../Component/Routing/RouteCollection.php | 2 - src/Symfony/Component/Routing/Router.php | 3 - .../Workflow/Dumper/DumperInterface.php | 2 - 29 files changed, 27 insertions(+), 123 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index 48fc4f009828..4ab423d064d1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -132,7 +132,6 @@ abstract protected function describeContainerTags(ContainerBuilder $builder, arr * * name: name of described service * * @param Definition|Alias|object $service - * @param array $options */ abstract protected function describeContainerService($service, array $options = [], ContainerBuilder $builder = null); @@ -176,7 +175,6 @@ abstract protected function describeEventDispatcherListeners(EventDispatcherInte * Describes a callable. * * @param callable $callable - * @param array $options */ abstract protected function describeCallable($callable, array $options = []); diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php index a402d64ab063..83f6602b98a8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php @@ -37,7 +37,6 @@ class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberI /** * @param mixed $resource The main resource to load - * @param array $options An array of options */ public function __construct(ContainerInterface $container, $resource, array $options = [], RequestContext $context = null, ContainerInterface $parameters = null, LoggerInterface $logger = null, string $defaultLocale = null) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php index 8a054162fb81..a6eb19fd0f10 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php @@ -36,8 +36,7 @@ public function __construct(FragmentHandler $handler) /** * Returns the fragment content for a given URI. * - * @param string $uri A URI - * @param array $options An array of options + * @param string $uri * * @return string The fragment content * diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php index bfee2776f523..dd6a213b597a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php @@ -65,10 +65,6 @@ class Translator extends BaseTranslator implements WarmableInterface * * debug: Whether to enable debugging or not (false by default) * * resource_files: List of translation resources available grouped by locale. * - * @param string $defaultLocale - * @param array $loaderIds An array of loader Ids - * @param array $options An array of options - * * @throws InvalidArgumentException */ public function __construct(ContainerInterface $container, MessageFormatterInterface $formatter, string $defaultLocale, array $loaderIds = [], array $options = []) diff --git a/src/Symfony/Component/Cache/Traits/MemcachedTrait.php b/src/Symfony/Component/Cache/Traits/MemcachedTrait.php index 620668a25044..df0915e92557 100644 --- a/src/Symfony/Component/Cache/Traits/MemcachedTrait.php +++ b/src/Symfony/Component/Cache/Traits/MemcachedTrait.php @@ -71,7 +71,6 @@ private function init(\Memcached $client, string $namespace, int $defaultLifetim * - [['localhost', 11211, 33]] * * @param array[]|string|string[] $servers An array of servers, a DSN, or an array of DSNs - * @param array $options An array of options * * @return \Memcached * diff --git a/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php b/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php index 871093851c2b..e3184a6a5a20 100644 --- a/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php +++ b/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php @@ -24,7 +24,6 @@ interface DescriptorInterface * Describes an object if supported. * * @param object $object - * @param array $options */ public function describe(OutputInterface $output, $object, array $options = []); } diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php index 204b46fbb897..16994202ef8d 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -61,7 +61,6 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface * * @param string|null $foreground The style foreground color name * @param string|null $background The style background color name - * @param array $options The style options */ public function __construct(string $foreground = null, string $background = null, array $options = []) { diff --git a/src/Symfony/Component/Console/Helper/DescriptorHelper.php b/src/Symfony/Component/Console/Helper/DescriptorHelper.php index 8859eb131842..3055baefd432 100644 --- a/src/Symfony/Component/Console/Helper/DescriptorHelper.php +++ b/src/Symfony/Component/Console/Helper/DescriptorHelper.php @@ -49,7 +49,6 @@ public function __construct() * * raw_text: boolean, sets output type as raw * * @param object $object - * @param array $options * * @throws InvalidArgumentException when the given format is not supported */ diff --git a/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php b/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php index 1ea775ddfe03..e8c3e4898e20 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php @@ -21,8 +21,6 @@ interface DumperInterface /** * Dumps the service container. * - * @param array $options An array of options - * * @return string The representation of the service container */ public function dump(array $options = []); diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php index 695336e9548a..d978117552d9 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php @@ -32,8 +32,6 @@ class ResizeFormListener implements EventSubscriberInterface private $deleteEmpty; /** - * @param string $type - * @param array $options * @param bool $allowAdd Whether children could be added to the group * @param bool $allowDelete Whether children could be removed from the group * @param bool|callable $deleteEmpty diff --git a/src/Symfony/Component/Form/Tests/AbstractFormTest.php b/src/Symfony/Component/Form/Tests/AbstractFormTest.php index f6ba7c7bb16c..5dc1ad231159 100644 --- a/src/Symfony/Component/Form/Tests/AbstractFormTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractFormTest.php @@ -16,6 +16,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormInterface; abstract class AbstractFormTest extends TestCase { @@ -30,7 +31,7 @@ abstract class AbstractFormTest extends TestCase protected $factory; /** - * @var \Symfony\Component\Form\FormInterface + * @var FormInterface */ protected $form; @@ -48,43 +49,24 @@ protected function tearDown(): void $this->form = null; } - /** - * @return \Symfony\Component\Form\FormInterface - */ - abstract protected function createForm(); + abstract protected function createForm(): FormInterface; - /** - * @param string $name - * @param string|null $dataClass - * @param array $options - * - * @return FormBuilder - */ - protected function getBuilder($name = 'name', EventDispatcherInterface $dispatcher = null, $dataClass = null, array $options = []) + protected function getBuilder(?string $name = 'name', EventDispatcherInterface $dispatcher = null, string $dataClass = null, array $options = []): FormBuilder { return new FormBuilder($name, $dataClass, $dispatcher ?: $this->dispatcher, $this->factory, $options); } - /** - * @return MockObject - */ - protected function getDataMapper() + protected function getDataMapper(): MockObject { return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); } - /** - * @return MockObject - */ - protected function getDataTransformer() + protected function getDataTransformer(): MockObject { return $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); } - /** - * @return MockObject - */ - protected function getFormValidator() + protected function getFormValidator(): MockObject { return $this->getMockBuilder('Symfony\Component\Form\FormValidatorInterface')->getMock(); } diff --git a/src/Symfony/Component/Form/Tests/CompoundFormTest.php b/src/Symfony/Component/Form/Tests/CompoundFormTest.php index 595533ec8008..0a97f6408c3a 100644 --- a/src/Symfony/Component/Form/Tests/CompoundFormTest.php +++ b/src/Symfony/Component/Form/Tests/CompoundFormTest.php @@ -17,6 +17,7 @@ use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; +use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\Forms; use Symfony\Component\Form\FormView; use Symfony\Component\Form\SubmitButtonBuilder; @@ -190,7 +191,7 @@ public function testAddUsingNameAndType() public function testAddUsingIntegerNameAndType() { - $child = $this->getBuilder(0)->getForm(); + $child = $this->getBuilder('0')->getForm(); $this->factory->expects($this->once()) ->method('createNamed') @@ -1123,7 +1124,7 @@ public function testFileUpload() $this->assertNull($this->form->get('bar')->getData()); } - protected function createForm($name = 'name', $compound = true) + protected function createForm(string $name = 'name', bool $compound = true): FormInterface { $builder = $this->getBuilder($name); diff --git a/src/Symfony/Component/Form/Tests/SimpleFormTest.php b/src/Symfony/Component/Form/Tests/SimpleFormTest.php index f74c66ff3a67..33f815891b3f 100644 --- a/src/Symfony/Component/Form/Tests/SimpleFormTest.php +++ b/src/Symfony/Component/Form/Tests/SimpleFormTest.php @@ -18,6 +18,7 @@ use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; +use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\Tests\Fixtures\FixedDataTransformer; use Symfony\Component\Form\Tests\Fixtures\FixedFilterListener; use Symfony\Component\PropertyAccess\PropertyPath; @@ -1096,7 +1097,7 @@ public function testCannotCallGetViewDataInPreSetDataListener() $form->setData('foo'); } - protected function createForm() + protected function createForm(): FormInterface { return $this->getBuilder()->getForm(); } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php index 1db590b36078..bcaeef978340 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -41,7 +41,6 @@ class MemcachedSessionHandler extends AbstractSessionHandler * * expiretime: The time to live in seconds. * * @param \Memcached $memcached A \Memcached instance - * @param array $options An associative array of Memcached options * * @throws \InvalidArgumentException When unsupported options are passed */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index 536c2840e514..fd8f05a2224f 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -61,9 +61,6 @@ class MongoDbSessionHandler extends AbstractSessionHandler * If you use such an index, you can drop `gc_probability` to 0 since * no garbage-collection is required. * - * @param \MongoDB\Client $mongo A MongoDB\Client instance - * @param array $options An associative array of field options - * * @throws \InvalidArgumentException When "database" or "collection" not provided */ public function __construct(\MongoDB\Client $mongo, array $options) diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 5c8eb5f5f9da..4e044c69beb3 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -165,7 +165,6 @@ class PdoSessionHandler extends AbstractSessionHandler * * lock_mode: The strategy for locking, see constants [default: LOCK_TRANSACTIONAL] * * @param \PDO|string|null $pdoOrDsn A \PDO instance or DSN string or URL string or null - * @param array $options An associative array of options * * @throws \InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php index a6498b882c0b..c2e7d34dcfe0 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php @@ -35,7 +35,6 @@ class RedisSessionHandler extends AbstractSessionHandler * * prefix: The prefix to use for the keys in order to avoid collision on the Redis server. * * @param \Redis|\RedisArray|\RedisCluster|\Predis\Client|RedisProxy $redis - * @param array $options An associative array of options * * @throws \InvalidArgumentException When unsupported client or options are passed */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index 297b114a0947..98b3199e9cea 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -97,7 +97,6 @@ class NativeSessionStorage implements SessionStorageInterface * trans_sid_hosts, $_SERVER['HTTP_HOST'] * trans_sid_tags, "a=href,area=href,frame=src,form=" * - * @param array $options Session configuration options * @param \SessionHandlerInterface|null $handler */ public function __construct(array $options = [], $handler = null, MetadataBag $metaBag = null) diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php index 46a2a116d9a7..5c664ed75b6d 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -62,7 +62,6 @@ public function addRenderer(FragmentRendererInterface $renderer) * * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance * @param string $renderer The renderer name - * @param array $options An array of options * * @return string|null The Response content or null when the Response is streamed * diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php index 00ad3c3f86b5..4f8ac50b16e9 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php @@ -25,8 +25,7 @@ interface FragmentRendererInterface /** * Renders a URI and returns the Response content. * - * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance - * @param array $options An array of options + * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance * * @return Response A Response instance */ diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php index 80c03862cd8b..7ec82461d61e 100644 --- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php +++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php @@ -69,21 +69,9 @@ public function __construct(string $pattern, string $timezone) ]; } - /** - * Return the array of Transformer objects. - * - * @return Transformer[] Associative array of Transformer objects (format char => Transformer) - */ - public function getTransformers() - { - return $this->transformers; - } - /** * Format a DateTime using ICU dateformat pattern. * - * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value - * * @return string The formatted value */ public function format(\DateTime $dateTime) @@ -98,14 +86,9 @@ public function format(\DateTime $dateTime) /** * Return the formatted ICU value for the matched date characters. * - * @param string $dateChars The date characters to be replaced with a formatted ICU value - * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value - * - * @return string The formatted value - * * @throws NotImplementedException When it encounters a not implemented date character */ - public function formatReplace($dateChars, $dateTime) + private function formatReplace(string $dateChars, \DateTime $dateTime): string { $length = \strlen($dateChars); @@ -167,12 +150,10 @@ public function parse(\DateTime $dateTime, $value) /** * Retrieve a regular expression to match with a formatted value. * - * @param string $pattern The pattern to create the reverse matching regular expression - * * @return string The reverse matching regular expression with named captures being formed by the * transformer index in the $transformer array */ - public function getReverseMatchingRegExp($pattern) + private function getReverseMatchingRegExp(string $pattern): string { $escapedPattern = preg_quote($pattern, '/'); @@ -189,9 +170,8 @@ public function getReverseMatchingRegExp($pattern) return $this->replaceQuoteMatch($dateChars); } - $transformers = $this->getTransformers(); - if (isset($transformers[$transformerIndex])) { - $transformer = $transformers[$transformerIndex]; + if (isset($this->transformers[$transformerIndex])) { + $transformer = $this->transformers[$transformerIndex]; $captureName = str_repeat($transformerIndex, $length); return "(?P<$captureName>".$transformer->getReverseMatchingRegExp($length).')'; @@ -203,24 +183,16 @@ public function getReverseMatchingRegExp($pattern) /** * Check if the first char of a string is a single quote. - * - * @param string $quoteMatch The string to check - * - * @return bool true if matches, false otherwise */ - public function isQuoteMatch($quoteMatch) + private function isQuoteMatch(string $quoteMatch): bool { return "'" === $quoteMatch[0]; } /** * Replaces single quotes at the start or end of a string with two single quotes. - * - * @param string $quoteMatch The string to replace the quotes - * - * @return string A string with the single quotes replaced */ - public function replaceQuoteMatch($quoteMatch) + private function replaceQuoteMatch(string $quoteMatch): string { if (preg_match("/^'+$/", $quoteMatch)) { return str_replace("''", "'", $quoteMatch); @@ -231,12 +203,8 @@ public function replaceQuoteMatch($quoteMatch) /** * Builds a chars match regular expression. - * - * @param string $specialChars A string of chars to build the regular expression - * - * @return string The chars match regular expression */ - protected function buildCharsMatch($specialChars) + private function buildCharsMatch(string $specialChars): string { $specialCharsArray = str_split($specialChars); @@ -250,10 +218,8 @@ protected function buildCharsMatch($specialChars) /** * Normalize a preg_replace match array, removing the numeric keys and returning an associative array * with the value and pattern values for the matched Transformer. - * - * @return array */ - protected function normalizeArray(array $data) + private function normalizeArray(array $data): array { $ret = []; @@ -275,12 +241,9 @@ protected function normalizeArray(array $data) * Calculates the Unix timestamp based on the matched values by the reverse matching regular * expression of parse(). * - * @param \DateTime $dateTime The DateTime object to be used to calculate the timestamp - * @param array $options An array with the matched values to be used to calculate the timestamp - * * @return bool|int The calculated timestamp or false if matched date is invalid */ - protected function calculateUnixTimestamp(\DateTime $dateTime, array $options) + private function calculateUnixTimestamp(\DateTime $dateTime, array $options) { $options = $this->getDefaultValueForOptions($options); diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php index 5bdb7267afd9..1a9a3eff3fee 100644 --- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php +++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php @@ -23,7 +23,6 @@ abstract class Transformer /** * Format a value using a configured DateTime as date/time source. * - * * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value * @param int $length The formatted value string length * diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 5d86bc5e8b0e..d5b325a97a07 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -1520,14 +1520,8 @@ public function testWaitStoppedDeadProcess() } /** - * @param string $commandline - * @param string|null $cwd - * @param array|null $env - * @param string|null $input - * @param int $timeout - * @param array $options - * - * @return Process + * @param string|array $commandline + * @param mixed $input */ private function getProcess($commandline, string $cwd = null, array $env = null, $input = null, ?int $timeout = 60): Process { diff --git a/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php b/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php index 096519aa1a72..26daefc63c7f 100644 --- a/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php +++ b/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php @@ -24,8 +24,6 @@ interface GeneratorDumperInterface * Dumps a set of routes to a string representation of executable code * that can then be used to generate a URL of such a route. * - * @param array $options An array of options - * * @return string Executable code */ public function dump(array $options = []); diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php b/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php index 2a25293aa3e5..34aad9274133 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php @@ -24,8 +24,6 @@ interface MatcherDumperInterface * Dumps a set of routes to a string representation of executable code * that can then be used to match a request against these routes. * - * @param array $options An array of options - * * @return string Executable code */ public function dump(array $options = []); diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index 51785fda9d98..b402665b9220 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -45,10 +45,10 @@ class Route implements \Serializable * @param array $defaults An array of default parameter values * @param array $requirements An array of requirements for parameters (regexes) * @param array $options An array of options - * @param string $host The host pattern to match + * @param string|null $host The host pattern to match * @param string|string[] $schemes A required URI scheme or an array of restricted schemes * @param string|string[] $methods A required HTTP method or an array of restricted methods - * @param string $condition A condition that should evaluate to true for the route to match + * @param string|null $condition A condition that should evaluate to true for the route to match */ public function __construct(string $path, array $defaults = [], array $requirements = [], array $options = [], ?string $host = '', $schemes = [], $methods = [], ?string $condition = '') { diff --git a/src/Symfony/Component/Routing/RouteCollection.php b/src/Symfony/Component/Routing/RouteCollection.php index 54ccad805d78..b52c6832fe05 100644 --- a/src/Symfony/Component/Routing/RouteCollection.php +++ b/src/Symfony/Component/Routing/RouteCollection.php @@ -239,8 +239,6 @@ public function addRequirements(array $requirements) * Adds options to all routes. * * An existing option value under the same name in a route will be overridden. - * - * @param array $options An array of options */ public function addOptions(array $options) { diff --git a/src/Symfony/Component/Routing/Router.php b/src/Symfony/Component/Routing/Router.php index 72f59954014a..47df4210c303 100644 --- a/src/Symfony/Component/Routing/Router.php +++ b/src/Symfony/Component/Routing/Router.php @@ -97,7 +97,6 @@ class Router implements RouterInterface, RequestMatcherInterface /** * @param mixed $resource The main resource to load - * @param array $options An array of options */ public function __construct(LoaderInterface $loader, $resource, array $options = [], RequestContext $context = null, LoggerInterface $logger = null, string $defaultLocale = null) { @@ -124,8 +123,6 @@ public function __construct(LoaderInterface $loader, $resource, array $options = * * strict_requirements: Configure strict requirement checking for generators * implementing ConfigurableRequirementsInterface (default is true) * - * @param array $options An array of options - * * @throws \InvalidArgumentException When unsupported option is provided */ public function setOptions(array $options) diff --git a/src/Symfony/Component/Workflow/Dumper/DumperInterface.php b/src/Symfony/Component/Workflow/Dumper/DumperInterface.php index ebed0743fcdd..e1d8c7d682b3 100644 --- a/src/Symfony/Component/Workflow/Dumper/DumperInterface.php +++ b/src/Symfony/Component/Workflow/Dumper/DumperInterface.php @@ -25,8 +25,6 @@ interface DumperInterface /** * Dumps a workflow definition. * - * @param array $options An array of options - * * @return string The representation of the workflow */ public function dump(Definition $definition, Marking $marking = null, array $options = []);