Skip to content

Commit 9b78d53

Browse files
More docblock fixes
1 parent 9672f4c commit 9b78d53

File tree

3 files changed

+12
-24
lines changed

3 files changed

+12
-24
lines changed

src/Symfony/Component/Cache/CacheItem.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public function isHit()
5656

5757
/**
5858
* {@inheritdoc}
59+
*
60+
* @return $this
5961
*/
6062
public function set($value)
6163
{
@@ -66,6 +68,8 @@ public function set($value)
6668

6769
/**
6870
* {@inheritdoc}
71+
*
72+
* @return $this
6973
*/
7074
public function expiresAt($expiration)
7175
{
@@ -82,6 +86,8 @@ public function expiresAt($expiration)
8286

8387
/**
8488
* {@inheritdoc}
89+
*
90+
* @return $this
8591
*/
8692
public function expiresAfter($time)
8793
{
@@ -103,7 +109,7 @@ public function expiresAfter($time)
103109
*
104110
* @param string|string[] $tags A tag or array of tags
105111
*
106-
* @return static
112+
* @return $this
107113
*
108114
* @throws InvalidArgumentException When $tag is not valid
109115
*/

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)