PressLabs/gitium

View on GitHub
gitium/inc/class-gitium-submenu-commits.php

Summary

Maintainability
A
1 hr
Test Coverage

Method page has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function page() {
        ?>
        <div class="wrap">
        <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
        <table class="wp-list-table widefat plugins">
Severity: Minor
Found in gitium/inc/class-gitium-submenu-commits.php - About 1 hr to fix

    Avoid using undefined variables such as '$committer_email' which will lead to PHP notices.
    Open

                    $committers_avatar = '<div style="position:absolute; left:30px; border: 1px solid white; background:white; height:17px; top:30px; border-radius:2px">' . get_avatar( $committer_email, 16 ) . '</div>';

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$author_date' which will lead to PHP notices.
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$committer_name' which will lead to PHP notices.
    Open

                unset( $committer_name );

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$committer_email' which will lead to PHP notices.
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$author_email' which will lead to PHP notices.
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$subject' which will lead to PHP notices.
    Open

                    <div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$author_name' which will lead to PHP notices.
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$committer_date' which will lead to PHP notices.
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$committer_name' which will lead to PHP notices.
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$author_email' which will lead to PHP notices.
    Open

                    <div style="float:left; width:auto; height:auto; padding-left:2px; padding-right:5px; padding-top:2px; margin-right:5px; border-radius:2px"><?php echo get_avatar( $author_email, 32 ); ?></div>

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$committer_name' which will lead to PHP notices.
    Open

                if ( isset( $committer_name ) ) {

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Missing class import via use statement (line '34', column '7').
    Open

            new Gitium_Help( $submenu_hook, 'commits' );

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    The method page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                } else {
                    $committer = '';
                    $committers_avatar = '';
                }

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid unused local variables such as '$author_date'.
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$author_name'.
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$committer_date'.
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$subject'.
    Open

                    <div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Each class must be in a namespace of at least one level (a top-level vendor name)
    Open

    class Gitium_Submenu_Commits extends Gitium_Menu {

    The class Gitium_Submenu_Commits is not named in CamelCase.
    Open

    class Gitium_Submenu_Commits extends Gitium_Menu {
    
        public function __construct() {
            parent::__construct( $this->gitium_menu_slug, $this->commits_menu_slug );
            add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );

    CamelCaseClassName

    Since: 0.2

    It is considered best practice to use the CamelCase notation to name classes.

    Example

    class class_name {
    }

    Source

    Space found before closing bracket of FOREACH loop
    Open

            foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( isset( $committer_name ) ) {

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

    class Gitium_Submenu_Commits extends Gitium_Menu {

    Method name "Gitium_Submenu_Commits::admin_menu" is not in camel caps format
    Open

        public function admin_menu() {

    Method name "Gitium_Submenu_Commits::table_start_row" is not in camel caps format
    Open

        public function table_start_row() {

    Space found after opening bracket of FOREACH loop
    Open

            foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {

    Method name "Gitium_Submenu_Commits::table_head" is not in camel caps format
    Open

        public function table_head() {

    Method name "Gitium_Submenu_Commits::table_end_row" is not in camel caps format
    Open

        public function table_end_row() {

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

            add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );

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

        }

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

            <table class="wp-list-table widefat plugins">

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

                GITIUM_MANAGE_OPTIONS_CAPABILITY,

    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

                    <div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />

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

                $this->menu_slug,

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

            );

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

            $counter++;

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

            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>

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

            <thead>

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

        public function page() {

    Line exceeds 120 characters; contains 200 characters
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

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

            </tbody>

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

            static $counter = 0;

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

                    $committers_avatar = '';

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

            </div>

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

        public function table_head() {

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

                <th scope="col"><?php _e( 'Commits', 'gitium' ); ?></th>

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

                extract( $data );

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

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

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

        public function __construct() {

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

                </td>

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

        }

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

                $this->table_end_row();

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

            }

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

        public function admin_menu() {

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

                __( 'Commits', 'gitium' ),

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

            <?php $this->table_head(); ?>

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

                    $committer = '';

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

            echo '</tr>';

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

        }

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

            <tr>

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

            foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {

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

            echo ( 0 != $counter % 2 ) ? '<tr class="active">' : '<tr class="inactive">';

    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

                $this->table_start_row();

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

            ?>

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

            <?php

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

                __( 'Git Commits', 'gitium' ),

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

            </thead>

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

                <td style="position:relative">

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

                    <?php echo $committers_avatar; ?>

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

                <td><p style="padding-top:8px"><?php echo $commit_id; ?></p></td>

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

            <?php

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

            $submenu_hook = add_submenu_page(

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

                array( $this, 'page' )

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

            new Gitium_Help( $submenu_hook, 'commits' );

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

                <th scope="col"></th>

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

                unset( $committer_name );

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

                ?>

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

                $this->submenu_slug,

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

        }

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

        public function table_start_row() {

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

            <div class="wrap">

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

            <tbody>

    Line exceeds 120 characters; contains 215 characters
    Open

                    $committers_avatar = '<div style="position:absolute; left:30px; border: 1px solid white; background:white; height:17px; top:30px; border-radius:2px">' . get_avatar( $committer_email, 16 ) . '</div>';

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

                }

    Line exceeds 120 characters; contains 124 characters
    Open

                    <div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />

    Line exceeds 120 characters; contains 247 characters
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Line exceeds 120 characters; contains 208 characters
    Open

                    <div style="float:left; width:auto; height:auto; padding-left:2px; padding-right:5px; padding-top:2px; margin-right:5px; border-radius:2px"><?php echo get_avatar( $author_email, 32 ); ?></div>

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

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

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

            </table>

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

        }

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

            parent::__construct( $this->gitium_menu_slug, $this->commits_menu_slug );

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

            ?>

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

            <?php

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

            <?php

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

                if ( isset( $committer_name ) ) {

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

            </tr>

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

        public function table_end_row() {

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

                    $committers_avatar = '<div style="position:absolute; left:30px; border: 1px solid white; background:white; height:17px; top:30px; border-radius:2px">' . get_avatar( $committer_email, 16 ) . '</div>';

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

                    <div style="float:left; width:auto; height:auto; padding-left:2px; padding-right:5px; padding-top:2px; margin-right:5px; border-radius:2px"><?php echo get_avatar( $author_email, 32 ); ?></div>

    Class name "Gitium_Submenu_Commits" is not in camel caps format
    Open

    class Gitium_Submenu_Commits extends Gitium_Menu {

    Space after opening parenthesis of function call prohibited
    Open

                __( 'Commits', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( isset( $committer_name ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    Opening brace should be on a new line
    Open

        public function table_head() {

    Opening brace should be on a new line
    Open

        public function table_start_row() {

    Space after opening parenthesis of function call prohibited
    Open

            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>

    Space after opening parenthesis of function call prohibited
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    Space after opening parenthesis of function call prohibited
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Opening brace should be on a new line
    Open

        public function admin_menu() {

    Expected 0 spaces before closing bracket; 1 found
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    Expected 0 spaces before closing bracket; 1 found
    Open

                __( 'Commits', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                <th scope="col"><?php _e( 'Commits', 'gitium' ); ?></th>

    Expected 0 spaces before closing bracket; 1 found
    Open

            parent::__construct( $this->gitium_menu_slug, $this->commits_menu_slug );

    Expected 0 spaces before closing bracket; 1 found
    Open

                __( 'Git Commits', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>

    Space after opening parenthesis of function call prohibited
    Open

            foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {

    Space after opening parenthesis of function call prohibited
    Open

                unset( $committer_name );

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Opening brace should be on a new line
    Open

        public function __construct() {

    Space after opening parenthesis of function call prohibited
    Open

                __( 'Git Commits', 'gitium' ),

    Expected 0 spaces after opening bracket; 1 found
    Open

            foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {

    Space after opening parenthesis of function call prohibited
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Space after opening parenthesis of function call prohibited
    Open

                    <div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />

    Space after opening parenthesis of function call prohibited
    Open

                <th scope="col"><?php _e( 'Commits', 'gitium' ); ?></th>

    Opening brace should be on a new line
    Open

        public function page() {

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Space after opening parenthesis of function call prohibited
    Open

            new Gitium_Help( $submenu_hook, 'commits' );

    Space after opening parenthesis of function call prohibited
    Open

            add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );

    Opening brace should be on a new line
    Open

        public function table_end_row() {

    Expected 0 spaces before closing bracket; 1 found
    Open

            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>

    Space after opening parenthesis of function call prohibited
    Open

            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>

    Space after opening parenthesis of function call prohibited
    Open

                if ( isset( $committer_name ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                    $committers_avatar = '<div style="position:absolute; left:30px; border: 1px solid white; background:white; height:17px; top:30px; border-radius:2px">' . get_avatar( $committer_email, 16 ) . '</div>';

    Expected 0 spaces before closing bracket; 1 found
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <div style="float:left; width:auto; height:auto; padding-left:2px; padding-right:5px; padding-top:2px; margin-right:5px; border-radius:2px"><?php echo get_avatar( $author_email, 32 ); ?></div>

    Space after opening parenthesis of function call prohibited
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Space after opening parenthesis of function call prohibited
    Open

            parent::__construct( $this->gitium_menu_slug, $this->commits_menu_slug );

    Expected 0 spaces before closing bracket; 1 found
    Open

            add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );

    Space after opening parenthesis of function call prohibited
    Open

                extract( $data );

    Expected 0 spaces before closing bracket; 1 found
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    Expected 0 spaces before closing bracket; 1 found
    Open

                    $committers_avatar = '<div style="position:absolute; left:30px; border: 1px solid white; background:white; height:17px; top:30px; border-radius:2px">' . get_avatar( $committer_email, 16 ) . '</div>';

    Expected 0 spaces before closing bracket; 1 found
    Open

            new Gitium_Help( $submenu_hook, 'commits' );

    Space after opening parenthesis of function call prohibited
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    Space after opening parenthesis of function call prohibited
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />

    Space after opening parenthesis of function call prohibited
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Expected 0 spaces before closing bracket; 1 found
    Open

                unset( $committer_name );

    Expected 0 spaces before closing bracket; 1 found
    Open

                    $committer         = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';

    Space after opening parenthesis of function call prohibited
    Open

                    <div style="float:left; width:auto; height:auto; padding-left:2px; padding-right:5px; padding-top:2px; margin-right:5px; border-radius:2px"><?php echo get_avatar( $author_email, 32 ); ?></div>

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( isset( $committer_name ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Space after opening parenthesis of function call prohibited
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>

    Expected 0 spaces before closing bracket; 1 found
    Open

            foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                extract( $data );

    The variable $submenu_hook is not named in camelCase.
    Open

        public function admin_menu() {
            $submenu_hook = add_submenu_page(
                $this->menu_slug,
                __( 'Git Commits', 'gitium' ),
                __( 'Commits', 'gitium' ),

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $author_email is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $committers_avatar is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $author_date is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $committer_name is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $committer_date is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $committers_avatar is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $committers_avatar is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $committer_email is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $committer_email is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $commit_id is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $committer_name is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $author_email is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $committer_name is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $commit_id is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $submenu_hook is not named in camelCase.
    Open

        public function admin_menu() {
            $submenu_hook = add_submenu_page(
                $this->menu_slug,
                __( 'Git Commits', 'gitium' ),
                __( 'Commits', 'gitium' ),

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $author_name is not named in camelCase.
    Open

        public function page() {
            ?>
            <div class="wrap">
            <h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
            <table class="wp-list-table widefat plugins">

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The method table_head is not named in camelCase.
    Open

        public function table_head() {
            ?>
            <thead>
            <tr>
                <th scope="col"><?php _e( 'Commits', 'gitium' ); ?></th>

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method table_end_row is not named in camelCase.
    Open

        public function table_end_row() {
            echo '</tr>';
        }

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method admin_menu is not named in camelCase.
    Open

        public function admin_menu() {
            $submenu_hook = add_submenu_page(
                $this->menu_slug,
                __( 'Git Commits', 'gitium' ),
                __( 'Commits', 'gitium' ),

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method table_start_row is not named in camelCase.
    Open

        public function table_start_row() {
            static $counter = 0;
            $counter++;
            echo ( 0 != $counter % 2 ) ? '<tr class="active">' : '<tr class="inactive">';
        }

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status