Skip to content

Commit af6cf31

Browse files
Merge branch '4.3' into 4.4
* 4.3: More docblock fixes fix test
2 parents b795464 + 7a0787c commit af6cf31

File tree

3 files changed

+8
-25
lines changed

3 files changed

+8
-25
lines changed

src/Symfony/Component/Cache/CacheItem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function isHit()
6565
/**
6666
* {@inheritdoc}
6767
*
68-
* @return static
68+
* @return $this
6969
*/
7070
public function set($value)
7171
{
@@ -77,7 +77,7 @@ public function set($value)
7777
/**
7878
* {@inheritdoc}
7979
*
80-
* @return static
80+
* @return $this
8181
*/
8282
public function expiresAt($expiration)
8383
{
@@ -95,7 +95,7 @@ public function expiresAt($expiration)
9595
/**
9696
* {@inheritdoc}
9797
*
98-
* @return static
98+
* @return $this
9999
*/
100100
public function expiresAfter($time)
101101
{

src/Symfony/Component/DomCrawler/FormFieldRegistry.php

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ public function set(string $name, $value)
114114
if ((!\is_array($value) && $target instanceof Field\FormField) || $target instanceof Field\ChoiceFormField) {
115115
$target->setValue($value);
116116
} elseif (\is_array($value)) {
117-
$fields = self::create($name, $value);
118-
foreach ($fields->all() as $k => $v) {
117+
$registry = new static();
118+
$registry->base = $name;
119+
$registry->fields = $value;
120+
foreach ($registry->all() as $k => $v) {
119121
$this->set($k, $v);
120122
}
121123
} else {
@@ -133,25 +135,6 @@ public function all(): array
133135
return $this->walk($this->fields, $this->base);
134136
}
135137

136-
/**
137-
* Creates an instance of the class.
138-
*
139-
* This function is made private because it allows overriding the $base and
140-
* the $values properties without any type checking.
141-
*
142-
* @param array $values The values of the fields
143-
*
144-
* @return static
145-
*/
146-
private static function create(string $base, array $values)
147-
{
148-
$registry = new static();
149-
$registry->base = $base;
150-
$registry->fields = $values;
151-
152-
return $registry;
153-
}
154-
155138
/**
156139
* Transforms a PHP array in a list of fully qualified name / value.
157140
*/

src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface DenormalizerInterface
3434
* @param string $format Format the given data was extracted from
3535
* @param array $context Options available to the denormalizer
3636
*
37-
* @return object
37+
* @return object|array
3838
*
3939
* @throws BadMethodCallException Occurs when the normalizer is not called in an expected context
4040
* @throws InvalidArgumentException Occurs when the arguments are not coherent or not supported

0 commit comments

Comments
 (0)