PressLabs/gitium

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

Summary

Maintainability
B
4 hrs
Test Coverage

Method setup_step_2 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function setup_step_2() {
        $git = $this->git; ?>
        <div class="wrap">
        <h2><?php _e( 'Configuration step 2', 'gitium' ); ?></h2>
        <p><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>
Severity: Minor
Found in gitium/inc/class-gitium-submenu-configure.php - About 1 hr to fix

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

            new Gitium_Help( $submenu_hook, 'configuration' );

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

            } else {
                global $git;
                $this->redirect( __( 'Could not push to remote: ', 'gitium' ) . $remote_url . ' ERROR: ' . serialize( $git->get_last_error() ) );
            }

    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 Configuration', 'gitium' ),
                'Gitium',
                GITIUM_MANAGE_OPTIONS_CAPABILITY,
    Severity: Major
    Found in gitium/inc/class-gitium-submenu-configure.php and 1 other location - About 3 hrs to fix
    gitium/inc/class-gitium-submenu-status.php on lines 31..50

    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

    Avoid excessively long variable names like $gitium_submit_merge_push. Keep variable name length under 20.
    Open

            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

    LongVariable

    Since: 0.2

    Detects when a field, formal or local variable is declared with a long name.

    Example

    class Something {
        protected $reallyLongIntName = -3; // VIOLATION - Field
        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
            $otherReallyLongName = -5; // VIOLATION - Local
            for ($interestingIntIndex = 0; // VIOLATION - For
                 $interestingIntIndex < 10;
                 $interestingIntIndex++ ) {
            }
        }
    }

    Source https://phpmd.org/rules/naming.html#longvariable

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

    class Gitium_Submenu_Configure extends Gitium_Menu {

    The parameter $remote_url is not named in camelCase.
    Open

        public function init_process( $remote_url ) {
            $git = $this->git;
            $git->init();
            $git->add_remote_url( $remote_url );
            $git->fetch_ref();

    CamelCaseParameterName

    Since: 0.2

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

    Example

    class ClassName {
        public function doSomething($user_name) {
        }
    }

    Source

    The class Gitium_Submenu_Configure is not named in CamelCase.
    Open

    class Gitium_Submenu_Configure 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_Configure 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( $submit_keypair ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( count( $git->get_remote_branches() ) == 0 ) {

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

        public function admin_menu() {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <?php foreach ( $git->get_remote_branches() as $branch ) : ?>

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :

    Method name "Gitium_Submenu_Configure::regenerate_keypair" is not in camel caps format
    Open

        public function regenerate_keypair() {

    Method name "Gitium_Submenu_Configure::setup_step_1_remote_url" is not in camel caps format
    Open

        private function setup_step_1_remote_url() {

    Method name "Gitium_Submenu_Configure::setup_warning" is not in camel caps format
    Open

        private function setup_warning() {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $submit_warning ) ) {

    Method name "Gitium_Submenu_Configure::init_process" is not in camel caps format
    Open

        public function init_process( $remote_url ) {

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

        public function init_process( $remote_url ) {

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

        public function init_process( $remote_url ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( wp_content_is_versioned() ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( empty( $remote_url ) ) {

    Method name "Gitium_Submenu_Configure::choose_branch" is not in camel caps format
    Open

        public function choose_branch() {

    Method name "Gitium_Submenu_Configure::setup_step_1" is not in camel caps format
    Open

        private function setup_step_1() {

    Method name "Gitium_Submenu_Configure::setup_step_2" is not in camel caps format
    Open

        private function setup_step_2() {

    Space found before closing bracket of FOREACH loop
    Open

                    <?php foreach ( $git->get_remote_branches() as $branch ) : ?>

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( $this->init_process( $remote_url ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! $this->git->is_status_working() || ! $this->git->get_remote_url() ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( ! $git->push( 'master' ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! $commit ) {

    Space found after opening bracket of FOREACH loop
    Open

                    <?php foreach ( $git->get_remote_branches() as $branch ) : ?>

    Method name "Gitium_Submenu_Configure::setup_step_1_key_pair" is not in camel caps format
    Open

        private function setup_step_1_key_pair() {

    Method name "Gitium_Submenu_Configure::gitium_warning" is not in camel caps format
    Open

        public function gitium_warning() {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! $this->git->merge_initial_commit( $commit, $branch ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! $this->git->get_remote_tracking_branch() ) {

    Method name "Gitium_Submenu_Configure::init_repo" is not in camel caps format
    Open

        public function init_repo() {

    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

            }

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

            }

    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

            $submit_keypair = filter_input(INPUT_POST, 'GitiumSubmitRegenerateKeypair', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

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

                $git->add( 'wp-content', '.gitignore' );

    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

                $this->menu_slug,

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

            $git->fetch_ref();

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

            $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

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

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

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

        }

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

        public function admin_menu() {

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

                __( 'Configuration', '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

            if ( ! isset( $submit_keypair ) ) {

    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

            check_admin_referer( 'gitium-admin' );

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

            $submit_warning = filter_input(INPUT_POST, 'GitiumSubmitWarning', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

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

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

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

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

    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

        public function init_repo() {

    Line exceeds 120 characters; contains 158 characters
    Open

            $commit = $this->git->commit( __( 'Merged existing code from ', 'gitium' ) . get_home_url(), $current_user->display_name, $current_user->user_email );

    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><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>

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

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

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

            );

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

            new Gitium_Help( $submenu_hook, 'configuration' );

    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

                $current_user = wp_get_current_user();

    Line exceeds 120 characters; contains 125 characters
    Open

            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

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

                $this->redirect( __( 'Could not create initial commit -> ', 'gitium' ) . $this->git->get_last_error() );

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

            <th scope="row"><label for="remote_url"><?php _e( 'Remote URL', 'gitium' ); ?></label></th>

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

                </td>

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

            ?>

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

            <div class="wrap">

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

                <h2><?php _e( 'Configuration step 1', 'gitium' ); ?></h2>

    Line exceeds 120 characters; contains 145 characters
    Open

                <p><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>

    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

            <?php

    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

                __( 'Git Configuration', 'gitium' ),

    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

                GITIUM_MANAGE_OPTIONS_CAPABILITY,

    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

            $git->init();

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

                    return false;

    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 ( ! $this->git->merge_initial_commit( $commit, $branch ) ) {

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

                    <input type="text" class="regular-text" name="remote_url" id="remote_url" placeholder="git@github.com:user/example.git" value="">

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

                list( $git_public_key, ) = gitium_get_keypair(); ?>

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

                <th scope="row"><label for="key_pair"><?php _e( 'Key pair', 'gitium' ); ?></label></th>

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

                <?php _e( 'Checkout instructions for <a href="https://help.github.com/articles/generating-ssh-keys#step-3-add-your-ssh-key-to-github" target="_blank">github</a> or <a href="https://confluence.atlassian.com/display/BITBUCKET/Add+an+SSH+key+to+an+account#AddanSSHkeytoanaccount-HowtoaddakeyusingSSHforOSXorLinux" target="_blank">bitbucket</a>.', '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

                <form 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

            }

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

                $git->commit( __( 'Initial commit', 'gitium' ), $current_user->display_name, $current_user->user_email );

    Line exceeds 120 characters; contains 141 characters
    Open

                $this->redirect( __( 'Could not push to remote: ', 'gitium' ) . $remote_url . ' ERROR: ' . serialize( $git->get_last_error() ) );

    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->push( $branch );

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

            <tr>

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

                <tr>

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

                </tr>

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

                    <?php wp_nonce_field( 'gitium-admin' ); ?>

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

                    <input type="submit" name="GitiumSubmitFetch" class="button-primary" value="<?php _e( 'Fetch', 'gitium' ); ?>" />

    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="submit" name="GitiumSubmitMergeAndPush" class="button-primary" value="<?php _e( 'Merge & Push', '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

            $this->show_message();

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

            gitium_update_is_status_working();

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

            $this->success_redirect( __( 'Keypair successfully regenerated.', 'gitium' ) );

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

            $git->add_remote_url( $remote_url );

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

            $remote_url = filter_input(INPUT_POST, 'remote_url', 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->redirect( __( 'Please specify a valid repo.', '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

            $branch = $tracking_branch;

    Line exceeds 120 characters; contains 162 characters
    Open

            <?php _e( 'If you need to authenticate over "https://" instead of SSH use: <code>https://user:pass@github.com/user/example.git</code>', 'gitium' ); ?></p>

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

                        <input type="submit" name="GitiumSubmitRegenerateKeypair" class="button" value="<?php _e( 'Regenerate Key', 'gitium' ); ?>" />

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

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

    Line exceeds 120 characters; contains 129 characters
    Open

                    <input type="submit" name="GitiumSubmitFetch" class="button-primary" value="<?php _e( 'Fetch', 'gitium' ); ?>" />

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

                        <option value="<?php echo esc_attr( $branch ); ?>"><?php echo esc_html( $branch ); ?></option>

    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

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

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

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

    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_get_keypair( true );

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

            if ( ! isset( $submit_warning ) ) {

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

            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {

    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

                <td>

    Line exceeds 120 characters; contains 145 characters
    Open

                    <input type="text" class="regular-text" name="remote_url" id="remote_url" placeholder="git@github.com:user/example.git" value="">

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

            <?php

    Line exceeds 120 characters; contains 146 characters
    Open

                        <input type="submit" name="GitiumSubmitRegenerateKeypair" class="button" value="<?php _e( 'Regenerate Key', 'gitium' ); ?>" />

    Line exceeds 120 characters; contains 370 characters
    Open

                <?php _e( 'Checkout instructions for <a href="https://help.github.com/articles/generating-ssh-keys#step-3-add-your-ssh-key-to-github" target="_blank">github</a> or <a href="https://confluence.atlassian.com/display/BITBUCKET/Add+an+SSH+key+to+an+account#AddanSSHkeytoanaccount-HowtoaddakeyusingSSHforOSXorLinux" target="_blank">bitbucket</a>.', '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

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

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

                    <p class="submit">

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

                </form>

    Line exceeds 120 characters; contains 141 characters
    Open

            <p><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>

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

                    <p class="description"><?php _e( 'Your code origin is set to', 'gitium' ); ?> <code><?php echo esc_html( $git->get_remote_url() ); ?></code></p>

    Line exceeds 120 characters; contains 135 characters
    Open

            <input type="submit" name="GitiumSubmitMergeAndPush" class="button-primary" value="<?php _e( 'Merge & Push', '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

        public function __construct() {

    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

                array( $this, 'page' )

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

        public function regenerate_keypair() {

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

                $this->success_redirect( __( 'Repository initialized successfully.', 'gitium' ) );

    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

                global $git;

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

                        <p>

    Line exceeds 120 characters; contains 161 characters
    Open

                        <input type="text" class="regular-text" name="key_pair" id="key_pair" value="<?php echo esc_attr( $git_public_key ); ?>" readonly="readonly">

    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

            <?php

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

            <h2><?php _e( 'Configuration step 2', 'gitium' ); ?></h2>

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

                <td>

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

                    </select>

    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

                __( 'Git Configuration', '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

        }

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

            $this->git->remove_wp_content_from_version_control();

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

        public function gitium_warning() {

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

                if ( ! $git->push( 'master' ) ) {

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

        }

    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

            if ( count( $git->get_remote_branches() ) == 0 ) {

    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

            $this->git->add();

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

            $commit = $this->git->commit( __( 'Merged existing code from ', 'gitium' ) . get_home_url(), $current_user->display_name, $current_user->user_email );

    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 merge the initial commit -> ', 'gitium' ) . $this->git->get_last_error() );

    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 class="wrap">

    Line exceeds 120 characters; contains 147 characters
    Open

                    <p class="description"><?php _e( 'This URL provide access to a Git repository via SSH, HTTPS, or Subversion.', 'gitium' ); ?><br />

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

        private function setup_step_1_key_pair() {

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

                    <?php endforeach; ?>

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

            if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_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

                        </p>

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

                    <p><code>wp-content</code> is already under version control. You <a onclick="document.getElementById('gitium_form_warning').submit();" style="color:red;" href="#">must remove it from version control</a> in order to continue.</p>

    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

            set_transient( 'gitium_remote_tracking_branch', $branch );

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

        }

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

                    <td>

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

            </div>

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

        private function setup_step_2() {

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

    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 ( ! $commit ) {

    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 _e( 'If you need to authenticate over "https://" instead of SSH use: <code>https://user:pass@github.com/user/example.git</code>', 'gitium' ); ?></p>

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

                        <p class="description"><?php _e( 'If your code use ssh keybased authentication for git you need to allow write access to your repository using this key.', 'gitium' ); ?><br />

    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

        private function setup_step_1() {

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

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

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

            if ( ! $this->git->get_remote_tracking_branch() ) {

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

            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {

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

            </tr>

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

                        <input type="text" class="regular-text" name="key_pair" id="key_pair" value="<?php echo esc_attr( $git_public_key ); ?>" readonly="readonly">

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

                    <input type="hidden" name="GitiumSubmitWarning" class="button-primary" value="1" />

    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

            </table>

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

                return $this->setup_warning();

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

            _gitium_status( true );

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

                    $git->cleanup();

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

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

            $this->success_redirect( __( 'Branch selected successfully.', 'gitium' ) );

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

                    </td>

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

                </form>

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

        }

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

            <tr>

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

                    <select name="tracking_branch" id="tracking_branch">

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

                    <?php foreach ( $git->get_remote_branches() as $branch ) : ?>

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

                return $this->setup_step_2();

    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 init_process( $remote_url ) {

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

            if ( empty( $remote_url ) ) {

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

                $this->redirect( __( 'Could not push to remote: ', 'gitium' ) . $remote_url . ' ERROR: ' . serialize( $git->get_last_error() ) );

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

        public function choose_branch() {

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

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

        private function setup_step_1_remote_url() {

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

                    <p class="description"><?php _e( 'This URL provide access to a Git repository via SSH, HTTPS, or Subversion.', 'gitium' ); ?><br />

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

        private function setup_warning() {

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

                <h2><?php _e( 'Warning!', 'gitium' ); ?></h2>

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

            <?php wp_nonce_field( 'gitium-admin' ); ?>

    Line exceeds 120 characters; contains 160 characters
    Open

                    <p class="description"><?php _e( 'Your code origin is set to', 'gitium' ); ?> <code><?php echo esc_html( $git->get_remote_url() ); ?></code></p>

    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

                $this->show_disconnect_repository_button();

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

            if ( ! $this->git->is_status_working() || ! $this->git->get_remote_url() ) {

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

                return $this->setup_step_1();

    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

            $git = $this->git;

    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

            if ( $this->init_process( $remote_url ) ) {

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

            ?>

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

        }

    Line exceeds 120 characters; contains 195 characters
    Open

                        <p class="description"><?php _e( 'If your code use ssh keybased authentication for git you need to allow write access to your repository using this key.', 'gitium' ); ?><br />

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

                    <p><strong>NOTE</strong> by doing this you WILL LOSE commit history, but NOT the actual files.</p>

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

                    <?php wp_nonce_field( 'gitium-admin' ); ?>

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

                    <table class="form-table">

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

            $git = $this->git; ?>

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

            <p><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>

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

            <table class="form-table">

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

            </tr>

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

            <?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

            <form action="" method="POST">

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

                </td>

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

            return true;

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

            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

    Line exceeds 120 characters; contains 244 characters
    Open

                    <p><code>wp-content</code> is already under version control. You <a onclick="document.getElementById('gitium_form_warning').submit();" style="color:red;" href="#">must remove it from version control</a> in order to continue.</p>

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

            <th scope="row"><label for="tracking_branch"><?php _e( 'Choose tracking branch', 'gitium' ); ?></label></th>

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

            <p class="submit">

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

            gitium_update_remote_tracking_branch();

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {

    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

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

    Space after opening parenthesis of function call prohibited
    Open

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

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $submit_warning ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                __( 'Git Configuration', 'gitium' ),

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

    class Gitium_Submenu_Configure extends Gitium_Menu {

    Space after opening parenthesis of function call prohibited
    Open

            gitium_get_keypair( true );

    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

            if ( ! isset( $submit_warning ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( count( $git->get_remote_branches() ) == 0 ) {

    Space after opening parenthesis of function call prohibited
    Open

                $git->commit( __( 'Initial commit', 'gitium' ), $current_user->display_name, $current_user->user_email );

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( ! $git->push( 'master' ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {

    Space after opening parenthesis of function call prohibited
    Open

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

    Expected 0 spaces before closing bracket; 1 found
    Open

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

    Expected 0 spaces before closing bracket; 1 found
    Open

            gitium_get_keypair( true );

    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

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

    Space after opening parenthesis of function call prohibited
    Open

                __( 'Git Configuration', 'gitium' ),

    Space after opening parenthesis of function call prohibited
    Open

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

    Space after opening parenthesis of function call prohibited
    Open

                $git->commit( __( 'Initial commit', 'gitium' ), $current_user->display_name, $current_user->user_email );

    Space after opening parenthesis of function call prohibited
    Open

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

    Space after opening parenthesis of function call prohibited
    Open

                __( 'Configuration', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

            new Gitium_Help( $submenu_hook, 'configuration' );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $this->success_redirect( __( 'Keypair successfully regenerated.', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $git->add_remote_url( $remote_url );

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( empty( $remote_url ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            if ( empty( $remote_url ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( empty( $remote_url ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( $this->init_process( $remote_url ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( $this->init_process( $remote_url ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            $commit = $this->git->commit( __( 'Merged existing code from ', 'gitium' ) . get_home_url(), $current_user->display_name, $current_user->user_email );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Could not create initial commit -> ', 'gitium' ) . $this->git->get_last_error() );

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Could not create initial commit -> ', 'gitium' ) . $this->git->get_last_error() );

    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

                __( 'Git Configuration', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

                __( 'Configuration', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $submit_keypair ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            $this->success_redirect( __( 'Keypair successfully regenerated.', 'gitium' ) );

    Space after opening parenthesis of function call prohibited
    Open

            $git->add_remote_url( $remote_url );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->success_redirect( __( 'Repository initialized successfully.', 'gitium' ) );

    Space after opening parenthesis of function call prohibited
    Open

            $commit = $this->git->commit( __( 'Merged existing code from ', 'gitium' ) . get_home_url(), $current_user->display_name, $current_user->user_email );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Could not create initial commit -> ', 'gitium' ) . $this->git->get_last_error() );

    Space after opening parenthesis of function call prohibited
    Open

            <?php _e( 'If you need to authenticate over "https://" instead of SSH use: <code>https://user:pass@github.com/user/example.git</code>', 'gitium' ); ?></p>

    Expected 0 spaces before closing bracket; 1 found
    Open

                <th scope="row"><label for="key_pair"><?php _e( 'Key pair', 'gitium' ); ?></label></th>

    Space after opening parenthesis of function call prohibited
    Open

                        <input type="submit" name="GitiumSubmitRegenerateKeypair" class="button" value="<?php _e( 'Regenerate Key', 'gitium' ); ?>" />

    Space after opening parenthesis of function call prohibited
    Open

                <?php _e( 'Checkout instructions for <a href="https://help.github.com/articles/generating-ssh-keys#step-3-add-your-ssh-key-to-github" target="_blank">github</a> or <a href="https://confluence.atlassian.com/display/BITBUCKET/Add+an+SSH+key+to+an+account#AddanSSHkeytoanaccount-HowtoaddakeyusingSSHforOSXorLinux" target="_blank">bitbucket</a>.', 'gitium' ); ?>

    Expected 0 spaces before closing bracket; 1 found
    Open

                <?php _e( 'Checkout instructions for <a href="https://help.github.com/articles/generating-ssh-keys#step-3-add-your-ssh-key-to-github" target="_blank">github</a> or <a href="https://confluence.atlassian.com/display/BITBUCKET/Add+an+SSH+key+to+an+account#AddanSSHkeytoanaccount-HowtoaddakeyusingSSHforOSXorLinux" target="_blank">bitbucket</a>.', 'gitium' ); ?>

    Space after opening parenthesis of function call prohibited
    Open

                    <?php wp_nonce_field( 'gitium-admin' ); ?>

    Space after opening parenthesis of function call prohibited
    Open

            <?php wp_nonce_field( 'gitium-admin' ); ?>

    Expected 0 spaces before closing bracket; 1 found
    Open

            <th scope="row"><label for="tracking_branch"><?php _e( 'Choose tracking branch', 'gitium' ); ?></label></th>

    Expected 0 spaces before closing bracket; 1 found
    Open

                        <option value="<?php echo esc_attr( $branch ); ?>"><?php echo esc_html( $branch ); ?></option>

    Opening brace should be on a new line
    Open

        public function __construct() {

    Expected 0 spaces before closing bracket; 1 found
    Open

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

    Space after opening parenthesis of function call prohibited
    Open

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

    Space after opening parenthesis of function call prohibited
    Open

            $this->success_redirect( __( 'Keypair successfully regenerated.', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Please specify a valid repo.', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $this->git->push( $branch );

    Expected 0 spaces before closing bracket; 1 found
    Open

                <h2><?php _e( 'Warning!', 'gitium' ); ?></h2>

    Space after opening parenthesis of function call prohibited
    Open

                <h2><?php _e( 'Configuration step 1', 'gitium' ); ?></h2>

    Expected 0 spaces before closing bracket; 1 found
    Open

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

    Space after opening parenthesis of function call prohibited
    Open

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

    Expected 0 spaces before closing bracket; 1 found
    Open

            check_admin_referer( 'gitium-admin' );

    Space after opening parenthesis of function call prohibited
    Open

            if ( count( $git->get_remote_branches() ) == 0 ) {

    Space after opening parenthesis of function call prohibited
    Open

                $git->add( 'wp-content', '.gitignore' );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $git->commit( __( 'Initial commit', 'gitium' ), $current_user->display_name, $current_user->user_email );

    Space after opening parenthesis of function call prohibited
    Open

                $this->success_redirect( __( 'Repository initialized successfully.', 'gitium' ) );

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Could not push to remote: ', 'gitium' ) . $remote_url . ' ERROR: ' . serialize( $git->get_last_error() ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :

    Expected 0 spaces before closing bracket; 1 found
    Open

                        <input type="text" class="regular-text" name="key_pair" id="key_pair" value="<?php echo esc_attr( $git_public_key ); ?>" readonly="readonly">

    Space after opening parenthesis of function call prohibited
    Open

                    <input type="submit" name="GitiumSubmitFetch" class="button-primary" value="<?php _e( 'Fetch', 'gitium' ); ?>" />

    Expected 0 spaces before closing bracket; 1 found
    Open

            _gitium_status( true );

    Expected 0 spaces before closing bracket; 1 found
    Open

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

    Space after opening parenthesis of function call prohibited
    Open

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

    Space after opening parenthesis of function call prohibited
    Open

            check_admin_referer( 'gitium-admin' );

    Expected 0 spaces before closing bracket; 1 found
    Open

            check_admin_referer( 'gitium-admin' );

    Space after opening parenthesis of function call prohibited
    Open

                if ( ! $git->push( 'master' ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {

    Opening brace should be on a new line
    Open

        public function choose_branch() {

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Could not create initial commit -> ', 'gitium' ) . $this->git->get_last_error() );

    Expected 0 spaces before closing bracket; 1 found
    Open

            <?php wp_nonce_field( 'gitium-admin' ); ?>

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( wp_content_is_versioned() ) {

    Space after opening parenthesis of function call prohibited
    Open

            _gitium_status( true );

    Space after opening parenthesis of function call prohibited
    Open

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

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( count( $git->get_remote_branches() ) == 0 ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                $git->commit( __( 'Initial commit', 'gitium' ), $current_user->display_name, $current_user->user_email );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->success_redirect( __( 'Repository initialized successfully.', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Could not merge the initial commit -> ', 'gitium' ) . $this->git->get_last_error() );

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <p class="description"><?php _e( 'This URL provide access to a Git repository via SSH, HTTPS, or Subversion.', 'gitium' ); ?><br />

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <?php wp_nonce_field( 'gitium-admin' ); ?>

    Space after opening parenthesis of function call prohibited
    Open

                    <p class="description"><?php _e( 'Your code origin is set to', 'gitium' ); ?> <code><?php echo esc_html( $git->get_remote_url() ); ?></code></p>

    Space after opening parenthesis of function call prohibited
    Open

                    <p class="description"><?php _e( 'Your code origin is set to', 'gitium' ); ?> <code><?php echo esc_html( $git->get_remote_url() ); ?></code></p>

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! isset( $submit_keypair ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! isset( $submit_keypair ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( ! $git->push( 'master' ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Please specify a valid repo.', 'gitium' ) );

    Space after opening parenthesis of function call prohibited
    Open

            check_admin_referer( 'gitium-admin' );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $commit = $this->git->commit( __( 'Merged existing code from ', 'gitium' ) . get_home_url(), $current_user->display_name, $current_user->user_email );

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! $this->git->merge_initial_commit( $commit, $branch ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            $this->git->push( $branch );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $this->success_redirect( __( 'Branch selected successfully.', 'gitium' ) );

    Space after opening parenthesis of function call prohibited
    Open

            if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {

    Opening brace should be on a new line
    Open

        public function admin_menu() {

    Space after opening parenthesis of function call prohibited
    Open

            new Gitium_Help( $submenu_hook, 'configuration' );

    Expected 0 spaces before closing bracket; 1 found
    Open

                __( 'Git Configuration', 'gitium' ),

    Expected 0 spaces before closing bracket; 1 found
    Open

            $this->success_redirect( __( 'Keypair successfully regenerated.', 'gitium' ) );

    Opening brace should be on a new line
    Open

        public function gitium_warning() {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! isset( $submit_warning ) ) {

    Opening brace should be on a new line
    Open

        public function init_repo() {

    Opening brace should be on a new line
    Open

        public function init_process( $remote_url ) {

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Could not push to remote: ', 'gitium' ) . $remote_url . ' ERROR: ' . serialize( $git->get_last_error() ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Could not push to remote: ', 'gitium' ) . $remote_url . ' ERROR: ' . serialize( $git->get_last_error() ) );

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Could not merge the initial commit -> ', 'gitium' ) . $this->git->get_last_error() );

    Space after opening parenthesis of function call prohibited
    Open

                        <p class="description"><?php _e( 'If your code use ssh keybased authentication for git you need to allow write access to your repository using this key.', 'gitium' ); ?><br />

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Could not merge the initial commit -> ', 'gitium' ) . $this->git->get_last_error() );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $this->success_redirect( __( 'Branch selected successfully.', 'gitium' ) );

    Space after opening parenthesis of function call prohibited
    Open

                    <p class="description"><?php _e( 'This URL provide access to a Git repository via SSH, HTTPS, or Subversion.', 'gitium' ); ?><br />

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :

    Space after opening parenthesis of function call prohibited
    Open

                <th scope="row"><label for="key_pair"><?php _e( 'Key pair', 'gitium' ); ?></label></th>

    Expected 0 spaces before closing bracket; 1 found
    Open

                        <input type="submit" name="GitiumSubmitRegenerateKeypair" class="button" value="<?php _e( 'Regenerate Key', 'gitium' ); ?>" />

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <?php wp_nonce_field( 'gitium-admin' ); ?>

    Space after opening parenthesis of function call prohibited
    Open

                <p><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>

    Opening brace should be on a new line
    Open

        private function setup_step_2() {

    Space after opening parenthesis of function call prohibited
    Open

            if ( $this->init_process( $remote_url ) ) {

    Space after opening parenthesis of function call prohibited
    Open

                $this->success_redirect( __( 'Repository initialized successfully.', 'gitium' ) );

    Space after opening parenthesis of function call prohibited
    Open

                $this->redirect( __( 'Could not push to remote: ', 'gitium' ) . $remote_url . ' ERROR: ' . serialize( $git->get_last_error() ) );

    Space after opening parenthesis of function call prohibited
    Open

            set_transient( 'gitium_remote_tracking_branch', $branch );

    Opening brace should be on a new line
    Open

        private function setup_step_1_remote_url() {

    Opening brace should be on a new line
    Open

        private function setup_step_1_key_pair() {

    Space after opening parenthesis of function call prohibited
    Open

                <h2><?php _e( 'Warning!', 'gitium' ); ?></h2>

    Expected 0 spaces after opening bracket; 1 found
    Open

                    <?php foreach ( $git->get_remote_branches() as $branch ) : ?>

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! $this->git->is_status_working() || ! $this->git->get_remote_url() ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Please specify a valid repo.', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Could not push to remote: ', 'gitium' ) . $remote_url . ' ERROR: ' . serialize( $git->get_last_error() ) );

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            $this->success_redirect( __( 'Branch selected successfully.', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

            <?php _e( 'If you need to authenticate over "https://" instead of SSH use: <code>https://user:pass@github.com/user/example.git</code>', 'gitium' ); ?></p>

    Opening brace should be on a new line
    Open

        private function setup_warning() {

    Expected 0 spaces before closing bracket; 1 found
    Open

                <h2><?php _e( 'Configuration step 1', 'gitium' ); ?></h2>

    Space after opening parenthesis of function call prohibited
    Open

                        <option value="<?php echo esc_attr( $branch ); ?>"><?php echo esc_html( $branch ); ?></option>

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! $this->git->get_remote_tracking_branch() ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Could not push to remote: ', 'gitium' ) . $remote_url . ' ERROR: ' . serialize( $git->get_last_error() ) );

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! $this->git->merge_initial_commit( $commit, $branch ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            $this->success_redirect( __( 'Branch selected successfully.', 'gitium' ) );

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :

    Space after opening parenthesis of function call prohibited
    Open

            <h2><?php _e( 'Configuration step 2', 'gitium' ); ?></h2>

    Space after opening parenthesis of function call prohibited
    Open

            check_admin_referer( 'gitium-admin' );

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {

    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( __( 'Please specify a valid repo.', 'gitium' ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            set_transient( 'gitium_remote_tracking_branch', $branch );

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! $commit ) {

    Space after opening parenthesis of function call prohibited
    Open

            <th scope="row"><label for="remote_url"><?php _e( 'Remote URL', 'gitium' ); ?></label></th>

    Expected 0 spaces before closing bracket; 1 found
    Open

                        <option value="<?php echo esc_attr( $branch ); ?>"><?php echo esc_html( $branch ); ?></option>

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <p class="description"><?php _e( 'Your code origin is set to', 'gitium' ); ?> <code><?php echo esc_html( $git->get_remote_url() ); ?></code></p>

    Space after opening parenthesis of function call prohibited
    Open

            <input type="submit" name="GitiumSubmitMergeAndPush" class="button-primary" value="<?php _e( 'Merge & Push', 'gitium' ); ?>" />

    Opening brace should be on a new line
    Open

        public function regenerate_keypair() {

    Expected 0 spaces before closing bracket; 1 found
    Open

                $git->add( 'wp-content', '.gitignore' );

    Space after opening parenthesis of function call prohibited
    Open

            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {

    Space after opening parenthesis of function call prohibited
    Open

            $commit = $this->git->commit( __( 'Merged existing code from ', 'gitium' ) . get_home_url(), $current_user->display_name, $current_user->user_email );

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! $this->git->merge_initial_commit( $commit, $branch ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            <th scope="row"><label for="remote_url"><?php _e( 'Remote URL', 'gitium' ); ?></label></th>

    Expected 0 spaces before closing bracket; 1 found
    Open

                        <p class="description"><?php _e( 'If your code use ssh keybased authentication for git you need to allow write access to your repository using this key.', 'gitium' ); ?><br />

    Space after opening parenthesis of function call prohibited
    Open

                    <?php wp_nonce_field( 'gitium-admin' ); ?>

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <input type="submit" name="GitiumSubmitFetch" class="button-primary" value="<?php _e( 'Fetch', 'gitium' ); ?>" />

    Space after opening parenthesis of function call prohibited
    Open

            <p><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>

    Space after opening parenthesis of function call prohibited
    Open

                        <option value="<?php echo esc_attr( $branch ); ?>"><?php echo esc_html( $branch ); ?></option>

    Expected 0 spaces before closing bracket; 1 found
    Open

            <input type="submit" name="GitiumSubmitMergeAndPush" class="button-primary" value="<?php _e( 'Merge & Push', 'gitium' ); ?>" />

    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

            check_admin_referer( 'gitium-admin' );

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            check_admin_referer( 'gitium-admin' );

    Opening brace should be on a new line
    Open

        private function setup_step_1() {

    Expected 0 spaces before closing bracket; 1 found
    Open

                <p><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>

    Expected 0 spaces before closing bracket; 1 found
    Open

            <p><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>

    Space after opening parenthesis of function call prohibited
    Open

            <th scope="row"><label for="tracking_branch"><?php _e( 'Choose tracking branch', 'gitium' ); ?></label></th>

    Expected 0 spaces before closing bracket; 1 found
    Open

                    <p class="description"><?php _e( 'Your code origin is set to', 'gitium' ); ?> <code><?php echo esc_html( $git->get_remote_url() ); ?></code></p>

    Expected 0 spaces before closing bracket; 1 found
    Open

                $this->redirect( __( 'Could not merge the initial commit -> ', 'gitium' ) . $this->git->get_last_error() );

    Space after opening parenthesis of function call prohibited
    Open

                        <input type="text" class="regular-text" name="key_pair" id="key_pair" value="<?php echo esc_attr( $git_public_key ); ?>" readonly="readonly">

    Expected 0 spaces before closing bracket; 1 found
    Open

            <h2><?php _e( 'Configuration step 2', 'gitium' ); ?></h2>

    Opening brace should be on a new line
    Open

        public function page() {

    The variable $gitium_submit_fetch is not named in camelCase.
    Open

        public function init_repo() {
            $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
                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 $remote_url is not named in camelCase.
    Open

        public function init_repo() {
            $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
                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_submit_merge_push is not named in camelCase.
    Open

        public function choose_branch() {
            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
                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 $tracking_branch is not named in camelCase.
    Open

        public function choose_branch() {
            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
                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 $remote_url is not named in camelCase.
    Open

        public function init_process( $remote_url ) {
            $git = $this->git;
            $git->init();
            $git->add_remote_url( $remote_url );
            $git->fetch_ref();

    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 init_process( $remote_url ) {
            $git = $this->git;
            $git->init();
            $git->add_remote_url( $remote_url );
            $git->fetch_ref();

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

        public function choose_branch() {
            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
                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 $git_public_key is not named in camelCase.
    Open

        private function setup_step_1_key_pair() {
            if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :
                list( $git_public_key, ) = gitium_get_keypair(); ?>
                <tr>
                <th scope="row"><label for="key_pair"><?php _e( 'Key pair', 'gitium' ); ?></label></th>

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

        public function gitium_warning() {
            $submit_warning = filter_input(INPUT_POST, 'GitiumSubmitWarning', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $submit_warning ) ) {
                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 $remote_url is not named in camelCase.
    Open

        public function init_repo() {
            $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
                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_submit_fetch is not named in camelCase.
    Open

        public function init_repo() {
            $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
                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 $remote_url is not named in camelCase.
    Open

        public function init_repo() {
            $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
                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 $tracking_branch is not named in camelCase.
    Open

        public function choose_branch() {
            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
                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 Configuration', '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 $git_public_key is not named in camelCase.
    Open

        private function setup_step_1_key_pair() {
            if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :
                list( $git_public_key, ) = gitium_get_keypair(); ?>
                <tr>
                <th scope="row"><label for="key_pair"><?php _e( 'Key pair', 'gitium' ); ?></label></th>

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

        public function init_repo() {
            $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
                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 Configuration', '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 $submit_keypair is not named in camelCase.
    Open

        public function regenerate_keypair() {
            $submit_keypair = filter_input(INPUT_POST, 'GitiumSubmitRegenerateKeypair', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $submit_keypair ) ) {
                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 choose_branch() {
            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
                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 $submit_keypair is not named in camelCase.
    Open

        public function regenerate_keypair() {
            $submit_keypair = filter_input(INPUT_POST, 'GitiumSubmitRegenerateKeypair', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $submit_keypair ) ) {
                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 init_process( $remote_url ) {
            $git = $this->git;
            $git->init();
            $git->add_remote_url( $remote_url );
            $git->fetch_ref();

    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 choose_branch() {
            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
                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 $submit_warning is not named in camelCase.
    Open

        public function gitium_warning() {
            $submit_warning = filter_input(INPUT_POST, 'GitiumSubmitWarning', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $submit_warning ) ) {
                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_submit_merge_push is not named in camelCase.
    Open

        public function choose_branch() {
            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
                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 init_process( $remote_url ) {
            $git = $this->git;
            $git->init();
            $git->add_remote_url( $remote_url );
            $git->fetch_ref();

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

        public function init_repo() {
            $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
                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 choose_branch() {
            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
                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 method setup_step_2 is not named in camelCase.
    Open

        private function setup_step_2() {
            $git = $this->git; ?>
            <div class="wrap">
            <h2><?php _e( 'Configuration step 2', 'gitium' ); ?></h2>
            <p><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>

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

        public function choose_branch() {
            $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
                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 admin_menu is not named in camelCase.
    Open

        public function admin_menu() {
            add_menu_page(
                __( 'Git Configuration', '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 init_process is not named in camelCase.
    Open

        public function init_process( $remote_url ) {
            $git = $this->git;
            $git->init();
            $git->add_remote_url( $remote_url );
            $git->fetch_ref();

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

        public function gitium_warning() {
            $submit_warning = filter_input(INPUT_POST, 'GitiumSubmitWarning', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $submit_warning ) ) {
                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 init_repo is not named in camelCase.
    Open

        public function init_repo() {
            $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
                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 setup_step_1_remote_url is not named in camelCase.
    Open

        private function setup_step_1_remote_url() {
            ?>
            <tr>
            <th scope="row"><label for="remote_url"><?php _e( 'Remote URL', 'gitium' ); ?></label></th>
                <td>

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

        private function setup_warning() {
            ?>
            <div class="wrap">
                <h2><?php _e( 'Warning!', 'gitium' ); ?></h2>
                <form name="gitium_form_warning" id="gitium_form_warning" action="" method="POST">

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

        public function regenerate_keypair() {
            $submit_keypair = filter_input(INPUT_POST, 'GitiumSubmitRegenerateKeypair', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
            if ( ! isset( $submit_keypair ) ) {
                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 setup_step_1 is not named in camelCase.
    Open

        private function setup_step_1() {
            ?>
            <div class="wrap">
                <h2><?php _e( 'Configuration step 1', 'gitium' ); ?></h2>
                <p><?php _e( 'If you need help to set this up, please click on the "Help" button from the top right corner of this screen.' ); ?></p>

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

        private function setup_step_1_key_pair() {
            if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :
                list( $git_public_key, ) = gitium_get_keypair(); ?>
                <tr>
                <th scope="row"><label for="key_pair"><?php _e( 'Key pair', 'gitium' ); ?></label></th>

    CamelCaseMethodName

    Since: 0.2

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

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status