8000 minor #14137 [VarDumper] Optimized some code (lyrixx) · symfony/symfony@c5dce60 · GitHub
[go: up one dir, main page]

Skip to content

Commit c5dce60

Browse files
minor #14137 [VarDumper] Optimized some code (lyrixx)
This PR was merged into the 2.7 branch. Discussion ---------- [VarDumper] Optimized some code | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ✘ | License | MIT | Doc PR | ✘ asked by @nicolas-grekas Commits ------- e8d2983 [VarDumper] Optimized some code
2 parents 75c8a2b + e8d2983 commit c5dce60

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ private function getVarDumperDump($data)
3636
$dumper = new CliDumper($h);
3737
$dumper->setColors(false);
3838
$dumper->dump($cloner->cloneVar($data)->withRefHandles(false));
39-
fseek($h, 0);
40-
$data = stream_get_contents($h);
39+
$data = stream_get_contents($h, -1, 0);
4140
fclose($h);
4241

4342
return $data;

src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ private function getVarDumperDump($data)
3636
$dumper = new CliDumper($h);
3737
$dumper->setColors(false);
3838
$dumper->dump($cloner->cloneVar($data)->withRefHandles(false));
39-
fseek($h, 0);
40-
$data = stream_get_contents($h);
39+
$data = stream_get_contents($h, -1, 0);
4140
fclose($h);
4241

4342
return $data;

0 commit comments

Comments
 (0)
0