soderlind/my-permalink-demo

View on GitHub

Showing 16 of 16 total issues

Function exports has 148 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (grunt) {

    /**
     * Files added to WordPress SVN, don't include 'assets/**' here.
     * @type {Array}
Severity: Major
Found in Gruntfile.js - About 5 hrs to fix

    Array double arrow not aligned correctly; expected 1 space(s) between "'val'" and double arrow, but found 7.
    Open

                'val'       => 'lorem',
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    Found precision alignment of 1 spaces.
    Open

                 'my-permalink/(.*)$' => sprintf( 'index.php?my_permalink_variable_01=%s',$wp_rewrite->preg_index( 1 ) ),
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    Found precision alignment of 1 spaces.
    Open

                 'my-permalink/([^/]+)/([^.]+).html$' => sprintf("index.php?my_permalink_variable_01=%s&my_permalink_variable_02=%s",$wp_rewrite->preg_index(1),$wp_rewrite->preg_index(2))
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    Array item not aligned correctly; expected 12 spaces but found 13
    Open

                 'my-permalink/(.*)$' => sprintf( 'index.php?my_permalink_variable_01=%s',$wp_rewrite->preg_index( 1 ) ),
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    Found precision alignment of 1 spaces.
    Open

                 /*
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    Found precision alignment of 1 spaces.
    Open

                 // a more complex permalink:
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    Class file names should be based on the class name with "class-" prepended. Expected class-my-permalink.php, but found my-permalink-demo.php.
    Open

    <?php
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    No space found after comma in function call
    Open

                printf( '<pre>%s</pre>',print_r( $wp_query->query_vars,true ) );
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    No space found after comma in function call
    Open

                 'my-permalink/(.*)$' => sprintf( 'index.php?my_permalink_variable_01=%s',$wp_rewrite->preg_index( 1 ) ),
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    No space found after comma in function call
    Open

                return sprintf( '%s/my-permalink/%s',home_url(),$val );
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    No space found after comma in function call
    Open

                return sprintf( '%s/index.php?my_permalink_variable_01=%s',home_url(),$val );
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    No space found after comma in function call
    Open

                return sprintf( '%s/index.php?my_permalink_variable_01=%s',home_url(),$val );
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    No space found after comma in function call
    Open

                printf( '<pre>%s</pre>',print_r( $wp_query->query_vars,true ) );
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    No space found after comma in function call
    Open

            return sprintf( '<a href="%s">My permalink</a>',$this->my_permalink_url( $atts['val'] ) );
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer

    No space found after comma in function call
    Open

                return sprintf( '%s/my-permalink/%s',home_url(),$val );
    Severity: Minor
    Found in my-permalink-demo.php by phpcodesniffer
    Severity
    Category
    Status
    Source
    Language