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 3
3
namespace Barryvdh \Debugbar \DataCollector ;
4
4
5
5
use DebugBar \DataCollector \TimeDataCollector ;
6
+ use DebugBar \DataFormatter \HasDataFormatter ;
6
7
use Illuminate \Cache \Events \CacheEvent ;
7
8
use Illuminate \Cache \Events \CacheHit ;
8
9
use Illuminate \Cache \Events \CacheMissed ;
12
13
13
14
class CacheCollector extends TimeDataCollector
14
15
{
16
+ use HasDataFormatter;
17
+
15
18
/** @var bool */
16
19
protected $ collectValues ;
17
20
@@ -39,7 +42,11 @@ public function onCacheEvent(CacheEvent $event)
39
42
40
43
if (isset ($ params ['value ' ])) {
41
44
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
+ }
43
50
} else {
44
51
unset($ params ['value ' ]);
45
52
}
You can’t perform that action at this time.
0 commit comments