chemiker/e.nigma-2015

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

Summary

Maintainability
A
0 mins
Test Coverage

Method name "Helper::add_next_and_number" is not in camel caps format
Open

        public static function add_next_and_number($args){

Expected 0 spaces before closing bracket; 1 found
Open

            if ( $i <= $numpages ) {

Expected 0 spaces before closing bracket; 1 found
Open

            if ( ! $multipage || ! $more || $args['next_or_number'] !== 'next_and_number' )

The closing brace for the class must go on the next line after the body
Open

    }

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

    class Helper {

Line exceeds 120 characters; contains 130 characters
Open

        // Originally found at http://www.velvetblues.com/web-development-blog/wordpress-number-next-previous-links-wp_link_pages/

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

        }

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

            $args['next_or_number'] = 'number';

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

            $prev .= $args['link_before']. $args['previouspagelink'] . $args['link_after'] . '</a>';

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

                $next .= _wp_link_page($i);

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

                return $args;

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

            return $args;

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

            global $page, $numpages, $multipage, $more;

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

    class Helper {

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

            if ( ! $multipage || ! $more || $args['next_or_number'] !== 'next_and_number' )

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

            $i = $page - 1;

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

            }

Inline control structures are not allowed
Open

            if ( ! $multipage || ! $more || $args['next_or_number'] !== 'next_and_number' )

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

            $i = $page + 1;

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

        public static function add_next_and_number($args){

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

            $prev .= _wp_link_page($i);

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

            $args['after'] = $next . $args['after'];    

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

        // Add Next and number hack

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

            $args['before'] = $args['before'] . ( $page == 1 ? '' : $prev );

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 found at http://www.velvetblues.com/web-development-blog/wordpress-number-next-previous-links-wp_link_pages/

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

            $prev = $next = '';

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

            if ( $i <= $numpages ) {

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

                $next .= $args['link_before']. $args['nextpagelink'] . $args['link_after'] . '</a>';

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

    }

Expected 1 newline at end of file; 0 found
Open

    }

Line indented incorrectly; expected 4 spaces, found 8
Open

        public static function add_next_and_number($args){

Line indented incorrectly; expected 8 spaces, found 12
Open

            }

Line indented incorrectly; expected 4 spaces, found 8
Open

        }

Expected 0 spaces after opening bracket; 1 found
Open

            if ( ! $multipage || ! $more || $args['next_or_number'] !== 'next_and_number' )

Expected 0 spaces after opening bracket; 1 found
Open

            if ( $i <= $numpages ) {

Whitespace found at end of line
Open

            $args['after'] = $next . $args['after'];    

Line indented incorrectly; expected 0 spaces, found 4
Open

    class Helper {

Line indented incorrectly; expected 8 spaces, found 12
Open

            if ( $i <= $numpages ) {

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Opening brace should be on a new line
Open

        public static function add_next_and_number($args){

There are no issues that match your filters.

Category
Status