File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 33namespace Barryvdh \Debugbar \DataCollector ;
44
55use DebugBar \DataCollector \TimeDataCollector ;
6+ use DebugBar \DataFormatter \HasDataFormatter ;
67use Illuminate \Cache \Events \CacheEvent ;
78use Illuminate \Cache \Events \CacheHit ;
89use Illuminate \Cache \Events \CacheMissed ;
1213
1314class CacheCollector extends TimeDataCollector
1415{
16+ use HasDataFormatter;
17+
1518 /** @var bool */
1619 protected $ collectValues ;
1720
@@ -39,7 +42,11 @@ public function onCacheEvent(CacheEvent $event)
3942
4043 if (isset ($ params ['value ' ])) {
4144 if ($ this ->collectValues ) {
42- $ params ['value ' ] = htmlspecialchars ($ this ->getDataFormatter ()->formatVar ($ event ->value ));
45+ if ($ this ->isHtmlVarDumperUsed ()) {
46+ $ params ['value ' ] = $ this ->getVarDumper ()->renderVar ($ params ['value ' ]);
47+ } else {
48+ $ params ['value ' ] = htmlspecialchars ($ this ->getDataFormatter ()->formatVar ($ params ['value ' ]));
49+ }
4350 } else {
4451 unset($ params ['value ' ]);
4552 }
You can’t perform that action at this time.
0 commit comments