From 9b78d53d0d61304e88a6e41cb5f268b0b24df322 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 20 Aug 2019 22:53:36 +0200 Subject: [PATCH] More docblock fixes --- src/Symfony/Component/Cache/CacheItem.php | 8 +++++- .../DomCrawler/FormFieldRegistry.php | 26 +++---------------- .../Normalizer/DenormalizerInterface.php | 2 +- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/src/Symfony/Component/Cache/CacheItem.php b/src/Symfony/Component/Cache/CacheItem.php index 4ab5d1a26420f..d7edb7f80aca0 100644 --- a/src/Symfony/Component/Cache/CacheItem.php +++ b/src/Symfony/Component/Cache/CacheItem.php @@ -56,6 +56,8 @@ public function isHit() /** * {@inheritdoc} + * + * @return $this */ public function set($value) { @@ -66,6 +68,8 @@ public function set($value) /** * {@inheritdoc} + * + * @return $this */ public function expiresAt($expiration) { @@ -82,6 +86,8 @@ public function expiresAt($expiration) /** * {@inheritdoc} + * + * @return $this */ public function expiresAfter($time) { @@ -103,7 +109,7 @@ public function expiresAfter($time) * * @param string|string[] $tags A tag or array of tags * - * @return static + * @return $this * * @throws InvalidArgumentException When $tag is not valid */ diff --git a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php index bd73742af7437..901a5c8dec1cd 100644 --- a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php +++ b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php @@ -121,8 +121,10 @@ public function set($name, $value) if ((!\is_array($value) && $target instanceof Field\FormField) || $target instanceof Field\ChoiceFormField) { $target->setValue($value); } elseif (\is_array($value)) { - $fields = self::create($name, $value); - foreach ($fields->all() as $k => $v) { + $registry = new static(); + $registry->base = $name; + $registry->fields = $value; + foreach ($registry->all() as $k => $v) { $this->set($k, $v); } } else { @@ -140,26 +142,6 @@ public function all() return $this->walk($this->fields, $this->base); } - /** - * Creates an instance of the class. - * - * This function is made private because it allows overriding the $base and - * the $values properties without any type checking. - * - * @param string $base The fully qualified name of the base field - * @param array $values The values of the fields - * - * @return static - */ - private static function create($base, array $values) - { - $registry = new static(); - $registry->base = $base; - $registry->fields = $values; - - return $registry; - } - /** * Transforms a PHP array in a list of fully qualified name / value. * diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php index cdd6685d84ac6..8e48788828cd9 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php @@ -34,7 +34,7 @@ interface DenormalizerInterface * @param string $format Format the given data was extracted from * @param array $context Options available to the denormalizer * - * @return object + * @return object|array * * @throws BadMethodCallException Occurs when the normalizer is not called in an expected context * @throws InvalidArgumentException Occurs when the arguments are not coherent or not supported pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy