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>
Missing class import via use statement (line '51', column '7'). Open
new Gitium_Help( $submenu_hook, 'configuration' );
- Read upRead up
- Exclude checks
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() ) );
}
- Read upRead up
- Exclude checks
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,
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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);
- Read upRead up
- Exclude checks
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 {
- Exclude checks
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();
- Read upRead up
- Exclude checks
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 );
- Read upRead up
- Exclude checks
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 {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $submit_keypair ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( count( $git->get_remote_branches() ) == 0 ) {
- Exclude checks
Method name "Gitium_Submenu_Configure::admin_menu" is not in camel caps format Open
public function admin_menu() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<?php foreach ( $git->get_remote_branches() as $branch ) : ?>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :
- Exclude checks
Method name "Gitium_Submenu_Configure::regenerate_keypair" is not in camel caps format Open
public function regenerate_keypair() {
- Exclude checks
Method name "Gitium_Submenu_Configure::setup_step_1_remote_url" is not in camel caps format Open
private function setup_step_1_remote_url() {
- Exclude checks
Method name "Gitium_Submenu_Configure::setup_warning" is not in camel caps format Open
private function setup_warning() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $submit_warning ) ) {
- Exclude checks
Method name "Gitium_Submenu_Configure::init_process" is not in camel caps format Open
public function init_process( $remote_url ) {
- Exclude checks
Expected 0 spaces between argument "$remote_url" and closing bracket; 1 found Open
public function init_process( $remote_url ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$remote_url"; 1 found Open
public function init_process( $remote_url ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( wp_content_is_versioned() ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $remote_url ) ) {
- Exclude checks
Method name "Gitium_Submenu_Configure::choose_branch" is not in camel caps format Open
public function choose_branch() {
- Exclude checks
Method name "Gitium_Submenu_Configure::setup_step_1" is not in camel caps format Open
private function setup_step_1() {
- Exclude checks
Method name "Gitium_Submenu_Configure::setup_step_2" is not in camel caps format Open
private function setup_step_2() {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
<?php foreach ( $git->get_remote_branches() as $branch ) : ?>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->init_process( $remote_url ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $this->git->is_status_working() || ! $this->git->get_remote_url() ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $git->push( 'master' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $commit ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
<?php foreach ( $git->get_remote_branches() as $branch ) : ?>
- Exclude checks
Method name "Gitium_Submenu_Configure::setup_step_1_key_pair" is not in camel caps format Open
private function setup_step_1_key_pair() {
- Exclude checks
Method name "Gitium_Submenu_Configure::gitium_warning" is not in camel caps format Open
public function gitium_warning() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $this->git->merge_initial_commit( $commit, $branch ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $this->git->get_remote_tracking_branch() ) {
- Exclude checks
Method name "Gitium_Submenu_Configure::init_repo" is not in camel caps format Open
public function init_repo() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$submenu_hook = add_submenu_page(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$submit_keypair = filter_input(INPUT_POST, 'GitiumSubmitRegenerateKeypair', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git->add( 'wp-content', '.gitignore' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
array( $this, 'page' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->menu_slug,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git->fetch_ref();
- Exclude checks
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);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function admin_menu() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
__( 'Configuration', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->menu_slug,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! isset( $submit_keypair ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->menu_slug,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$submit_warning = filter_input(INPUT_POST, 'GitiumSubmitWarning', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_action( 'admin_init', array( $this, 'regenerate_keypair' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_action( 'admin_init', array( $this, 'choose_branch' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function init_repo() {
- Exclude checks
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 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
?>
- Exclude checks
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>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_action( 'admin_init', array( $this, 'gitium_warning' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
new Gitium_Help( $submenu_hook, 'configuration' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$current_user = wp_get_current_user();
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
$gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
- Exclude checks
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() );
- Exclude checks
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>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</td>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<div class="wrap">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<h2><?php _e( 'Configuration step 1', 'gitium' ); ?></h2>
- Exclude checks
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>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</table>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_action( 'admin_init', array( $this, 'disconnect_repository' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
__( 'Git Configuration', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'Gitium',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
GITIUM_MANAGE_OPTIONS_CAPABILITY,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
GITIUM_MANAGE_OPTIONS_CAPABILITY,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git->init();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! $this->git->merge_initial_commit( $commit, $branch ) ) {
- Exclude checks
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="">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $git_public_key, ) = gitium_get_keypair(); ?>
- Exclude checks
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>
- Exclude checks
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' ); ?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<form action="" method="POST">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
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 );
- Exclude checks
Line exceeds 120 characters; contains 141 characters Open
$this->redirect( __( 'Could not push to remote: ', 'gitium' ) . $remote_url . ' ERROR: ' . serialize( $git->get_last_error() ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->git->push( $branch );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<tr>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<tr>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</tr>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php wp_nonce_field( 'gitium-admin' ); ?>
- Exclude checks
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' ); ?>" />
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</p>
- Exclude checks
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' ); ?>" />
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->show_message();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
gitium_update_is_status_working();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->success_redirect( __( 'Keypair successfully regenerated.', 'gitium' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git->add_remote_url( $remote_url );
- Exclude checks
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);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->redirect( __( 'Please specify a valid repo.', 'gitium' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$branch = $tracking_branch;
- Exclude checks
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>
- Exclude checks
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' ); ?>" />
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<form name="gitium_form_warning" id="gitium_form_warning" action="" method="POST">
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
<input type="submit" name="GitiumSubmitFetch" class="button-primary" value="<?php _e( 'Fetch', 'gitium' ); ?>" />
- Exclude checks
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>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function page() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parent::__construct( $this->gitium_menu_slug, $this->gitium_menu_slug );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_action( 'admin_init', array( $this, 'init_repo' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_menu_page(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
gitium_get_keypair( true );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! isset( $submit_warning ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$current_user = wp_get_current_user();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<td>
- Exclude checks
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="">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Line exceeds 120 characters; contains 146 characters Open
<input type="submit" name="GitiumSubmitRegenerateKeypair" class="button" value="<?php _e( 'Regenerate Key', 'gitium' ); ?>" />
- Exclude checks
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' ); ?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php $this->setup_step_1_remote_url(); ?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<p class="submit">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</form>
- Exclude checks
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>
- Exclude checks
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>
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
<input type="submit" name="GitiumSubmitMergeAndPush" class="button-primary" value="<?php _e( 'Merge & Push', 'gitium' ); ?>" />
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function __construct() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
array( $this, 'page' )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function regenerate_keypair() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->success_redirect( __( 'Repository initialized successfully.', 'gitium' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
global $git;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<p>
- Exclude checks
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">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<div class="wrap">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<h2><?php _e( 'Configuration step 2', 'gitium' ); ?></h2>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<td>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</select>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</div>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
__( 'Git Configuration', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->git->remove_wp_content_from_version_control();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function gitium_warning() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! $git->push( 'master' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( count( $git->get_remote_branches() ) == 0 ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->git->add();
- Exclude checks
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 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
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() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</p>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<div class="wrap">
- Exclude checks
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 />
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function setup_step_1_key_pair() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php endforeach; ?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</p>
- Exclude checks
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>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</p>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
set_transient( 'gitium_remote_tracking_branch', $branch );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<td>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</div>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function setup_step_2() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( wp_content_is_versioned() ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! $commit ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
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>
- Exclude checks
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 />
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php endif;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function setup_step_1() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php $this->setup_step_1_key_pair(); ?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! $this->git->get_remote_tracking_branch() ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</tr>
- Exclude checks
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">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<input type="hidden" name="GitiumSubmitWarning" class="button-primary" value="1" />
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</div>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</table>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->setup_warning();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
_gitium_status( true );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git->cleanup();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->git->cleanup();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->success_redirect( __( 'Branch selected successfully.', 'gitium' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</td>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</form>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<tr>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<select name="tracking_branch" id="tracking_branch">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php foreach ( $git->get_remote_branches() as $branch ) : ?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->setup_step_2();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function init_process( $remote_url ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( empty( $remote_url ) ) {
- Exclude checks
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() ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function choose_branch() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->git->cleanup();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function setup_step_1_remote_url() {
- Exclude checks
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 />
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function setup_warning() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<h2><?php _e( 'Warning!', 'gitium' ); ?></h2>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php wp_nonce_field( 'gitium-admin' ); ?>
- Exclude checks
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>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</form>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->show_disconnect_repository_button();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! $this->git->is_status_working() || ! $this->git->get_remote_url() ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->setup_step_1();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
plugins_url( 'img/gitium.png', dirname( __FILE__ ) )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git = $this->git;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $this->init_process( $remote_url ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
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 />
- Exclude checks
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>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php wp_nonce_field( 'gitium-admin' ); ?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<table class="form-table">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git = $this->git; ?>
- Exclude checks
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>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<table class="form-table">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</tr>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<form action="" method="POST">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</td>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
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);
- Exclude checks
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>
- Exclude checks
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>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<p class="submit">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
gitium_update_remote_tracking_branch();
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( 'admin_init', array( $this, 'disconnect_repository' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( 'admin_init', array( $this, 'init_repo' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_action( 'admin_init', array( $this, 'gitium_warning' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $submit_warning ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
__( 'Git Configuration', 'gitium' ),
- Exclude checks
Class name "Gitium_Submenu_Configure" is not in camel caps format Open
class Gitium_Submenu_Configure extends Gitium_Menu {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
gitium_get_keypair( true );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
parent::__construct( $this->gitium_menu_slug, $this->gitium_menu_slug );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! isset( $submit_warning ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( count( $git->get_remote_branches() ) == 0 ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git->commit( __( 'Initial commit', 'gitium' ), $current_user->display_name, $current_user->user_email );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $git->push( 'master' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( 'admin_init', array( $this, 'gitium_warning' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
gitium_get_keypair( true );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
parent::__construct( $this->gitium_menu_slug, $this->gitium_menu_slug );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
__( 'Git Configuration', 'gitium' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_action( 'admin_init', array( $this, 'regenerate_keypair' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git->commit( __( 'Initial commit', 'gitium' ), $current_user->display_name, $current_user->user_email );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
plugins_url( 'img/gitium.png', dirname( __FILE__ ) )
- Exclude checks
Space after opening parenthesis of function call prohibited Open
__( 'Configuration', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
new Gitium_Help( $submenu_hook, 'configuration' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( __( 'Keypair successfully regenerated.', 'gitium' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git->add_remote_url( $remote_url );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( empty( $remote_url ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( empty( $remote_url ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $remote_url ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $this->init_process( $remote_url ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->init_process( $remote_url ) ) {
- Exclude checks
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 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'Could not create initial commit -> ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'Could not create initial commit -> ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
plugins_url( 'img/gitium.png', dirname( __FILE__ ) )
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
__( 'Git Configuration', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
__( 'Configuration', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $submit_keypair ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( __( 'Keypair successfully regenerated.', 'gitium' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git->add_remote_url( $remote_url );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( __( 'Repository initialized successfully.', 'gitium' ) );
- Exclude checks
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 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'Could not create initial commit -> ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
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>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<th scope="row"><label for="key_pair"><?php _e( 'Key pair', 'gitium' ); ?></label></th>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<input type="submit" name="GitiumSubmitRegenerateKeypair" class="button" value="<?php _e( 'Regenerate Key', 'gitium' ); ?>" />
- Exclude checks
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' ); ?>
- Exclude checks
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' ); ?>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<?php wp_nonce_field( 'gitium-admin' ); ?>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<?php wp_nonce_field( 'gitium-admin' ); ?>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<th scope="row"><label for="tracking_branch"><?php _e( 'Choose tracking branch', 'gitium' ); ?></label></th>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<option value="<?php echo esc_attr( $branch ); ?>"><?php echo esc_html( $branch ); ?></option>
- Exclude checks
Opening brace should be on a new line Open
public function __construct() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( 'admin_init', array( $this, 'choose_branch' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_action( 'admin_init', array( $this, 'disconnect_repository' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( __( 'Keypair successfully regenerated.', 'gitium' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'Please specify a valid repo.', 'gitium' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->git->push( $branch );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<h2><?php _e( 'Warning!', 'gitium' ); ?></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<h2><?php _e( 'Configuration step 1', 'gitium' ); ?></h2>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
plugins_url( 'img/gitium.png', dirname( __FILE__ ) )
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( count( $git->get_remote_branches() ) == 0 ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git->add( 'wp-content', '.gitignore' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git->commit( __( 'Initial commit', 'gitium' ), $current_user->display_name, $current_user->user_email );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( __( 'Repository initialized successfully.', 'gitium' ) );
- Exclude checks
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() ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :
- Exclude checks
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">
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<input type="submit" name="GitiumSubmitFetch" class="button-primary" value="<?php _e( 'Fetch', 'gitium' ); ?>" />
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
_gitium_status( true );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( 'admin_init', array( $this, 'regenerate_keypair' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_action( 'admin_init', array( $this, 'init_repo' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! $git->push( 'master' ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
- Exclude checks
Opening brace should be on a new line Open
public function choose_branch() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'Could not create initial commit -> ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<?php wp_nonce_field( 'gitium-admin' ); ?>
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( wp_content_is_versioned() ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
_gitium_status( true );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_action( 'admin_init', array( $this, 'choose_branch' ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( count( $git->get_remote_branches() ) == 0 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git->commit( __( 'Initial commit', 'gitium' ), $current_user->display_name, $current_user->user_email );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( __( 'Repository initialized successfully.', 'gitium' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'Could not merge the initial commit -> ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
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 />
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<?php wp_nonce_field( 'gitium-admin' ); ?>
- Exclude checks
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>
- Exclude checks
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>
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! isset( $submit_keypair ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! isset( $submit_keypair ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $git->push( 'master' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'Please specify a valid repo.', 'gitium' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
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 );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $this->git->merge_initial_commit( $commit, $branch ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->git->push( $branch );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( __( 'Branch selected successfully.', 'gitium' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Opening brace should be on a new line Open
public function admin_menu() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
new Gitium_Help( $submenu_hook, 'configuration' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
__( 'Git Configuration', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( __( 'Keypair successfully regenerated.', 'gitium' ) );
- Exclude checks
Opening brace should be on a new line Open
public function gitium_warning() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! isset( $submit_warning ) ) {
- Exclude checks
Opening brace should be on a new line Open
public function init_repo() {
- Exclude checks
Opening brace should be on a new line Open
public function init_process( $remote_url ) {
- Exclude checks
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() ) );
- Exclude checks
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() ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'Could not merge the initial commit -> ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
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 />
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'Could not merge the initial commit -> ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( __( 'Branch selected successfully.', 'gitium' ) );
- Exclude checks
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 />
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<th scope="row"><label for="key_pair"><?php _e( 'Key pair', 'gitium' ); ?></label></th>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<input type="submit" name="GitiumSubmitRegenerateKeypair" class="button" value="<?php _e( 'Regenerate Key', 'gitium' ); ?>" />
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<?php wp_nonce_field( 'gitium-admin' ); ?>
- Exclude checks
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>
- Exclude checks
Opening brace should be on a new line Open
private function setup_step_2() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( $this->init_process( $remote_url ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( __( 'Repository initialized successfully.', 'gitium' ) );
- Exclude checks
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() ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
set_transient( 'gitium_remote_tracking_branch', $branch );
- Exclude checks
Opening brace should be on a new line Open
private function setup_step_1_remote_url() {
- Exclude checks
Opening brace should be on a new line Open
private function setup_step_1_key_pair() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<h2><?php _e( 'Warning!', 'gitium' ); ?></h2>
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
<?php foreach ( $git->get_remote_branches() as $branch ) : ?>
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $this->git->is_status_working() || ! $this->git->get_remote_url() ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'Please specify a valid repo.', 'gitium' ) );
- Exclude checks
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() ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( __( 'Branch selected successfully.', 'gitium' ) );
- Exclude checks
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>
- Exclude checks
Opening brace should be on a new line Open
private function setup_warning() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<h2><?php _e( 'Configuration step 1', 'gitium' ); ?></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<option value="<?php echo esc_attr( $branch ); ?>"><?php echo esc_html( $branch ); ?></option>
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $this->git->get_remote_tracking_branch() ) {
- Exclude checks
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() ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! $this->git->merge_initial_commit( $commit, $branch ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( __( 'Branch selected successfully.', 'gitium' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! defined( 'GIT_KEY_FILE' ) || GIT_KEY_FILE == '' ) :
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<h2><?php _e( 'Configuration step 2', 'gitium' ); ?></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'Please specify a valid repo.', 'gitium' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
set_transient( 'gitium_remote_tracking_branch', $branch );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $commit ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<th scope="row"><label for="remote_url"><?php _e( 'Remote URL', 'gitium' ); ?></label></th>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<option value="<?php echo esc_attr( $branch ); ?>"><?php echo esc_html( $branch ); ?></option>
- Exclude checks
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>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<input type="submit" name="GitiumSubmitMergeAndPush" class="button-primary" value="<?php _e( 'Merge & Push', 'gitium' ); ?>" />
- Exclude checks
Opening brace should be on a new line Open
public function regenerate_keypair() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git->add( 'wp-content', '.gitignore' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
- Exclude checks
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 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $this->git->merge_initial_commit( $commit, $branch ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<th scope="row"><label for="remote_url"><?php _e( 'Remote URL', 'gitium' ); ?></label></th>
- Exclude checks
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 />
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<?php wp_nonce_field( 'gitium-admin' ); ?>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<input type="submit" name="GitiumSubmitFetch" class="button-primary" value="<?php _e( 'Fetch', 'gitium' ); ?>" />
- Exclude checks
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>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<option value="<?php echo esc_attr( $branch ); ?>"><?php echo esc_html( $branch ); ?></option>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<input type="submit" name="GitiumSubmitMergeAndPush" class="button-primary" value="<?php _e( 'Merge & Push', 'gitium' ); ?>" />
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
plugins_url( 'img/gitium.png', dirname( __FILE__ ) )
- Exclude checks
Space after opening parenthesis of function call prohibited Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Opening brace should be on a new line Open
private function setup_step_1() {
- Exclude checks
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>
- Exclude checks
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>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<th scope="row"><label for="tracking_branch"><?php _e( 'Choose tracking branch', 'gitium' ); ?></label></th>
- Exclude checks
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>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'Could not merge the initial commit -> ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
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">
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<h2><?php _e( 'Configuration step 2', 'gitium' ); ?></h2>
- Exclude checks
Opening brace should be on a new line Open
public function page() {
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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>
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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,
- Read upRead up
- Exclude checks
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>
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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,
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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>
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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,
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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>
- Read upRead up
- Exclude checks
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">
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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>
- Read upRead up
- Exclude checks
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>
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}