Passed
Push — master ( 86dfed...3aa001 )
by Warwick
05:45
created

functions.php (18 issues)

1
<?php
0 ignored issues
show
This file is missing a doc comment.
Loading history...
2
use function Aws\serialize;
0 ignored issues
show
The function Aws\serialize was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
3
4
/**
5
 * LSX functions and definitions.
6
 *
7
 * @package lsx
8
 */
9
10
if ( ! defined( 'ABSPATH' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
11
	exit;
12
}
13
14
define( 'LSX_VERSION', '2.9.5' );
15
16
if ( in_array( 'wordpress-seo/wp-seo.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || in_array( 'wordpress-seo-premium/wp-seo-premium.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Not using strict comparison for in_array; supply true for third argument.
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
It seems like apply_filters('active_pl...tion('active_plugins')) can also be of type false; however, parameter $haystack of in_array() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

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

16
if ( in_array( 'wordpress-seo/wp-seo.php', /** @scrutinizer ignore-type */ apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || in_array( 'wordpress-seo-premium/wp-seo-premium.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
Loading history...
17
	require get_template_directory() . '/includes/yoast/class-lsx-yoast.php';
18
}
19
20
if ( class_exists( 'WooCommerce' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
21
	require get_template_directory() . '/includes/woocommerce/woocommerce.php';
22
	require get_template_directory() . '/includes/woocommerce/addons.php';
23
}
24
25
if ( class_exists( 'Tribe__Events__Main' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
26
	require get_template_directory() . '/includes/the-events-calendar/the-events-calendar.php';
27
}
28
29
if ( class_exists( 'Sensei_Main' ) || class_exists( 'Sensei_WC' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
30
	require get_template_directory() . '/includes/sensei/class-lsx-sensei.php';
31
}
32
33
if ( class_exists( 'Popup_Maker' ) ) {
0 ignored issues
show
Expected 0 spaces before closing bracket; 1 found
Loading history...
Expected 0 spaces after opening bracket; 1 found
Loading history...
34
	require get_template_directory() . '/includes/popup-maker/class-lsx-popup-maker.php';
35
}
36
37
if ( class_exists( 'bbPress' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
38
	require get_template_directory() . '/includes/bbpress/bbpress.php';
39
}
40
41
require get_template_directory() . '/includes/config.php';
42
require get_template_directory() . '/includes/deprecated.php';
43
require get_template_directory() . '/includes/classes/class-lsx-theme-customizer.php';
44
require get_template_directory() . '/includes/customizer.php';
45
require get_template_directory() . '/includes/sanitize.php';
46
require get_template_directory() . '/includes/layout.php';
47
require get_template_directory() . '/includes/hooks.php';
48
require get_template_directory() . '/includes/widgets.php';
49
require get_template_directory() . '/includes/scripts.php';
50
require get_template_directory() . '/includes/classes/class-lsx-nav-walker.php';
51
require get_template_directory() . '/includes/nav-navwalker.php';
52
require get_template_directory() . '/includes/classes/class-lsx-bootstrap-navwalker.php';
53
require get_template_directory() . '/includes/nav-bootstrap-navwalker.php';
54
require get_template_directory() . '/includes/classes/class-lsx-walker-comment.php';
55
require get_template_directory() . '/includes/walker-comment.php';
56
require get_template_directory() . '/includes/template-tags.php';
57
require get_template_directory() . '/includes/extras.php';
58
require get_template_directory() . '/includes/welcome.php';
59
require get_template_directory() . '/includes/404-widget.php';
60
require get_template_directory() . '/includes/gutenberg.php';
61
require get_template_directory() . '/includes/classes/class-lsx-schema-utils.php';
62
require get_template_directory() . '/includes/classes/class-lsx-schema-graph-piece.php';
63
require get_template_directory() . '/includes/classes/class-lsx-optimisation.php';
64
require get_template_directory() . '/includes/classes/class-lsx-rest-helper.php';
65