@@ -37,7 +37,7 @@ protected static function tracyUnavailable() {
37
37
* Tracy\Debugger::debugAll() shortcut.
38
38
* @tracySkipLocation
39
39
*/
40
- public static function debugAll ($ var , $ title = NULL , array $ options = NULL ) {
40
+ public static function debugAll (string | array $ var , string | array | null $ title = NULL , ? array $ options = NULL ) {
41
41
if (self ::tracyUnavailable ()) return false ;
42
42
static ::barDump ($ var , $ title , $ options );
43
43
static ::dump ($ var , $ title , $ options );
@@ -51,7 +51,7 @@ public static function debugAll($var, $title = NULL, array $options = NULL) {
51
51
* Tracy\Debugger::barEcho() shortcut.
52
52
* @tracySkipLocation
53
53
*/
54
- public static function barEcho ($ str , $ title = null ) {
54
+ public static function barEcho (string $ str , string | array | null $ title = null ) {
55
55
if (self ::tracyUnavailable () && !\TracyDebugger::getDataValue ('recordGuestDumps ' )) return false ;
56
56
static ::dumpToBar ($ str , $ title , null , true );
57
57
}
@@ -60,7 +60,7 @@ public static function barEcho($str, $title = null) {
60
60
* Tracy\Debugger::barDump() shortcut.
61
61
* @tracySkipLocation
62
62
*/
63
- public static function barDump ($ var , $ title = NULL , array $ options = NULL ) {
63
+ public static function barDump (string | array $ var , string | array | null $ title = NULL , ? array $ options = NULL ) {
64
64
if (self ::tracyUnavailable () && !\TracyDebugger::getDataValue ('recordGuestDumps ' )) return false ;
65
65
if (is_array ($ title )) {
66
66
$ options = $ title ;
@@ -85,7 +85,7 @@ public static function barDump($var, $title = NULL, array $options = NULL) {
85
85
* Tracy\Debugger::barDumpBig() shortcut dumping with maxDepth = 6, maxLength = 9999, and maxItems = 250.
86
86
* @tracySkipLocation
87
87
*/
88
- public static function barDumpBig ($ var , $ title = NULL , array $ options = NULL ) {
88
+ public static function barDumpBig (string | array $ var , string | array | null $ title = NULL , ? array $ options = NULL ) {
89
89
if (self ::tracyUnavailable () && !\TracyDebugger::getDataValue ('recordGuestDumps ' )) return false ;
90
90
if (is_array ($ title )) {
91
91
$ options = $ title ;
@@ -108,7 +108,7 @@ public static function barDumpBig($var, $title = NULL, array $options = NULL) {
108
108
* Tracy\Debugger::dump() shortcut.
109
109
* @tracySkipLocation
110
110
*/
111
- public static function dump ($ var , $ title = NULL , array $ options = NULL ) {
111
+ public static function dump (string | array $ var , string | array | null $ title = NULL , ? array $ options = NULL ) {
112
112
if (self ::tracyUnavailable () && PHP_SAPI !== 'cli ' ) return false ;
113
113
if (is_array ($ title )) {
114
114
$ options = $ title ;
@@ -153,7 +153,7 @@ public static function dump($var, $title = NULL, array $options = NULL) {
153
153
* Tracy\Debugger::dumpBig() shortcut dumping with maxDepth = 6, maxLength = 9999 and maxItems = 250.
154
154
* @tracySkipLocation
155
155
*/
156
- public static function dumpBig ($ var , $ title = NULL , array $ options = NULL ) {
156
+ public static function dumpBig (string | array $ var , string | array | null $ title = NULL , ? array $ options = NULL ) {
157
157
if (self ::tracyUnavailable () && PHP_SAPI !== 'cli ' ) return false ;
158
158
if (is_array ($ title )) {
159
159
$ options = $ title ;
@@ -196,7 +196,7 @@ public static function dumpBig($var, $title = NULL, array $options = NULL) {
196
196
* Send content to dump bar
197
197
* @tracySkipLocation
198
198
*/
199
- private static function dumpToBar ($ var , $ title = NULL , array $ options = NULL , $ echo = false ) {
199
+ private static function dumpToBar (string | array $ var , string | array | null $ title = NULL , ? array $ options = NULL , $ echo = false ) {
200
200
$ dumpItem = array ();
201
201
$ dumpItem ['title ' ] = $ title ;
202
202
$ dumpItem ['dump ' ] = $ echo ? '<div class="tracy-echo"> ' . $ var . '</div> ' : static ::generateDump ($ var , $ options );
@@ -214,7 +214,7 @@ private static function dumpToBar($var, $title = NULL, array $options = NULL, $e
214
214
* Generate debugInfo and Full Object tabbed output
215
215
* @tracySkipLocation
216
216
*/
217
- private static function generateDump ($ var , $ options ) {
217
+ private static function generateDump (string | array $ var , array $ options ) {
218
218
// standard options for all dump/barDump variations
219
219
$ options [Dumper::COLLAPSE ] = isset ($ options ['collapse ' ]) ? $ options ['collapse ' ] : \TracyDebugger::getDataValue ('collapse ' );
220
220
$ options [Dumper::COLLAPSE_COUNT ] = isset ($ options ['collapse_count ' ]) ? $ options ['collapse_count ' ] : \TracyDebugger::getDataValue ('collapse_count ' );
@@ -341,7 +341,7 @@ private static function generateEditViewLinks($var, $type, $section) {
341
341
* Tracy\Debugger::log() shortcut.
342
342
* @tracySkipLocation
343
343
*/
344
- public static function log ($ message , $ priority = Debugger::INFO ) {
344
+ public static function log (string $ message , $ priority = Debugger::INFO ) {
345
345
if (self ::tracyUnavailable ()) return false ;
346
346
return Debugger::log ($ message , $ priority );
347
347
}
@@ -350,7 +350,7 @@ public static function log($message, $priority = Debugger::INFO) {
350
350
* Tracy\Debugger::timer() shortcut.
351
351
* @tracySkipLocation
352
352
*/
353
- public static function timer ($ name = NULL ) {
353
+ public static function timer (? string $ name = NULL ) {
354
354
if (self ::tracyUnavailable ()) return false ;
355
355
$ roundedTime = round (Debugger::timer ($ name ),4 );
356
356
if ($ name ) {
@@ -365,7 +365,7 @@ public static function timer($name = NULL) {
365
365
* Tracy\Debugger::fireLog() shortcut.
366
366
* @tracySkipLocation
367
367
*/
368
- public static function fireLog ($ message = NULL ) {
368
+ public static function fireLog (? string $ message = NULL ) {
369
369
if (!method_exists ('Tracy\Debugger ' , 'getFireLogger ' ) || self ::tracyUnavailable ()) return false ;
370
370
return Debugger::fireLog ($ message );
371
371
}
@@ -375,7 +375,7 @@ public static function fireLog($message = NULL) {
375
375
* Zarganwar\PerformancePanel\Register::add() shortcut.
376
376
* @tracySkipLocation
377
377
*/
378
- public static function addBreakpoint ($ name = null , $ enforceParent = null ) {
378
+ public static function addBreakpoint (? string $ name = null , ? bool $ enforceParent = null ) {
379
379
if (self ::tracyUnavailable () || !class_exists ('\Zarganwar\PerformancePanel\Register ' )) return false ;
380
380
return Zarganwar \PerformancePanel \Register::add ($ name , $ enforceParent );
381
381
}
0 commit comments