Passed
Push — dependabot/github_actions/styf... ( 09909f )
by
unknown
14:38
created

sidebar-sitemap.php (9 issues)

1
<?php
2
/**
3
 * The Sidebar containing the main widget areas.
4
 *
5
 * @package lsx
6
 */
7
8
$show_on_front = get_option( 'show_on_front' );
9
10
$layout = get_theme_mod( 'lsx_layout', '2cr' );
11
$layout = apply_filters( 'lsx_layout', $layout );
12
13
if ( 'posts' === $show_on_front && is_home() ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
14
	$sidebar = 'home';
15
} else {
16
	$sidebar = 'sidebar-1';
17
}
18
19
if ( '1c' !== $layout ) : ?>
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
Blank line found at start of control structure
Loading history...
20
21
	<?php lsx_sidebars_before(); ?>
22
23
	<div id="secondary" class="widget-area <?php echo esc_attr( lsx_sidebar_class() ); ?>" role="complementary">
24
25
		<?php lsx_sidebar_top(); ?>
26
27
		<h2><?php esc_html_e( 'Categories', 'lsx' ); ?></h2>
28
29
		<aside id="categories" class="widget widget_categories">
30
			<?php
31
				echo wp_tag_cloud( array(
0 ignored issues
show
Are you sure wp_tag_cloud(array('taxonomy' => 'category')) of type array|string can be used in echo? ( Ignorable by Annotation )

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

31
				echo /** @scrutinizer ignore-type */ wp_tag_cloud( array(
Loading history...
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
32
					'taxonomy' => 'category',
33
				) );
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
34
			?>
35
		</aside>
36
37
		<?php lsx_sitemap_taxonomy_clouds(); ?>
38
39
		<?php lsx_sidebar_bottom(); ?>
40
41
	</div><!-- #secondary -->
42
43
	<?php lsx_sidebars_after(); ?>
44
45
<?php endif;
0 ignored issues
show
Opening PHP tag must be on a line by itself
Loading history...
46