8000 [VarDumper] fix annotations by nicolas-grekas · Pull Request #33179 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[VarDumper] fix annotations #33179

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 15, 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
[VarDumper] fix annotations
  • Loading branch information
nicolas-grekas committed Aug 15, 2019
commit 82f4766498861cad1b63da6eac9bb5a131066e70
10 changes: 5 additions & 5 deletions src/Symfony/Component/VarDumper/Cloner/Data.php
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
163A
0