Skip to content

Commit 7a0787c

Browse files
Merge branch '3.4' into 4.3
* 3.4: More docblock fixes
2 parents 4bffa04 + 50a3d64 commit 7a0787c

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

src/Symfony/Component/Cache/CacheItem.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public function isHit()
6060

6161
/**
6262
* {@inheritdoc}
63+
*
64+
* @return $this
6365
*/
6466
public function set($value)
6567
{
@@ -70,6 +72,8 @@ public function set($value)
7072

7173
/**
7274
* {@inheritdoc}
75+
*
76+
* @return $this
7377
*/
7478
public function expiresAt($expiration)
7579
{
@@ -86,6 +90,8 @@ public function expiresAt($expiration)
8690

8791
/**
8892
* {@inheritdoc}
93+
*
94+
* @return $this
8995
*/
9096
public function expiresAfter($time)
9197
{

src/Symfony/Component/DomCrawler/FormFieldRegistry.php

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ public function set($name, $value)
121121
if ((!\is_array($value) && $target instanceof Field\FormField) || $target instanceof Field\ChoiceFormField) {
122122
$target->setValue($value);
123123
} elseif (\is_array($value)) {
124-
$fields = self::create($name, $value);
125-
foreach ($fields->all() as $k => $v) {
124+
$registry = new static();
125+
$registry->base = $name;
126+
$registry->fields = $value;
127+
foreach ($registry->all() as $k => $v) {
126128
$this->set($k, $v);
127129
}
128130
} else {
@@ -140,26 +142,6 @@ public function all()
140142
return $this->walk($this->fields, $this->base);
141143
}
142144

143-
/**
144-
* Creates an instance of the class.
145-
*
146-
* This function is made private because it allows overriding the $base and
147-
* the $values properties without any type checking.
148-
*
149-
* @param string $base The fully qualified name of the base field
150-
* @param array $values The values of the fields
151-
*
152-
* @return static
153-
*/
154-
private static function create($base, array $values)
155-
{
156-
$registry = new static();
157-
$registry->base = $base;
158-
$registry->fields = $values;
159-
160-
return $registry;
161-
}
162-
163145
/**
164146
* Transforms a PHP array in a list of fully qualified name / value.
165147
*

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)