Failed Conditions
Branch refactor/kernels (3a00e4)
by Atanas
01:41
created

src/Exceptions/Whoops/views/layout.html.php (1 issue)

Severity
1
<?php
2
/**
3
 * Layout template file for Whoops's pretty error output.
4
 */
5
6
$is_admin = function_exists( 'is_admin' ) && is_admin();
7
$is_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
8
9
if ( ! apply_filters( 'wpemerge.pretty_errors.apply_admin_styles', true ) ) {
1 ignored issue
show
The call to __return_false() has too many arguments starting with true. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

9
if ( ! /** @scrutinizer ignore-call */ apply_filters( 'wpemerge.pretty_errors.apply_admin_styles', true ) ) {

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
10
	$is_admin = false;
11
}
12
13
if ( $is_admin && ! $is_ajax ) {
14
	?>
15
	<style>
16
		.wpemerge-whoops {
17
			position: relative;
18
			margin: 20px 20px 0 0;
19
		}
20
21
		.wpemerge-whoops .stack-container {
22
			display: flex;
23
		}
24
25
		.wpemerge-whoops .left-panel {
26
			position: static;
27
			height: auto;
28
			overflow: visible;
29
		}
30
31
		.wpemerge-whoops .details-container {
32
			position: static;
33
			height: auto;
34
			overflow: visible;
35
		}
36
37
		@media (max-width: 600px) {
38
			.wpemerge-whoops {
39
				margin: 10px 10px 0 0;
40
			}
41
42
			.wpemerge-whoops .stack-container {
43
				display: block;
44
			}
45
		}
46
	</style>
47
	<script>
48
		jQuery(window).load(function () {
49
			jQuery(window).scrollTop(0);
50
51
			jQuery('.frames-container').on('click', '.frame', function() {
52
				jQuery(window).scrollTop(0);
53
			});
54
		});
55
	</script>
56
	<?php
57
	require 'wpemerge-body.html.php';
58
	return;
59
}
60
?>
61
<!DOCTYPE html><?php echo $preface; ?>
62
<html>
63
<head>
64
	<meta charset="utf-8">
65
	<meta name="robots" content="noindex,nofollow"/>
66
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
67
	<title><?php echo $tpl->escape( $page_title ) ?></title>
68
</head>
69
<body>
70
	<?php require 'wpemerge-body.html.php'; ?>
71
</body>
72
</html>
73