File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
src/DebugBar/DataFormatter/VarDumper Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,19 @@ public function resetDumpHeader()
1818 $ this ->dumpHeader = null ;
1919 }
2020
21- public function getDumpHeaderByDebugBar () {
22- // getDumpHeader is protected:
23- return str_replace ('pre.sf-dump ' , '.phpdebugbar pre.sf-dump ' , $ this ->getDumpHeader ());
21+ public function getDumpHeaderByDebugBar ()
22+ {
23+ $ header = str_replace ('pre.sf-dump ' , '.phpdebugbar pre.sf-dump ' , $ this ->getDumpHeader ());
24+
25+ if (isset (self ::$ themes ['dark ' ])) {
26+ $ line = '' ;
27+ foreach (self ::$ themes ['dark ' ] as $ class => $ style ) {
28+ $ line .= ".phpdebugbar[data-theme='dark'] pre.sf-dump " .('default ' === $ class ? ', pre.sf-dump ' : '' ).' .sf-dump- ' .$ class .'{ ' .$ style .'} ' ;
29+ }
30+ $ line .= ".phpdebugbar[data-theme='dark'] " . 'pre.sf-dump .sf-dump-ellipsis-note{ ' .self ::$ themes ['dark ' ]['note ' ].'} ' ;
31+ $ header = str_replace ('</style> ' , $ line . '</style> ' , $ header );
32+ }
33+
34+ return $ header ;
2435 }
2536}
You can’t perform that action at this time.
0 commit comments