8000 More docblock fixes by nicolas-grekas · Pull Request #33262 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

More docblock fixes #33262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
More docblock fixes
  • Loading branch information
nicolas-grekas committed Aug 20, 2019
commit 9b78d53d0d61304e88a6e41cb5f268b0b24df322
8 changes: 7 additions & 1 deletion src/Symfony/Component/Cache/CacheItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public function isHit()

/**
* {@inheritdoc}
*
* @return $this
*/
public function set($value)
{
Expand All @@ -66,6 +68,8 @@ public function set($value)

/**
* {@inheritdoc}
*
* @return $this
*/
public function expiresAt($expiration)
{
Expand All @@ -82,6 +86,8 @@ public function expiresAt($expiration)

/**
* {@inheritdoc}
*
* @return $this
*/
public function expiresAfter($time)
{
Expand All @@ -103,7 +109,7 @@ public function expiresAfter($time)
*
* @param string|string[] $tags A tag or array of tags
*
* @return static
* @return $this
*
* @throws InvalidArgumentException When $tag is not valid
*/
Expand Down
26 changes: 4 additions & 22 deletions src/Symfony/Component/DomCrawler/FormFieldRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ public function set($name, $value)
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 {
Expand All @@ -140,26 +142,6 @@ public function all()
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.
*
Expand Down
< 83AC /div> 2 changes: 1 addition & 1 deletion src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
0