minor #33262 More docblock fixes (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
More docblock fixes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Found while working on #33259
Commits
-------
9b78d53d0d
More docblock fixes
This commit is contained in:
commit
50a3d64729
@ -56,6 +56,8 @@ final class CacheItem implements CacheItemInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function set($value)
|
public function set($value)
|
||||||
{
|
{
|
||||||
@ -66,6 +68,8 @@ final class CacheItem implements CacheItemInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function expiresAt($expiration)
|
public function expiresAt($expiration)
|
||||||
{
|
{
|
||||||
@ -82,6 +86,8 @@ final class CacheItem implements CacheItemInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function expiresAfter($time)
|
public function expiresAfter($time)
|
||||||
{
|
{
|
||||||
@ -103,7 +109,7 @@ final class CacheItem implements CacheItemInterface
|
|||||||
*
|
*
|
||||||
* @param string|string[] $tags A tag or array of tags
|
* @param string|string[] $tags A tag or array of tags
|
||||||
*
|
*
|
||||||
* @return static
|
* @return $this
|
||||||
*
|
*
|
||||||
* @throws InvalidArgumentException When $tag is not valid
|
* @throws InvalidArgumentException When $tag is not valid
|
||||||
*/
|
*/
|
||||||
|
@ -121,8 +121,10 @@ class FormFieldRegistry
|
|||||||
if ((!\is_array($value) && $target instanceof Field\FormField) || $target instanceof Field\ChoiceFormField) {
|
if ((!\is_array($value) && $target instanceof Field\FormField) || $target instanceof Field\ChoiceFormField) {
|
||||||
$target->setValue($value);
|
$target->setValue($value);
|
||||||
} elseif (\is_array($value)) {
|
} elseif (\is_array($value)) {
|
||||||
$fields = self::create($name, $value);
|
$registry = new static();
|
||||||
foreach ($fields->all() as $k => $v) {
|
$registry->base = $name;
|
||||||
|
$registry->fields = $value;
|
||||||
|
foreach ($registry->all() as $k => $v) {
|
||||||
$this->set($k, $v);
|
$this->set($k, $v);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -140,26 +142,6 @@ class FormFieldRegistry
|
|||||||
return $this->walk($this->fields, $this->base);
|
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.
|
* Transforms a PHP array in a list of fully qualified name / value.
|
||||||
*
|
*
|
||||||
|
@ -34,7 +34,7 @@ interface DenormalizerInterface
|
|||||||
* @param string $format Format the given data was extracted from
|
* @param string $format Format the given data was extracted from
|
||||||
* @param array $context Options available to the denormalizer
|
* @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 BadMethodCallException Occurs when the normalizer is not called in an expected context
|
||||||
* @throws InvalidArgumentException Occurs when the arguments are not coherent or not supported
|
* @throws InvalidArgumentException Occurs when the arguments are not coherent or not supported
|
||||||
|
Reference in New Issue
Block a user