Skip to content

Commit

Permalink
minor #33179 [VarDumper] fix annotations (nicolas-grekas)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] fix annotations

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Found in #33153

Commits
-------

82f4766 [VarDumper] fix annotations
  • Loading branch information
nicolas-grekas committed Aug 15, 2019
2 parents 6a13826 + 82f4766 commit eb91f5f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions src/Symfony/Component/VarDumper/Cloner/Data.php
Expand Up @@ -61,7 +61,7 @@ public function getType()
}

/**
* @param bool $recursive Whether values should be resolved recursively or not
* @param array|bool $recursive Whether values should be resolved recursively or not
*
* @return string|int|float|bool|array|Data[]|null A native representation of the original value
*/
Expand Down Expand Up @@ -182,7 +182,7 @@ public function getRawData()
*
* @param int $maxDepth The max dumped depth level
*
* @return self A clone of $this
* @return static
*/
public function withMaxDepth($maxDepth)
{
Expand All @@ -197,7 +197,7 @@ public function withMaxDepth($maxDepth)
*
* @param int $maxItemsPerDepth The max number of items dumped per depth level
*
* @return self A clone of $this
* @return static
*/
public function withMaxItemsPerDepth($maxItemsPerDepth)
{
Expand All @@ -212,7 +212,7 @@ public function withMaxItemsPerDepth($maxItemsPerDepth)
*
* @param bool $useRefHandles False to hide global ref. handles
*
* @return self A clone of $this
* @return static
*/
public function withRefHandles($useRefHandles)
{
Expand All @@ -227,7 +227,7 @@ public function withRefHandles($useRefHandles)
*
* @param string|int $key The key to seek to
*
* @return self|null A clone of $this or null if the key is not set
* @return static|null Null if the key is not set
*/
public function seek($key)
{
Expand Down
18 changes: 9 additions & 9 deletions src/Symfony/Component/VarDumper/Cloner/DumperInterface.php
Expand Up @@ -40,21 +40,21 @@ public function dumpString(Cursor $cursor, $str, $bin, $cut);
/**
* Dumps while entering an hash.
*
* @param Cursor $cursor The Cursor position in the dump
* @param int $type A Cursor::HASH_* const for the type of hash
* @param string $class The object class, resource type or array count
* @param bool $hasChild When the dump of the hash has child item
* @param Cursor $cursor The Cursor position in the dump
* @param int $type A Cursor::HASH_* const for the type of hash
* @param string|int $class The object class, resource type or array count
* @param bool $hasChild When the dump of the hash has child item
*/
public function enterHash(Cursor $cursor, $type, $class, $hasChild);

/**
* Dumps while leaving an hash.
*
* @param Cursor $cursor The Cursor position in the dump
* @param int $type A Cursor::HASH_* const for the type of hash
* @param string $class The object class, resource type or array count
* @param bool $hasChild When the dump of the hash has child item
* @param int $cut The number of items the hash has been cut by
* @param Cursor $cursor The Cursor position in the dump
* @param int $type A Cursor::HASH_* const for the type of hash
* @param string|int $class The object class, resource type or array count
* @param bool $hasChild When the dump of the hash has child item
* @param int $cut The number of items the hash has been cut by
*/
public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut);
}
6 changes: 3 additions & 3 deletions src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php
Expand Up @@ -185,13 +185,13 @@ protected function echoLine($line, $depth, $indentPad)
/**
* Converts a non-UTF-8 string to UTF-8.
*
* @param string $s The non-UTF-8 string to convert
* @param string|null $s The non-UTF-8 string to convert
*
* @return string The string converted to UTF-8
* @return string|null The string converted to UTF-8
*/
protected function utf8Encode($s)
{
if (preg_match('//u', $s)) {
if (null === $s || preg_match('//u', $s)) {
return $s;
}

Expand Down

0 comments on commit eb91f5f

Please sign in to comment.