chemiker/e.nigma-2015

View on GitHub
src/theme/functions/content.php

Summary

Maintainability
A
2 hrs
Test Coverage

Function pagebar has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

        public static function pagebar($displayedpages=6) {
            global $wp_query;
            $max_num_pages = $wp_query->max_num_pages;

            if ($max_num_pages <= 1) {
Severity: Minor
Found in src/theme/functions/content.php - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method pagebar has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public static function pagebar($displayedpages=6) {
            global $wp_query;
            $max_num_pages = $wp_query->max_num_pages;

            if ($max_num_pages <= 1) {
Severity: Minor
Found in src/theme/functions/content.php - About 1 hr to fix

    Opening brace of a class must be on the line after the definition
    Open

        class Content {

    Incorrect spacing between argument "$displayedpages" and equals sign; expected 1 but found 0
    Open

            public static function pagebar($displayedpages=6) {

    Space found before closing bracket of FOREACH loop
    Open

                foreach ( $thecategories as $categorienumber => $category ) {

    Space found after opening bracket of FOREACH loop
    Open

                foreach ( $thecategories as $categorienumber => $category ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                foreach ( $thecategories as $categorienumber => $category ) {

    Incorrect spacing between default value and equals sign for argument "$displayedpages"; expected 1 but found 0
    Open

            public static function pagebar($displayedpages=6) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                    if ( $categorienumber == $numberofcategories - 1 ) {

    Method name "Content::get_categories" is not in camel caps format
    Open

            public static function get_categories() {

    Method name "Content::get_headline" is not in camel caps format
    Open

            private static function get_headline($format) {

    Terminating statement must be indented to the same level as the CASE body
    Open

                    break;

    Method name "Content::get_css" is not in camel caps format
    Open

            private static function get_css($format, $css='') {

    There must be no space before the colon in a DEFAULT statement
    Open

                    default :

    Method name "Content::get_class" is not in camel caps format
    Open

            private static function get_class($format, $class='') {

    There must be no space before the colon in a CASE statement
    Open

                    case 'quote' : case 'link' :

    Expected 0 spaces between opening bracket and argument "$format"; 1 found
    Open

            public static function get_post_vars( $format = '' ) {

    There must be no space before the colon in a CASE statement
    Open

                    case 'link' :

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( $format == 'image' && has_post_thumbnail() )

    Incorrect spacing between argument "$css" and equals sign; expected 1 but found 0
    Open

            private static function get_css($format, $css='') {

    Method name "Content::get_meta" is not in camel caps format
    Open

            private static function get_meta($format) {

    The CASE body must start on the line following the statement
    Open

                    case 'quote' : case 'link' :

    Incorrect spacing between default value and equals sign for argument "$class"; expected 1 but found 0
    Open

            private static function get_class($format, $class='') {

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )

    Method name "Content::get_thumbnail" is not in camel caps format
    Open

            private static function get_thumbnail($format) {

    Terminating statement must be indented to the same level as the CASE body
    Open

                    break;

    Terminating statement must be indented to the same level as the CASE body
    Open

                    break;

    Method name "Content::get_content" is not in camel caps format
    Open

            private static function get_content($format) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( ! $format || ! isset($symbols[$format]) || ! $symbols[$format] )

    Method name "Content::get_text_for_archive_page" is not in camel caps format
    Open

            private static function get_text_for_archive_page() {

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( ! is_single() && has_excerpt() )

    Incorrect spacing between argument "$class" and equals sign; expected 1 but found 0
    Open

            private static function get_class($format, $class='') {

    Terminating statement must be indented to the same level as the CASE body
    Open

                    break;

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( ! empty($categories) ) {

    There must be no space before the colon in a DEFAULT statement
    Open

                    default :

    There must be no space before the colon in a CASE statement
    Open

                    case 'quote' : case 'link' :

    Terminating statement must be indented to the same level as the CASE body
    Open

                    break;

    Expected 0 spaces between argument "$format" and closing bracket; 1 found
    Open

            public static function get_post_vars( $format = '' ) {

    Method name "Content::get_post_vars" is not in camel caps format
    Open

            public static function get_post_vars( $format = '' ) {

    Terminating statement must be indented to the same level as the CASE body
    Open

                    break;

    Method name "Content::get_category_symbol" is not in camel caps format
    Open

            private static function get_category_symbol($format) {

    Incorrect spacing between default value and equals sign for argument "$css"; expected 1 but found 0
    Open

            private static function get_css($format, $css='') {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    if ($page <= $displayedpages) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $thecategories = get_the_category();

    Spaces must be used to indent lines; tabs are not allowed
    Open

            // Pagebar Clone

    Spaces must be used to indent lines; tabs are not allowed
    Open

            public static function pagebar($displayedpages=6) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (! $page) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $min = 1;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ($max_num_pages <= 1) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                } else {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        class Content {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ($max_num_pages > $displayedpages) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    for ($i = $min; $i <= $max; $i++) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                $i

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $max_num_pages = $wp_query->max_num_pages;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $page = 1;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $max = $max_num_pages;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            public static function get_categories() {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        namespace enigma;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            // Originally created by [Sergej Müller](https://sergejmueller.github.io)

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    } elseif ($page >= $displayedpages && $page < ($max_num_pages - $roundedrange)) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                global $wp_query;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    return;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $roundedrange  = ceil($displayedpages / 2);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $page  = (int) get_query_var('paged');

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $numberofcategories = count( $thecategories );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        echo sprintf(' <a href="%s" %s>%d</a>',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                foreach ( $thecategories as $categorienumber => $category ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $spacer = '';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $max = $displayedpages + 1;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $max = $max_num_pages;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                get_pagenum_link($i),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    } elseif ($page >= ($max_num_pages - $roundedrange)) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $min = 1;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                ($i == $page ? 'class="page active"' : 'class="page"'),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $categories = '';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $min = $page - $roundedrange;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $max = $page + $roundedrange;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (! empty($min) && ! empty($max)) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            // Get Categories

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    if ( $categorienumber == $numberofcategories - 1 ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $spacer = ', ';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $min = $max_num_pages - $displayedpages;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    } else {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'quote' => '&#61730;',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    return '&#61972;';

    Spaces must be used to indent lines; tabs are not allowed
    Open

            private static function get_headline($format) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                 self::get_categories()

    Spaces must be used to indent lines; tabs are not allowed
    Open

                switch ($format) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    case 'image':

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $thumbnail = '';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ( $format == 'image' && has_post_thumbnail() )

    Spaces must be used to indent lines; tabs are not allowed
    Open

            // Get things for the post types…

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return array(

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ( ! empty($categories) ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $categories = sprintf('<span class="screen-reader hidden">%s: </span><span class="post-meta-category">%s</span>',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'aside' => '&#61731;',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'image' => '&#62214;',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $symbols[$format];

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                ( $link ? $link : get_the_permalink() ),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $class = "image-post-with-thumbnail";

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ( ! $format || ! isset($symbols[$format]) || ! $symbols[$format] )

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ( ! is_single() && has_excerpt() )

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $content = self::get_text_for_archive_page();

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $content;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            __('Category', 'e.nigma-2015'),

    Spaces must be used to indent lines; tabs are not allowed
    Open

            private static function get_class($format, $class='') {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Line exceeds 120 characters; contains 170 characters
    Open

                        $meta = sprintf('<hr class="before_content" /><span class="screen-reader hidden">%s</span><span class="post-meta-date"><a href="%s">%s</a></span> %s',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            private static function get_text_for_archive_page() {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            sprintf(

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        );

    Inline control structures are not allowed
    Open

                if ($format == 'video' || $format == 'audio')

    Line exceeds 120 characters; contains 121 characters
    Open

                if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                get_the_title(),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                 get_the_date(),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    default:

    Inline control structures are not allowed
    Open

                if ( ! $format || ! isset($symbols[$format]) || ! $symbols[$format] )

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            private static function get_category_symbol($format) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $symbols = array(

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    default :

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    );

    Spaces must be used to indent lines; tabs are not allowed
    Open

            private static function get_thumbnail($format) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            private static function get_content($format) {

    Inline control structures are not allowed
    Open

                if ($format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ))

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    case 'link' :

    Spaces must be used to indent lines; tabs are not allowed
    Open

            private static function get_css($format, $css='') {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $meta = '';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $thumbnail;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                    __( 'Continue reading%s', 'e.nigma-2015' ),

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'audio' => '&#61735;',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                switch ($format) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $headline = '<h2><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></h2>';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $meta = sprintf('<hr class="before_content" /><span class="screen-reader hidden">%s</span><span class="post-meta-date"><a href="%s">%s</a></span> %s',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                )

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            $category->name,

    Inline control structures are not allowed
    Open

                if ( $format == 'image' && has_post_thumbnail() )

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ($format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ))

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'css' => self::get_css($format),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            $spacer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    return $categories;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $link = get_post_meta( get_the_ID(), '_format_link_url', true );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                 __('Published on:', 'e.nigma-2015'),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    return get_the_excerpt();

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return get_the_content(

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )

    Inline control structures are not allowed
    Open

                if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $css;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'content' => self::get_content($format)

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'status' => '&#61744;'

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $headline = sprintf('<h2><a href="%s">%s<span class="link_arrow">%s</span></a></h2>',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $meta;

    Inline control structures are not allowed
    Open

                if ( ! is_single() && has_excerpt() )

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    return '<img class="hide" src="'.$featured_image[0].'" alt="'.get_the_title().'" />' . $content;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        );

    Line exceeds 120 characters; contains 129 characters
    Open

                    $categories = sprintf('<span class="screen-reader hidden">%s: </span><span class="post-meta-category">%s</span>',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            $categories

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'link' => '&#61699;',

    Spaces must be used to indent lines; tabs are not allowed
    Open

            private static function get_meta($format) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                ( is_rtl() ? '&#x2190;' : '&#x2192;' )

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'category_symbol' => self::get_category_symbol($format),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $thumbnail = get_the_post_thumbnail();

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    return ( $oembed ? $oembed : get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ) ) . $content;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            public static function get_post_vars( $format = '' ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'meta' => self::get_meta($format),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'gallery' => '&#61793;',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'chat' => '&#61733;',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $headline;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    case 'quote' : case 'link' :

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                    '<span class="screen-reader hidden">  '.get_the_title().'</span>&hellip;'

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $categories .= sprintf('<a href="%s">%s</a>%s',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            get_category_link( $category->term_id ),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'video' => '&#62006;',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    default :

    Spaces must be used to indent lines; tabs are not allowed
    Open

                                 get_the_permalink(),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $oembed = wp_oembed_get(

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $class;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $css = "style=\"background-image: url('".$featured_image[0]."')\"";

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'headline' => self::get_headline($format),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'thumbnail' => self::get_thumbnail($format),

    Spaces must be used to indent lines; tabs are not allowed
    Open

                switch ($format) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            array( 'width' => 677 )

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ($format == 'video' || $format == 'audio')

    Line exceeds 120 characters; contains 123 characters
    Open

                    return ( $oembed ? $oembed : get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ) ) . $content;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'class' => self::get_class($format),

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (! $page) {

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    }

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if ($max_num_pages <= 1) {

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    }

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public static function pagebar($displayedpages=6) {

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    if ($page <= $displayedpages) {

    Opening brace should be on a new line
    Open

            public static function get_categories() {

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    } else {

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                } else {

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }

    Multi-line function call not indented correctly; expected 24 spaces but found 28
    Open

                                get_pagenum_link($i),

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                foreach ( $thecategories as $categorienumber => $category ) {

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if ($max_num_pages > $displayedpages) {

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    } elseif ($page >= $displayedpages && $page < ($max_num_pages - $roundedrange)) {

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }

    Expected 0 spaces before closing bracket; 1 found
    Open

                $numberofcategories = count( $thecategories );

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    if ( $categorienumber == $numberofcategories - 1 ) {

    Line indented incorrectly; expected 0 spaces, found 4
    Open

        class Content {

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }

    Multi-line function call not indented correctly; expected 24 spaces but found 28
    Open

                                $i

    Multi-line function call not indented correctly; expected 24 spaces but found 28
    Open

                                ($i == $page ? 'class="page active"' : 'class="page"'),

    Expected 0 spaces after opening bracket; 1 found
    Open

                foreach ( $thecategories as $categorienumber => $category ) {

    Opening brace should be on a new line
    Open

            public static function pagebar($displayedpages=6) {

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    } elseif ($page >= ($max_num_pages - $roundedrange)) {

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (! empty($min) && ! empty($max)) {

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    for ($i = $min; $i <= $max; $i++) {

    Opening parenthesis of a multi-line function call must be the last content on the line
    Open

                        echo sprintf(' <a href="%s" %s>%d</a>',

    Multi-line function call not indented correctly; expected 20 spaces but found 24
    Open

                            );

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }

    Expected 0 spaces after opening bracket; 1 found
    Open

                    if ( $categorienumber == $numberofcategories - 1 ) {

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    }

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public static function get_categories() {

    Space after opening parenthesis of function call prohibited
    Open

                $numberofcategories = count( $thecategories );

    Multi-line function call not indented correctly; expected 20 spaces but found 24
    Open

                            );

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                switch ($format) {

    Multi-line function call not indented correctly; expected 24 spaces but found 29
    Open

                                 get_the_permalink(),

    Multi-line function call not indented correctly; expected 20 spaces but found 24
    Open

                            );

    Multi-line function call not indented correctly; expected 28 spaces but found 32
    Open

                                    __( 'Continue reading%s', 'e.nigma-2015' ),

    Space after opening parenthesis of function call prohibited
    Open

                    return ( $oembed ? $oembed : get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ) ) . $content;

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( $format == 'image' && has_post_thumbnail() )

    Expected 0 spaces before closing bracket; 1 found
    Open

                            get_category_link( $category->term_id ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                        $link = get_post_meta( get_the_ID(), '_format_link_url', true );

    Multi-line function call not indented correctly; expected 12 spaces but found 20
    Open

                        );

    Expected 0 spaces before closing bracket; 1 found
    Open

                    return ( $oembed ? $oembed : get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ) ) . $content;

    Multi-line function call not indented correctly; expected 20 spaces but found 24
    Open

                            get_category_link( $category->term_id ),

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            private static function get_headline($format) {

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    default :

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Opening parenthesis of a multi-line function call must be the last content on the line
    Open

                    $categories = sprintf('<span class="screen-reader hidden">%s: </span><span class="post-meta-category">%s</span>',

    Space after opening parenthesis of function call prohibited
    Open

                        $link = get_post_meta( get_the_ID(), '_format_link_url', true );

    Opening parenthesis of a multi-line function call must be the last content on the line
    Open

                        $headline = sprintf('<h2><a href="%s">%s<span class="link_arrow">%s</span></a></h2>',

    Multi-line function call not indented correctly; expected 24 spaces but found 28
    Open

                                ( $link ? $link : get_the_permalink() ),

    Line indented incorrectly; expected 0 spaces, found 4
    Open

        }

    Multi-line function call not indented correctly; expected 24 spaces but found 29
    Open

                                 self::get_categories()

    Multi-line function call not indented correctly; expected 16 spaces but found 24
    Open

                            sprintf(

    Multi-line function call not indented correctly; expected 12 spaces but found 20
    Open

                        );

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    case 'quote' : case 'link' :

    Opening brace should be on a new line
    Open

            private static function get_text_for_archive_page() {

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( ! is_single() && has_excerpt() )

    Multi-line function call not indented correctly; expected 24 spaces but found 28
    Open

                                )

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            private static function get_content($format) {

    Space after opening parenthesis of function call prohibited
    Open

                if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )

    Opening brace should be on a new line
    Open

            public static function get_post_vars( $format = '' ) {

    Multi-line function call not indented correctly; expected 16 spaces but found 20
    Open

                        );

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( ! empty($categories) ) {

    Opening brace should be on a new line
    Open

            private static function get_category_symbol($format) {

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                switch ($format) {

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( ! $format || ! isset($symbols[$format]) || ! $symbols[$format] )

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public static function get_post_vars( $format = '' ) {

    Opening brace should be on a new line
    Open

            private static function get_meta($format) {

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Multi-line function call not indented correctly; expected 20 spaces but found 24
    Open

                            $spacer

    Opening brace should be on a new line
    Open

            private static function get_headline($format) {

    Multi-line function call not indented correctly; expected 24 spaces but found 28
    Open

                                get_the_title(),

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Space after opening parenthesis of function call prohibited
    Open

                if ($format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ))

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            private static function get_category_symbol($format) {

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            private static function get_thumbnail($format) {

    Opening brace should be on a new line
    Open

            private static function get_thumbnail($format) {

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            private static function get_text_for_archive_page() {

    Multi-line function call not indented correctly; expected 28 spaces but found 32
    Open

                                    '<span class="screen-reader hidden">  '.get_the_title().'</span>&hellip;'

    Opening brace should be on a new line
    Open

            private static function get_content($format) {

    Multi-line function call not indented correctly; expected 16 spaces but found 24
    Open

                            get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ),

    Opening brace should be on a new line
    Open

            private static function get_class($format, $class='') {

    Multi-line function call not indented correctly; expected 24 spaces but found 28
    Open

                                ( is_rtl() ? '&#x2190;' : '&#x2192;' )

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            private static function get_css($format, $css='') {

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    case 'link' :

    Space after opening parenthesis of function call prohibited
    Open

                            get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ),

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            private static function get_class($format, $class='') {

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )

    Space after opening parenthesis of function call prohibited
    Open

                            get_category_link( $category->term_id ),

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Opening parenthesis of a multi-line function call must be the last content on the line
    Open

                        $meta = sprintf('<hr class="before_content" /><span class="screen-reader hidden">%s</span><span class="post-meta-date"><a href="%s">%s</a></span> %s',

    Multi-line function call not indented correctly; expected 24 spaces but found 29
    Open

                                 __('Published on:', 'e.nigma-2015'),

    Expected 0 spaces before closing bracket; 1 found
    Open

                            get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ),

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    case 'image':

    Multi-line function call not indented correctly; expected 16 spaces but found 24
    Open

                            array( 'width' => 677 )

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Opening brace should be on a new line
    Open

            private static function get_css($format, $css='') {

    Multi-line function call not indented correctly; expected 16 spaces but found 20
    Open

                        );

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if ( ! empty($categories) ) {

    Multi-line function call not indented correctly; expected 20 spaces but found 24
    Open

                            $categories

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                switch ($format) {

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Opening parenthesis of a multi-line function call must be the last content on the line
    Open

                    $categories .= sprintf('<a href="%s">%s</a>%s',

    Multi-line function call not indented correctly; expected 20 spaces but found 24
    Open

                            __('Category', 'e.nigma-2015'),

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    default :

    Multi-line function call not indented correctly; expected 24 spaces but found 29
    Open

                                 get_the_date(),

    Space after opening parenthesis of function call prohibited
    Open

                                    __( 'Continue reading%s', 'e.nigma-2015' ),

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }

    Multi-line function call not indented correctly; expected 20 spaces but found 24
    Open

                            $category->name,

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            private static function get_meta($format) {

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    default:

    Expected 0 spaces before closing bracket; 1 found
    Open

                                    __( 'Continue reading%s', 'e.nigma-2015' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ($format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ))

    There are no issues that match your filters.

    Category
    Status