Issues (631)

single-comic.php (20 issues)

1
<?php
2
/**
3
 *  The Template for displaying all single comics
4
 *
5
 * @package WordPress
6
 * @subpackage Strip
7
 */
8
9
if ( post_type_exists( 'comic' ) ) {
0 ignored issues
show
The function post_type_exists was not found. Maybe you did not declare it correctly or list all dependencies? ( 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 */ post_type_exists( 'comic' ) ) {
Loading history...
10
	get_header( 'lite' );
0 ignored issues
show
The function get_header was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

10
	/** @scrutinizer ignore-call */ 
11
 get_header( 'lite' );
Loading history...
11
} else {
12
	get_header();
13
}
14
?>
15
16
	<section id="primary">
17
		<main id="content" role="main">
18
19
	<?php
20
	// Start the loop.
21
	while ( have_posts() ) : the_post(); ?>
0 ignored issues
show
The function have_posts was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

21
	while ( /** @scrutinizer ignore-call */ have_posts() ) : the_post(); ?>
Loading history...
The function the_post was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

21
	while ( have_posts() ) : /** @scrutinizer ignore-call */ the_post(); ?>
Loading history...
22
23
			<div class="entry-comic">
24
25
				<?php get_template_part( 'content-comic' ); ?>
0 ignored issues
show
The function get_template_part was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

25
				<?php /** @scrutinizer ignore-call */ get_template_part( 'content-comic' ); ?>
Loading history...
26
27
					<div class="wrap clear">
28
29
						<h1 class="screen-reader-text"><?php esc_html_e( 'Post navigation', 'strip' ); ?></h1>
0 ignored issues
show
The function esc_html_e was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

29
						<h1 class="screen-reader-text"><?php /** @scrutinizer ignore-call */ esc_html_e( 'Post navigation', 'strip' ); ?></h1>
Loading history...
30
31
								<div class="navigation-comic">
32
								<nav class="nav-first"><a href="<?php echo esc_url( first_comic_link() ); ?>"><?php esc_html_e( 'Start', 'strip' ); ?></a></nav>
0 ignored issues
show
The function esc_url was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

32
								<nav class="nav-first"><a href="<?php echo /** @scrutinizer ignore-call */ esc_url( first_comic_link() ); ?>"><?php esc_html_e( 'Start', 'strip' ); ?></a></nav>
Loading history...
Are you sure the usage of first_comic_link() is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
33
								<nav class="nav-previous"><?php previous_post_link( '%link', __( 'Previous', 'strip' ), true, '', 'story' ); ?></nav>
0 ignored issues
show
The function previous_post_link was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

33
								<nav class="nav-previous"><?php /** @scrutinizer ignore-call */ previous_post_link( '%link', __( 'Previous', 'strip' ), true, '', 'story' ); ?></nav>
Loading history...
The function __ was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

33
								<nav class="nav-previous"><?php previous_post_link( '%link', /** @scrutinizer ignore-call */ __( 'Previous', 'strip' ), true, '', 'story' ); ?></nav>
Loading history...
34
								<nav class="nav-title"><?php the_title( '<h4 class="series-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h4>' ); ?></nav>
0 ignored issues
show
The function the_title was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

34
								<nav class="nav-title"><?php /** @scrutinizer ignore-call */ the_title( '<h4 class="series-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h4>' ); ?></nav>
Loading history...
The function get_permalink was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

34
								<nav class="nav-title"><?php the_title( '<h4 class="series-title"><a href="' . esc_url( /** @scrutinizer ignore-call */ get_permalink() ) . '" rel="bookmark">', '</a></h4>' ); ?></nav>
Loading history...
35
								<nav class="nav-next"><?php next_post_link( '%link', __( 'Next', 'strip' ), true, '', 'story' ); ?></nav>
0 ignored issues
show
The function next_post_link was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

35
								<nav class="nav-next"><?php /** @scrutinizer ignore-call */ next_post_link( '%link', __( 'Next', 'strip' ), true, '', 'story' ); ?></nav>
Loading history...
36
								<nav class="nav-last"><a href="<?php echo esc_url( last_comic_link() ); ?>"><?php esc_html_e( 'Last', 'strip' ); ?></a></nav>
0 ignored issues
show
Are you sure the usage of last_comic_link() is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
37
							</div><!-- .wrap -->
38
39
						<?php set_transient( 'story', $comic );?>
0 ignored issues
show
The function set_transient was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

39
						<?php /** @scrutinizer ignore-call */ set_transient( 'story', $comic );?>
Loading history...
40
41
			</div><!-- #entry-comic -->
42
43
			<?php wp_reset_postdata(); ?>
0 ignored issues
show
The function wp_reset_postdata was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

43
			<?php /** @scrutinizer ignore-call */ wp_reset_postdata(); ?>
Loading history...
44
45
		<?php
46
			// If comments are open or we have at least one comment, load up the comment template.
47
		if ( comments_open() || '0' !== get_comments_number() ) :
0 ignored issues
show
The function comments_open was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

47
		if ( /** @scrutinizer ignore-call */ comments_open() || '0' !== get_comments_number() ) :
Loading history...
The function get_comments_number was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

47
		if ( comments_open() || '0' !== /** @scrutinizer ignore-call */ get_comments_number() ) :
Loading history...
48
			comments_template();
0 ignored issues
show
The function comments_template was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

48
			/** @scrutinizer ignore-call */ 
49
   comments_template();
Loading history...
49
		endif;
50
51
	  endwhile; // end of the loop. ?>
52
53
		</main><!-- #content -->
54
	</section><!-- #primary -->
55
<?php get_footer( 'lite' ); ?>
0 ignored issues
show
The function get_footer was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

55
<?php /** @scrutinizer ignore-call */ get_footer( 'lite' ); ?>
Loading history...
56