@@ -19,6 +19,9 @@ discard block |
||
19 | 19 | $data = self::printDebug($data, $postpone); |
20 | 20 | } |
21 | 21 | |
22 | + /** |
|
23 | + * @param boolean $postpone |
|
24 | + */ |
|
22 | 25 | public static function consoleDebug($data, $postpone, $title = 'PHP', $logType = 'log') |
23 | 26 | { |
24 | 27 | $title .= '(' . self::getCallerFile(2) .'):'; |
@@ -32,6 +35,9 @@ discard block |
||
32 | 35 | self::echoDebug($result, $postpone); |
33 | 36 | } |
34 | 37 | |
38 | + /** |
|
39 | + * @param boolean $postpone |
|
40 | + */ |
|
35 | 41 | public static function printDebug($data, $postpone) |
36 | 42 | { |
37 | 43 | $type = gettype($data); |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | |
22 | 22 | public static function consoleDebug($data, $postpone, $title = 'PHP', $logType = 'log') |
23 | 23 | { |
24 | - $title .= '(' . self::getCallerFile(2) .'):'; |
|
24 | + $title .= '(' . self::getCallerFile(2) . '):'; |
|
25 | 25 | $type = gettype($data); |
26 | 26 | if (is_array($data) || is_object($data)) { |
27 | 27 | $output = json_encode($data); |
28 | - $result = "<script>console.$logType('$title', '($type)', $output);</script>\n"; |
|
28 | + $result = "<script>console.$logType('$title', '($type)', $output);</script>\n"; |
|
29 | 29 | } else { |
30 | 30 | $result = "<script>console.$logType('$title', '($type)', '$data');</script>\n"; |
31 | 31 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | protected static function echoDebug($data, $postpone) |
49 | 49 | { |
50 | 50 | if ($postpone) { |
51 | - add_action('wp_footer', function () use ($data) { |
|
51 | + add_action('wp_footer', function() use ($data) { |
|
52 | 52 | echo $data; |
53 | 53 | }, 30); |
54 | 54 | } else { |