File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,11 +155,8 @@ public static function render(): string
155155 $ fileCount = count ($ appFiles );
156156 $ vendorCount = count ($ vendorFiles );
157157
158- // Подключаем CSS из отдельного файла
159- $ html = '' ;
160- ob_start ();
161- include __DIR__ . '/style.php ' ;
162- $ html .= ob_get_clean ();
158+ // Подключаем CSS из отдельного файла (файл возвращает строку через return)
159+ $ html = (string ) include __DIR__ . '/style.php ' ;
163160
164161 // Строим HTML панели
165162 $ html .= <<<HTML
@@ -238,9 +235,7 @@ public static function render(): string
238235
239236 // --- JS ---
240237 $ html .= '</div> ' ;
241- ob_start ();
242- include __DIR__ . '/script.php ' ;
243- $ html .= ob_get_clean ();
238+ $ html .= (string ) include __DIR__ . '/script.php ' ;
244239
245240 return $ html ;
246241 }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ return <<<'JS'
14<script>
25function switchDebugTab(tabName) {
36 var bar = document.getElementById('pet-debug-bar');
@@ -22,4 +25,5 @@ function toggleVendorFiles() {
2225 vendorTable.style.display = checkbox.checked ? 'table' : 'none';
2326 }
2427}
25- </script >
28+ </script>
29+ JS;
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ return <<<'CSS'
14<style>
25.pet-debug-bar * {
36 margin: 0;
188191.pet-debug-bar.collapsed {
189192 max-height: 40px;
190193}
191- </style >
194+ </style>
195+ CSS;
You can’t perform that action at this time.
0 commit comments