8000 [VarDumper] fix annotations · symfony/symfony@82f4766 · GitHub
[go: up one dir, main page]

Skip to content

Commit 82f4766

Browse files
[VarDumper] fix annotations
1 parent 6a13826 commit 82f4766

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/Symfony/Component/VarDumper/Cloner/Data.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function getType()
6161
}
6262

6363
/**
64-
* @param bool $recursive Whether values should be resolved recursively or not
64+
* @param array|bool $recursive Whether values should be resolved recursively or not
6565
*
6666
* @return string|int|float|bool|array|Data[]|null A native representation of the original value
6767
*/
@@ -182,7 +182,7 @@ public function getRawData()
182182
*
183183
* @param int $maxDepth The max dumped depth level
184184
*
185-
* @return self A clone of $this
185+
* @return static
186186
*/
187187
public function withMaxDepth($maxDepth)
188188
{
@@ -197,7 +197,7 @@ public function withMaxDepth($maxDepth)
197197
*
198198
* @param int $maxItemsPerDepth The max number of items dumped per depth level
199199
*
200-
* @return self A clone of $this
200+
* @return static
201201
*/
202202
public function withMaxItemsPerDepth($maxItemsPerDepth)
203203
{
@@ -212,7 +212,7 @@ public function withMaxItemsPerDepth($maxItemsPerDepth)
212212
*
213213
* @param bool $useRefHandles False to hide global ref. handles
214214
*
215-
* @return self A clone of $this
215+
* @return static
216216
*/
217217
public function withRefHandles($useRefHandles)
218218
{
@@ -227,7 +227,7 @@ public function withRefHandles($useRefHandles)
227227
*
228228
* @param string|int $key The key to seek to
229229
*
230-
* @return self|null A clone of $this or null if the key is not set
230+
* @return static|null Null if the key is not set
231231
*/
232232
public function seek($key)
233233
{

src/Symfony/Component/VarDumper/Cloner/DumperInterface.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ public function dumpString(Cursor $cursor, $str, $bin, $cut);
4040
/**
4141
* Dumps while entering an hash.
4242
*
43-
* @param Cursor $cursor The Cursor position in the dump
44-
* @param int $type A Cursor::HASH_* const for the type of hash
45-
* @param string $class The object class, resource type or array count
46-
* @param bool $hasChild When the dump of the hash has child item
43+
* @param Cursor $cursor The Cursor position in the dump
44+
* @param int $type A Cursor::HASH_* const for the type of hash
45+
* @param string|int $class The object class, resource type or array count
46+
* @param bool $hasChild When the dump of the hash has child item
4747
*/
4848
public function enterHash(Cursor $cursor, $type, $class, $hasChild);
4949

5050
/**
5151
* Dumps while leaving an hash.
5252
*
53-
* @param Cursor $cursor The Cursor position in the dump
54-
* @param int $type A Cursor::HASH_* const for the type of hash
55-
* @param string $class The object class, resource type or array count
56-
* @param bool $hasChild When the dump of the hash has child item
57-
* @param int $cut The number of items the hash has been cut by
53+
* @param Cursor $cursor The Cursor position in the dump
54+
* @param int $type A Cursor::HASH_* const for the type of hash
55+
* @param string|int $class The object class, resource type or array count
56+
* @param bool $hasChild When the dump of the hash has child item
57+
* @param int $cut The number of items the hash has been cut by
5858
*/
5959
public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut);
6060
}

src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ protected function echoLine($line, $depth, $indentPad)
185185
/**
186186
* Converts a non-UTF-8 string to UTF-8.
187187
*
188-
* @param string $s The non-UTF-8 string to convert
188+
* @param string|null $s The non-UTF-8 string to convert
189189
*
190-
* @return string The string converted to UTF-8
190+
* @return string|null The string converted to UTF-8
191191
*/
192192
protected function utf8Encode($s)
193193
{
194-
if (preg_match('//u', $s)) {
194+
if (null === $s || preg_match('//u', $s)) {
195195
return $s;
196196
}
197197

0 commit comments

Comments
 (0)
0