Merge branch '4.3' into 4.4
* 4.3: More docblock fixes fix test
This commit is contained in:
commit
af6cf3140d
@ -65,7 +65,7 @@ final class CacheItem implements ItemInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return static
|
||||
* @return $this
|
||||
*/
|
||||
public function set($value)
|
||||
{
|
||||
@ -77,7 +77,7 @@ final class CacheItem implements ItemInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return static
|
||||
* @return $this
|
||||
*/
|
||||
public function expiresAt($expiration)
|
||||
{
|
||||
@ -95,7 +95,7 @@ final class CacheItem implements ItemInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return static
|
||||
* @return $this
|
||||
*/
|
||||
public function expiresAfter($time)
|
||||
{
|
||||
|
@ -114,8 +114,10 @@ class FormFieldRegistry
|
||||
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 {
|
||||
@ -133,25 +135,6 @@ class FormFieldRegistry
|
||||
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 array $values The values of the fields
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
private static function create(string $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.
|
||||
*/
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user