PressLabs/gitium

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

Summary

Maintainability
B
4 hrs
Test Coverage

Method show_git_changes_table_rows has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function show_git_changes_table_rows( $changes = '' ) {
        ?>
        <script type="application/javascript">
        function add_path_and_submit( elem ) {
            var container = document.getElementById( 'form_status' );
Severity: Minor
Found in gitium/inc/class-gitium-submenu-status.php - About 1 hr to fix

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

            new Gitium_Help( $submenu_hook, 'status' );

    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 save_ignorelist uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );
            }

    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

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

                } else {
                    echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';
                }

    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

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

            } else {
                $path = $gitium_ignore_path;
            }

    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

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

            else :
                $this->show_git_changes_table_rows( $changes );
            endif;

    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

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        public function admin_menu() {
            add_menu_page(
                __( 'Git Status', 'gitium' ),
                'Gitium',
                GITIUM_MANAGE_OPTIONS_CAPABILITY,
    Severity: Major
    Found in gitium/inc/class-gitium-submenu-status.php and 1 other location - About 3 hrs to fix
    gitium/inc/class-gitium-submenu-configure.php on lines 33..52

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 144.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    class Gitium_Submenu_Status extends Gitium_Menu {

    The class Gitium_Submenu_Status is not named in CamelCase.
    Open

    class Gitium_Submenu_Status extends Gitium_Menu {
    
        public function __construct() {
            parent::__construct( $this->gitium_menu_slug, $this->gitium_menu_slug );
    
    

    CamelCaseClassName

    Since: 0.2

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

    Example

    class class_name {
    }

    Source

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

    class Gitium_Submenu_Status extends Gitium_Menu {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $gitium_ignore_path ) ) {

    Method name "Gitium_Submenu_Status::save_ignorelist" is not in camel caps format
    Open

        public function save_ignorelist() {

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

        public function admin_menu() {

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

        private function show_ahead_and_behind_info( $changes = '' ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( $ahead && $behind ) {

    Method name "Gitium_Submenu_Status::get_change_meanings" is not in camel caps format
    Open

        private function get_change_meanings() {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $gitium_save_changes ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( isset( $meaning[ $change ] ) ) {

    Method name "Gitium_Submenu_Status::humanized_change" is not in camel caps format
    Open

        public function humanized_change( $change ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( 0 === strpos( $change, 'R ' ) ) {

    Method name "Gitium_Submenu_Status::show_git_changes_table_rows" is not in camel caps format
    Open

        private function show_git_changes_table_rows( $changes = '' ) {

    Method name "Gitium_Submenu_Status::save_changes" is not in camel caps format
    Open

        public function save_changes() {

    Method name "Gitium_Submenu_Status::show_git_changes_table_submit_buttons" is not in camel caps format
    Open

        private function show_git_changes_table_submit_buttons( $changes ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            } elseif ( $ahead ) {

    Space found before closing bracket of FOREACH loop
    Open

            foreach ( $changes as $path => $type ) :

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

        private function show_git_changes_table( $changes = '' ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {

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

        private function show_ahead_and_behind_info( $changes = '' ) {

    Space found after opening bracket of FOREACH loop
    Open

            foreach ( $changes as $path => $type ) :

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

        private function show_git_changes_table_rows( $changes = '' ) {

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

        private function show_git_changes_table( $changes = '' ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Method name "Gitium_Submenu_Status::show_ahead_and_behind_info" is not in camel caps format
    Open

        private function show_ahead_and_behind_info( $changes = '' ) {

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

        private function show_git_changes_table_submit_buttons( $changes ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! $merge_success ) {

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

        private function show_git_changes_table_rows( $changes = '' ) {

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

        public function humanized_change( $change ) {

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

        public function humanized_change( $change ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule

    Method name "Gitium_Submenu_Status::show_git_changes_table" is not in camel caps format
    Open

        private function show_git_changes_table( $changes = '' ) {

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

        private function show_git_changes_table_submit_buttons( $changes ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! $commit ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( empty( $changes ) ) :

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! $ahead && ! $behind && empty( $changes ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            foreach ( $changes as $path => $type ) :

    Expected 0 spaces before closing bracket; 1 found
    Open

            } elseif ( $behind ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! empty( $changes ) ) : ?>

    Method name "Gitium_Submenu_Status::changes_page" is not in camel caps format
    Open

        private function changes_page() {

    Expected 0 spaces before closing bracket; 1 found
    Open

                <input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>&nbsp;

    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

                add_action( 'admin_init', array( $this, 'disconnect_repository' ) );

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

                'Gitium',

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

                'rA' => __( 'added to remote', 'gitium' ),

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

                'A'  => __( 'added to work tree', 'gitium' ),

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

                __( 'Git Status', 'gitium' ),

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

            if ( isset( $meaning[ $change ] ) ) {

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

                __( 'Git Status', 'gitium' ),

    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

        public function admin_menu() {

    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

            );

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

        public function save_ignorelist() {

    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

                add_action( 'admin_init', array( $this, 'save_changes' ) );

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

            }

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

                'rD' => __( 'deleted from remote', 'gitium' ),

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

            $meaning = $this->get_change_meanings();

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

            }

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

            $gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

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

                $path = $gitium_ignore_path;

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

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

    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

        }

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

        public function humanized_change( $change ) {

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

            }

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

                $commitmsg = $gitium_commit_msg;

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

            if ( ! $commit ) {

    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

                'rM' => __( 'modified on remote', 'gitium' ),

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

            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

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

        private function show_ahead_and_behind_info( $changes = '' ) {

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

            $branch = $this->git->get_remote_tracking_branch();

    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

                'M'  => __( 'updated in work tree', 'gitium' ),

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

                'AM' => __( 'added to work tree', 'gitium' ),

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

                $this->success_redirect( __( 'The file `.gitignore` is saved!', 'gitium' ), $this->gitium_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

            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

    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->git->add();

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

            if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {

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

            ?>&nbsp;<?php

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

                input.value   = elem;

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

                echo '<td><strong>' . esc_html( $path ) . '</strong>';

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

        private function show_git_changes_table( $changes = '' ) {

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

                plugins_url( 'img/gitium.png', dirname( __FILE__ ) )

    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->menu_slug,

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

                'R'  => __( 'deleted from work tree', 'gitium' ),

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

        }

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

            add_menu_page(

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

                gitium_commit_and_push_gitignore_file( $path );

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

                '??' => __( 'untracked', 'gitium' ),

    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

                return $meaning[ $change ];

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

            if ( 0 === strpos( $change, 'R ' ) ) {

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

            $commit = $this->git->commit( $commitmsg, $current_user->display_name, $current_user->user_email );

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

                $change = sprintf( __( 'renamed from `%s`', 'gitium' ), $old_filename );

    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

            }

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

        }

    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

            <table class="widefat" id="git-changes-table">

    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->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );

    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

            gitium_enable_maintenance_mode() or wp_die( __( 'Could not enable the maintenance mode!', 'gitium' ) );

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

                echo '</p></td></tr>';

    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

            <p>

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

            if ( ! empty( $changes ) ) : ?>

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

            }

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

            } elseif ( $ahead ) {

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

                input.name    = 'GitiumIgnorePath';

    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

            function add_path_and_submit( elem ) {

    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

            </table>

    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

                $this->show_git_changes_table_rows( $changes );

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

            if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {

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

            new Gitium_Help( $submenu_hook, 'status' );

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

        private function get_change_meanings() {

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

                'D'  => __( 'deleted from work tree', 'gitium' ),

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

            return $change;

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

            $current_user = wp_get_current_user();

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

            if ( ! $merge_success ) {

    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

                var input     = document.createElement( 'input' );

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

                container.submit();

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

                    _e( 'Submodules are not supported in this version.', 'gitium' );

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

                    echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';

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

                echo '</td>';

    Line exceeds 120 characters; contains 184 characters
    Open

            <thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>

    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

            $this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );

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

            </p>

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

                input.type    = 'hidden';

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

            ?>

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

                add_action( 'admin_init', array( $this, 'save_ignorelist' ) );

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

                $old_filename = substr( $change, 2 );

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

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

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

            if ( ! isset( $gitium_save_changes ) ) {

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

            gitium_disable_maintenance_mode();

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

            $behind = count( $this->git->get_behind_commits() );

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

            }

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

                echo '<td>';

    Line exceeds 120 characters; contains 184 characters
    Open

            <tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>

    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

                __( 'Status', 'gitium' ),

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

            check_admin_referer( 'gitium-admin' );

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

                $this->redirect( __( 'Merge failed: ', 'gitium' ) . $this->git->get_last_error() );

    Line exceeds 120 characters; contains 122 characters
    Open

                    echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';

    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

                array( $this, 'page' )

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

            check_admin_referer( 'gitium-admin' );

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

            $merge_success = gitium_merge_and_push( $commit );

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

            $ahead  = count( $this->git->get_ahead_commits() );

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

                <?php printf( __( 'Following remote branch <code>%s</code>.', 'gitium' ), $branch );

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

            if ( ! $ahead && ! $behind && empty( $changes ) ) {

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

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

    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

                _e( 'Nothing to commit, working directory clean.', 'gitium' );

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

            if ( ! isset( $gitium_ignore_path ) ) {

    Line exceeds 120 characters; contains 151 characters
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    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

            }

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

        }

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

            </script>

    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

                printf( __( 'You are %s commits ahead remote.', 'gitium' ), $ahead );

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

            }

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

                var container = document.getElementById( 'form_status' );

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

            else :

    Line exceeds 120 characters; contains 123 characters
    Open

                $this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_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

                $this->redirect( __( 'Could not commit!', 'gitium' ) );

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

            if ( $ahead && $behind ) {

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

                printf( __( 'You are %s commits ahead and %s behind remote.', 'gitium' ), $ahead, $behind );

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

            $counter = 0;

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

                echo '<div class="row-actions"><span class="edit"><a href="#" onclick="add_path_and_submit(\'' . $path . '\');">' . __( 'Add this file to the `.gitignore` list.', 'gitium' ) . '</a></span></div></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

            endforeach;

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

            endif;

    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

            $commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );

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

            ?>

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

                container.appendChild( input );

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

        private function show_git_changes_table_submit_buttons( $changes ) {

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

        public function save_changes() {

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

            }

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

                _e( 'Everything is up to date', 'gitium' );

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

                printf( __( 'You are %s commits behind remote.', 'gitium' ), $behind );

    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 function show_git_changes_table_rows( $changes = '' ) {

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

            foreach ( $changes as $path => $type ) :

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

            } elseif ( $behind ) {

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

            <script type="application/javascript">

    Line exceeds 120 characters; contains 213 characters
    Open

                echo '<div class="row-actions"><span class="edit"><a href="#" onclick="add_path_and_submit(\'' . $path . '\');">' . __( 'Add this file to the `.gitignore` list.', 'gitium' ) . '</a></span></div></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

                if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule

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

            <thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>

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

            <tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>

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

            if ( empty( $changes ) ) :

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

                echo '<tr><td><p>';

    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 page() {

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

        }

    Line exceeds 120 characters; contains 245 characters
    Open

                <input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>&nbsp;

    Line exceeds 120 characters; contains 248 characters
    Open

            <h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>

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

                wp_nonce_field( 'gitium-admin' );

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

            list( , $changes ) = _gitium_status();

    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

            </form>

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

                <p>

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

            <form name="form_status" id="form_status" action="" method="POST">

    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

            $this->show_message();

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

                <label for="save-changes"><?php _e( 'Commit message', 'gitium' ); ?>:</label>

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

                <input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />

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

                </p>

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

            <?php endif;

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

                </p>

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

            <div id="icon-options-general" class="icon32">&nbsp;</div>

    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

            ?>

    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

        }

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

                <p>

    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->show_ahead_and_behind_info( $changes );

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

                $this->show_git_changes_table( $changes );

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

                $this->show_git_changes_table_submit_buttons( $changes );

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

        private function changes_page() {

    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->show_disconnect_repository_button();

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

                <input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>&nbsp;

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

            _gitium_status( true );

    Line exceeds 120 characters; contains 207 characters
    Open

                <input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />

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

            <h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>

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

            $this->changes_page();

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

            <?php

    Expected 0 spaces before closing bracket; 1 found
    Open

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

    Space after opening parenthesis of function call prohibited
    Open

                add_action( 'admin_init', array( $this, 'save_changes' ) );

    Space after opening parenthesis of function call prohibited
    Open

                add_action( 'admin_init', array( $this, 'disconnect_repository' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                add_action( 'admin_init', array( $this, 'save_ignorelist' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                __( 'Git Status', 'gitium' ),

    Space after opening parenthesis of function call prohibited
    Open

                __( 'Git Status', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

            new Gitium_Help( $submenu_hook, 'status' );

    Space after opening parenthesis of function call prohibited
    Open

                'rM' => __( 'modified on remote', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                'A'  => __( 'added to work tree', 'gitium' ),

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( 0 === strpos( $change, 'R ' ) ) {

    Space after opening parenthesis of function call prohibited
    Open

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

    Space after opening parenthesis of function call prohibited
    Open

                plugins_url( 'img/gitium.png', dirname( __FILE__ ) )

    Expected 0 spaces before closing bracket; 1 found
    Open

                $change = sprintf( __( 'renamed from `%s`', 'gitium' ), $old_filename );

    Space after opening parenthesis of function call prohibited
    Open

            if ( isset( $meaning[ $change ] ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( isset( $meaning[ $change ] ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                $this->success_redirect( __( 'The file `.gitignore` is saved!', 'gitium' ), $this->gitium_menu_slug );

    Expected 0 spaces before closing bracket; 1 found
    Open

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

    Expected 0 spaces before closing bracket; 1 found
    Open

                plugins_url( 'img/gitium.png', dirname( __FILE__ ) )

    Space after opening parenthesis of function call prohibited
    Open

                'rA' => __( 'added to remote', 'gitium' ),

    Opening brace should be on a new line
    Open

        public function humanized_change( $change ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( isset( $meaning[ $change ] ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            check_admin_referer( 'gitium-admin' );

    Space after opening parenthesis of function call prohibited
    Open

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

    Space after opening parenthesis of function call prohibited
    Open

                'M'  => __( 'updated in work tree', 'gitium' ),

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! isset( $gitium_ignore_path ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

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

    class Gitium_Submenu_Status extends Gitium_Menu {

    Expected 0 spaces before closing bracket; 1 found
    Open

                add_action( 'admin_init', array( $this, 'disconnect_repository' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                __( 'Status', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                add_action( 'admin_init', array( $this, 'save_changes' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                plugins_url( 'img/gitium.png', dirname( __FILE__ ) )

    Expected 0 spaces before closing bracket; 1 found
    Open

                '??' => __( 'untracked', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                'rA' => __( 'added to remote', 'gitium' ),

    Space after opening parenthesis of function call prohibited
    Open

            if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            $commit = $this->git->commit( $commitmsg, $current_user->display_name, $current_user->user_email );

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Could not commit!', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Merge failed: ', 'gitium' ) . $this->git->get_last_error() );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                <?php printf( __( 'Following remote branch <code>%s</code>.', 'gitium' ), $branch );

    Expected 0 spaces before closing bracket; 1 found
    Open

                _e( 'Everything is up to date', 'gitium' );

    Expected 0 spaces before closing bracket; 1 found
    Open

                printf( __( 'You are %s commits ahead remote.', 'gitium' ), $ahead );

    Space after opening parenthesis of function call prohibited
    Open

                plugins_url( 'img/gitium.png', dirname( __FILE__ ) )

    Expected 0 spaces before closing bracket; 1 found
    Open

                'R'  => __( 'deleted from work tree', 'gitium' ),

    Opening brace should be on a new line
    Open

        public function save_ignorelist() {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! isset( $gitium_ignore_path ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Opening brace should be on a new line
    Open

        public function save_changes() {

    Space after opening parenthesis of function call prohibited
    Open

            gitium_enable_maintenance_mode() or wp_die( __( 'Could not enable the maintenance mode!', 'gitium' ) );

    Space after opening parenthesis of function call prohibited
    Open

            if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                _e( 'Everything is up to date', 'gitium' );

    Opening brace should be on a new line
    Open

        public function __construct() {

    Space after opening parenthesis of function call prohibited
    Open

                'A'  => __( 'added to work tree', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                'AM' => __( 'added to work tree', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            $commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );

    Space after opening parenthesis of function call prohibited
    Open

            $this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );

    Space after opening parenthesis of function call prohibited
    Open

            $this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );

    Opening brace should be on a new line
    Open

        private function show_ahead_and_behind_info( $changes = '' ) {

    Space after opening parenthesis of function call prohibited
    Open

                <?php printf( __( 'Following remote branch <code>%s</code>.', 'gitium' ), $branch );

    Space after opening parenthesis of function call prohibited
    Open

                printf( __( 'You are %s commits behind remote.', 'gitium' ), $behind );

    Space after opening parenthesis of function call prohibited
    Open

                if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule

    Space after opening parenthesis of function call prohibited
    Open

                '??' => __( 'untracked', 'gitium' ),

    Space after opening parenthesis of function call prohibited
    Open

                'AM' => __( 'added to work tree', 'gitium' ),

    Space after opening parenthesis of function call prohibited
    Open

            if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            if ( 0 === strpos( $change, 'R ' ) ) {

    Opening brace should be on a new line
    Open

        public function admin_menu() {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                'D'  => __( 'deleted from work tree', 'gitium' ),

    Space after opening parenthesis of function call prohibited
    Open

            $commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );

    Space after opening parenthesis of function call prohibited
    Open

            $commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                'M'  => __( 'updated in work tree', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

            $commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $old_filename = substr( $change, 2 );

    Expected 0 spaces before closing bracket; 1 found
    Open

                printf( __( 'You are %s commits behind remote.', 'gitium' ), $behind );

    Space after opening parenthesis of function call prohibited
    Open

                $change = sprintf( __( 'renamed from `%s`', 'gitium' ), $old_filename );

    Space after opening parenthesis of function call prohibited
    Open

                $change = sprintf( __( 'renamed from `%s`', 'gitium' ), $old_filename );

    Expected 0 spaces before closing bracket; 1 found
    Open

                    echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';

    Space after opening parenthesis of function call prohibited
    Open

            check_admin_referer( 'gitium-admin' );

    Space after opening parenthesis of function call prohibited
    Open

            <thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>

    Space after opening parenthesis of function call prohibited
    Open

            check_admin_referer( 'gitium-admin' );

    Space after opening parenthesis of function call prohibited
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            <tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>

    Expected 0 spaces before closing bracket; 1 found
    Open

            check_admin_referer( 'gitium-admin' );

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Merge failed: ', 'gitium' ) . $this->git->get_last_error() );

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Could not commit!', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $merge_success = gitium_merge_and_push( $commit );

    Line indented incorrectly; expected 0 spaces, found 8
    Open

            if ( $ahead && $behind ) {

    Space after opening parenthesis of function call prohibited
    Open

                printf( __( 'You are %s commits ahead remote.', 'gitium' ), $ahead );

    Line indented incorrectly; expected 0 spaces, found 8
    Open

            } elseif ( $behind ) {

    Space after opening parenthesis of function call prohibited
    Open

                    _e( 'Submodules are not supported in this version.', 'gitium' );

    Space after opening parenthesis of function call prohibited
    Open

                echo '<td><strong>' . esc_html( $path ) . '</strong>';

    Expected 0 spaces before closing bracket; 1 found
    Open

                _e( 'Nothing to commit, working directory clean.', 'gitium' );

    Space after opening parenthesis of function call prohibited
    Open

                    echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';

    Expected 0 spaces before closing bracket; 1 found
    Open

                    echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';

    Expected 0 spaces before closing bracket; 1 found
    Open

                    echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {

    Opening brace should be on a new line
    Open

        private function get_change_meanings() {

    Space after opening parenthesis of function call prohibited
    Open

                'rD' => __( 'deleted from remote', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                'D'  => __( 'deleted from work tree', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );

    Expected 0 spaces before closing bracket; 1 found
    Open

            gitium_enable_maintenance_mode() or wp_die( __( 'Could not enable the maintenance mode!', 'gitium' ) );

    Expected 0 spaces after opening bracket; 1 found
    Open

            } elseif ( $ahead ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                echo '<div class="row-actions"><span class="edit"><a href="#" onclick="add_path_and_submit(\'' . $path . '\');">' . __( 'Add this file to the `.gitignore` list.', 'gitium' ) . '</a></span></div></td>';

    Opening brace should be on a new line
    Open

        private function show_git_changes_table_submit_buttons( $changes ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! empty( $changes ) ) : ?>

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Could not commit!', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Could not commit!', 'gitium' ) );

    Space after opening parenthesis of function call prohibited
    Open

            $merge_success = gitium_merge_and_push( $commit );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Merge failed: ', 'gitium' ) . $this->git->get_last_error() );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                <?php printf( __( 'Following remote branch <code>%s</code>.', 'gitium' ), $branch );

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( $ahead && $behind ) {

    Opening brace should be on a new line
    Open

        private function show_git_changes_table_rows( $changes = '' ) {

    Space after opening parenthesis of function call prohibited
    Open

                    echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';

    Space after opening parenthesis of function call prohibited
    Open

                add_action( 'admin_init', array( $this, 'save_ignorelist' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                __( 'Git Status', 'gitium' ),

    Space after opening parenthesis of function call prohibited
    Open

                __( 'Status', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( 0 === strpos( $change, 'R ' ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            $commit = $this->git->commit( $commitmsg, $current_user->display_name, $current_user->user_email );

    Space after opening parenthesis of function call prohibited
    Open

                <?php printf( __( 'Following remote branch <code>%s</code>.', 'gitium' ), $branch );

    Expected 0 spaces before closing bracket; 1 found
    Open

                echo '<td><strong>' . esc_html( $path ) . '</strong>';

    Opening brace should be on a new line
    Open

        private function show_git_changes_table( $changes = '' ) {

    Space after opening parenthesis of function call prohibited
    Open

            if ( empty( $changes ) ) :

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( empty( $changes ) ) :

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! empty( $changes ) ) : ?>

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                __( 'Git Status', 'gitium' ),

    Space after opening parenthesis of function call prohibited
    Open

                'R'  => __( 'deleted from work tree', 'gitium' ),

    Space after opening parenthesis of function call prohibited
    Open

                $old_filename = substr( $change, 2 );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $change = sprintf( __( 'renamed from `%s`', 'gitium' ), $old_filename );

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $gitium_ignore_path ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            gitium_enable_maintenance_mode() or wp_die( __( 'Could not enable the maintenance mode!', 'gitium' ) );

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! $merge_success ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            $behind = count( $this->git->get_behind_commits() );

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! $ahead && ! $behind && empty( $changes ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                printf( __( 'You are %s commits ahead and %s behind remote.', 'gitium' ), $ahead, $behind );

    Expected 0 spaces before closing bracket; 1 found
    Open

                printf( __( 'You are %s commits ahead and %s behind remote.', 'gitium' ), $ahead, $behind );

    Line indented incorrectly; expected 0 spaces, found 8
    Open

            }

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule

    Space after opening parenthesis of function call prohibited
    Open

            <tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>

    Space after opening parenthesis of function call prohibited
    Open

            new Gitium_Help( $submenu_hook, 'status' );

    Expected 0 spaces before closing bracket; 1 found
    Open

                'rM' => __( 'modified on remote', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                'rD' => __( 'deleted from remote', 'gitium' ),

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                gitium_commit_and_push_gitignore_file( $path );

    Space after opening parenthesis of function call prohibited
    Open

                $this->success_redirect( __( 'The file `.gitignore` is saved!', 'gitium' ), $this->gitium_menu_slug );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );

    Space after opening parenthesis of function call prohibited
    Open

            $this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );

    Space after opening parenthesis of function call prohibited
    Open

            $ahead  = count( $this->git->get_ahead_commits() );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $ahead  = count( $this->git->get_ahead_commits() );

    Line indented incorrectly; expected 0 spaces, found 8
    Open

            if ( ! $ahead && ! $behind && empty( $changes ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            <thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! isset( $gitium_save_changes ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            $commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! $commit ) {

    Line indented incorrectly; expected 0 spaces, found 8
    Open

            }

    Space after opening parenthesis of function call prohibited
    Open

                printf( __( 'You are %s commits behind remote.', 'gitium' ), $behind );

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! empty( $changes ) ) : ?>

    Space after opening parenthesis of function call prohibited
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->success_redirect( __( 'The file `.gitignore` is saved!', 'gitium' ), $this->gitium_menu_slug );

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! $ahead && ! $behind && empty( $changes ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            } elseif ( $behind ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            <tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->show_git_changes_table_rows( $changes );

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! isset( $gitium_save_changes ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            $behind = count( $this->git->get_behind_commits() );

    Space after opening parenthesis of function call prohibited
    Open

                printf( __( 'You are %s commits ahead and %s behind remote.', 'gitium' ), $ahead, $behind );

    Space after opening parenthesis of function call prohibited
    Open

            <thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( empty( $changes ) ) :

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->success_redirect( __( 'The file `.gitignore` is saved!', 'gitium' ), $this->gitium_menu_slug );

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $gitium_save_changes ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Merge failed: ', 'gitium' ) . $this->git->get_last_error() );

    Space after opening parenthesis of function call prohibited
    Open

                printf( __( 'You are %s commits ahead remote.', 'gitium' ), $ahead );

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule

    Space after opening parenthesis of function call prohibited
    Open

                    echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                gitium_commit_and_push_gitignore_file( $path );

    Expected 0 spaces before closing bracket; 1 found
    Open

            gitium_enable_maintenance_mode() or wp_die( __( 'Could not enable the maintenance mode!', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! $ahead && ! $behind && empty( $changes ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                printf( __( 'You are %s commits ahead remote.', 'gitium' ), $ahead );

    Space after opening parenthesis of function call prohibited
    Open

                if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule

    Space after opening parenthesis of function call prohibited
    Open

                if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule

    Expected 0 spaces before closing bracket; 1 found
    Open

                    _e( 'Submodules are not supported in this version.', 'gitium' );

    Space after opening parenthesis of function call prohibited
    Open

                echo '<div class="row-actions"><span class="edit"><a href="#" onclick="add_path_and_submit(\'' . $path . '\');">' . __( 'Add this file to the `.gitignore` list.', 'gitium' ) . '</a></span></div></td>';

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule

    Expected 0 spaces before closing bracket; 1 found
    Open

                printf( __( 'You are %s commits ahead and %s behind remote.', 'gitium' ), $ahead, $behind );

    Line indented incorrectly; expected 0 spaces, found 8
    Open

            } elseif ( $ahead ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                printf( __( 'You are %s commits behind remote.', 'gitium' ), $behind );

    Expected 0 spaces after opening bracket; 1 found
    Open

            foreach ( $changes as $path => $type ) :

    Expected 0 spaces before closing bracket; 1 found
    Open

            <thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>

    Expected 0 spaces before closing bracket; 1 found
    Open

            <tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>

    Space after opening parenthesis of function call prohibited
    Open

                _e( 'Nothing to commit, working directory clean.', 'gitium' );

    Space after opening parenthesis of function call prohibited
    Open

                $this->show_git_changes_table_rows( $changes );

    Expected 0 spaces after opening bracket; 1 found
    Open

                <input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>&nbsp;

    Closing brace must be on a line by itself
    Open

                <input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>&nbsp;

    Expected 0 spaces before closing bracket; 1 found
    Open

                <input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />

    Expected 0 spaces before closing bracket; 1 found
    Open

                <input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>&nbsp;

    Opening brace should be on a new line
    Open

        private function changes_page() {

    Space after opening parenthesis of function call prohibited
    Open

                <label for="save-changes"><?php _e( 'Commit message', 'gitium' ); ?>:</label>

    Space after opening parenthesis of function call prohibited
    Open

                <input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />

    Space after opening parenthesis of function call prohibited
    Open

            <h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>

    Space after opening parenthesis of function call prohibited
    Open

                wp_nonce_field( 'gitium-admin' );

    Expected 0 spaces before closing bracket; 1 found
    Open

                <input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>&nbsp;

    Space after opening parenthesis of function call prohibited
    Open

                <input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>&nbsp;

    Expected 0 spaces before closing bracket; 1 found
    Open

                <label for="save-changes"><?php _e( 'Commit message', 'gitium' ); ?>:</label>

    Expected 0 spaces before closing bracket; 1 found
    Open

                <input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />

    Space after opening parenthesis of function call prohibited
    Open

                $this->show_git_changes_table( $changes );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->show_git_changes_table( $changes );

    Space after opening parenthesis of function call prohibited
    Open

                <input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>&nbsp;

    Expected 0 spaces before closing bracket; 1 found
    Open

                wp_nonce_field( 'gitium-admin' );

    Space after opening parenthesis of function call prohibited
    Open

                $this->show_git_changes_table_submit_buttons( $changes );

    Space after opening parenthesis of function call prohibited
    Open

                <input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />

    Expected 0 spaces before closing bracket; 1 found
    Open

            <h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->show_ahead_and_behind_info( $changes );

    Opening brace should be on a new line
    Open

        public function page() {

    Space after opening parenthesis of function call prohibited
    Open

            _gitium_status( true );

    Newline required after opening brace
    Open

                <input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>&nbsp;

    Space after opening parenthesis of function call prohibited
    Open

            <h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>

    Space after opening parenthesis of function call prohibited
    Open

            <h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>

    Space after opening parenthesis of function call prohibited
    Open

                <input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />

    Expected 0 spaces before closing bracket; 1 found
    Open

            _gitium_status( true );

    Expected 0 spaces before closing bracket; 1 found
    Open

            <h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>

    Expected 0 spaces before closing bracket; 1 found
    Open

            <h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>

    Space after opening parenthesis of function call prohibited
    Open

                $this->show_ahead_and_behind_info( $changes );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->show_git_changes_table_submit_buttons( $changes );

    Expected 0 spaces before closing bracket; 1 found
    Open

                <input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />

    The variable $gitium_save_changes is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 $current_user is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 $current_user is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 $gitium_commit_msg is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 $current_user is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 $gitium_save_changes is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 $gitium_commit_msg is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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() {
            add_menu_page(
                __( 'Git Status', 'gitium' ),
                'Gitium',
                GITIUM_MANAGE_OPTIONS_CAPABILITY,

    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 $gitium_commit_msg is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 $merge_success is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 $old_filename is not named in camelCase.
    Open

        public function humanized_change( $change ) {
            $meaning = $this->get_change_meanings();
    
            if ( isset( $meaning[ $change ] ) ) {
                return $meaning[ $change ];

    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 $gitium_commit_msg is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 $gitium_ignore_path is not named in camelCase.
    Open

        public function save_ignorelist() {
            $gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_ignore_path ) ) {
                return;
            } else {

    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 $old_filename is not named in camelCase.
    Open

        public function humanized_change( $change ) {
            $meaning = $this->get_change_meanings();
    
            if ( isset( $meaning[ $change ] ) ) {
                return $meaning[ $change ];

    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 $gitium_ignore_path is not named in camelCase.
    Open

        public function save_ignorelist() {
            $gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_ignore_path ) ) {
                return;
            } else {

    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() {
            add_menu_page(
                __( 'Git Status', 'gitium' ),
                'Gitium',
                GITIUM_MANAGE_OPTIONS_CAPABILITY,

    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 $merge_success is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 $gitium_ignore_path is not named in camelCase.
    Open

        public function save_ignorelist() {
            $gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_ignore_path ) ) {
                return;
            } else {

    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 humanized_change is not named in camelCase.
    Open

        public function humanized_change( $change ) {
            $meaning = $this->get_change_meanings();
    
            if ( isset( $meaning[ $change ] ) ) {
                return $meaning[ $change ];

    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 show_git_changes_table is not named in camelCase.
    Open

        private function show_git_changes_table( $changes = '' ) {
            ?>
            <table class="widefat" id="git-changes-table">
            <thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>
            <tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>

    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 show_git_changes_table_submit_buttons is not named in camelCase.
    Open

        private function show_git_changes_table_submit_buttons( $changes ) {
            if ( ! empty( $changes ) ) : ?>
                <p>
                <label for="save-changes"><?php _e( 'Commit message', 'gitium' ); ?>:</label>
                <input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />

    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 get_change_meanings is not named in camelCase.
    Open

        private function get_change_meanings() {
            return array(
                '??' => __( 'untracked', 'gitium' ),
                'rM' => __( 'modified on remote', 'gitium' ),
                'rA' => __( 'added to remote', '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 save_ignorelist is not named in camelCase.
    Open

        public function save_ignorelist() {
            $gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_ignore_path ) ) {
                return;
            } else {

    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 save_changes is not named in camelCase.
    Open

        public function save_changes() {
            $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_save_changes ) ) {
                return;

    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 show_git_changes_table_rows is not named in camelCase.
    Open

        private function show_git_changes_table_rows( $changes = '' ) {
            ?>
            <script type="application/javascript">
            function add_path_and_submit( elem ) {
                var container = document.getElementById( 'form_status' );

    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 changes_page is not named in camelCase.
    Open

        private function changes_page() {
            list( , $changes ) = _gitium_status();
            ?>
            <div class="wrap">
            <div id="icon-options-general" class="icon32">&nbsp;</div>

    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() {
            add_menu_page(
                __( 'Git Status', 'gitium' ),
                'Gitium',
                GITIUM_MANAGE_OPTIONS_CAPABILITY,

    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 show_ahead_and_behind_info is not named in camelCase.
    Open

        private function show_ahead_and_behind_info( $changes = '' ) {
            $branch = $this->git->get_remote_tracking_branch();
            $ahead  = count( $this->git->get_ahead_commits() );
            $behind = count( $this->git->get_behind_commits() );
            ?>

    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