Method show_git_changes_table_rows
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function show_git_changes_table_rows( $changes = '' ) {
?>
<script type="application/javascript">
function add_path_and_submit( elem ) {
var container = document.getElementById( 'form_status' );
Missing class import via use statement (line '49', column '7'). Open
new Gitium_Help( $submenu_hook, 'status' );
- 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 save_ignorelist uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );
}
- 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
The method show_git_changes_table_rows uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';
}
- 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
The method save_ignorelist uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$path = $gitium_ignore_path;
}
- 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
The method show_git_changes_table uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else :
$this->show_git_changes_table_rows( $changes );
endif;
- 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 Status', '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
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Gitium_Submenu_Status extends Gitium_Menu {
- Exclude checks
The class Gitium_Submenu_Status is not named in CamelCase. Open
class Gitium_Submenu_Status extends Gitium_Menu {
public function __construct() {
parent::__construct( $this->gitium_menu_slug, $this->gitium_menu_slug );
- 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_Status 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( $gitium_ignore_path ) ) {
- Exclude checks
Method name "Gitium_Submenu_Status::save_ignorelist" is not in camel caps format Open
public function save_ignorelist() {
- Exclude checks
Method name "Gitium_Submenu_Status::admin_menu" is not in camel caps format Open
public function admin_menu() {
- Exclude checks
Expected 0 spaces between argument "$changes" and closing bracket; 1 found Open
private function show_ahead_and_behind_info( $changes = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $ahead && $behind ) {
- Exclude checks
Method name "Gitium_Submenu_Status::get_change_meanings" is not in camel caps format Open
private function get_change_meanings() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $gitium_save_changes ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $meaning[ $change ] ) ) {
- Exclude checks
Method name "Gitium_Submenu_Status::humanized_change" is not in camel caps format Open
public function humanized_change( $change ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 === strpos( $change, 'R ' ) ) {
- Exclude checks
Method name "Gitium_Submenu_Status::show_git_changes_table_rows" is not in camel caps format Open
private function show_git_changes_table_rows( $changes = '' ) {
- Exclude checks
Method name "Gitium_Submenu_Status::save_changes" is not in camel caps format Open
public function save_changes() {
- Exclude checks
Method name "Gitium_Submenu_Status::show_git_changes_table_submit_buttons" is not in camel caps format Open
private function show_git_changes_table_submit_buttons( $changes ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} elseif ( $ahead ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $changes as $path => $type ) :
- Exclude checks
Expected 0 spaces between opening bracket and argument "$changes"; 1 found Open
private function show_git_changes_table( $changes = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$changes"; 1 found Open
private function show_ahead_and_behind_info( $changes = '' ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $changes as $path => $type ) :
- Exclude checks
Expected 0 spaces between opening bracket and argument "$changes"; 1 found Open
private function show_git_changes_table_rows( $changes = '' ) {
- Exclude checks
Expected 0 spaces between argument "$changes" and closing bracket; 1 found Open
private function show_git_changes_table( $changes = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Method name "Gitium_Submenu_Status::show_ahead_and_behind_info" is not in camel caps format Open
private function show_ahead_and_behind_info( $changes = '' ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$changes"; 1 found Open
private function show_git_changes_table_submit_buttons( $changes ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $merge_success ) {
- Exclude checks
Expected 0 spaces between argument "$changes" and closing bracket; 1 found Open
private function show_git_changes_table_rows( $changes = '' ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$change"; 1 found Open
public function humanized_change( $change ) {
- Exclude checks
Expected 0 spaces between argument "$change" and closing bracket; 1 found Open
public function humanized_change( $change ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule
- Exclude checks
Method name "Gitium_Submenu_Status::show_git_changes_table" is not in camel caps format Open
private function show_git_changes_table( $changes = '' ) {
- Exclude checks
Expected 0 spaces between argument "$changes" and closing bracket; 1 found Open
private function show_git_changes_table_submit_buttons( $changes ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $commit ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $changes ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $ahead && ! $behind && empty( $changes ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $changes as $path => $type ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} elseif ( $behind ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $changes ) ) : ?>
- Exclude checks
Method name "Gitium_Submenu_Status::changes_page" is not in camel caps format Open
private function changes_page() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>
- 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
add_action( 'admin_init', array( $this, 'disconnect_repository' ) );
- 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
'rA' => __( 'added to remote', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'A' => __( 'added to work tree', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
__( 'Git Status', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( isset( $meaning[ $change ] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
__( 'Git Status', '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
);
- 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
$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
public function save_ignorelist() {
- 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
add_action( 'admin_init', array( $this, 'save_changes' ) );
- 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
'rD' => __( 'deleted from remote', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$meaning = $this->get_change_meanings();
- 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
$gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$path = $gitium_ignore_path;
- 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
$this->menu_slug,
- 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
public function humanized_change( $change ) {
- 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
$commitmsg = $gitium_commit_msg;
- 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
return array(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'rM' => __( 'modified on remote', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function show_ahead_and_behind_info( $changes = '' ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$branch = $this->git->get_remote_tracking_branch();
- 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
'M' => __( 'updated in work tree', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'AM' => __( 'added to work tree', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->success_redirect( __( 'The file `.gitignore` is saved!', 'gitium' ), $this->gitium_menu_slug );
- 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
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', 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->git->add();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {
- 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
input.value = elem;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo '<td><strong>' . esc_html( $path ) . '</strong>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function show_git_changes_table( $changes = '' ) {
- 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
);
- 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
'R' => __( 'deleted from work tree', '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
add_menu_page(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
gitium_commit_and_push_gitignore_file( $path );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'??' => __( 'untracked', '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
return $meaning[ $change ];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 0 === strpos( $change, 'R ' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commit = $this->git->commit( $commitmsg, $current_user->display_name, $current_user->user_email );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$change = sprintf( __( 'renamed from `%s`', 'gitium' ), $old_filename );
- 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
}
- 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
<table class="widefat" id="git-changes-table">
- 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
$this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<tbody>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
gitium_enable_maintenance_mode() or wp_die( __( 'Could not enable the maintenance mode!', 'gitium' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo '</p></td></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
<p>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! empty( $changes ) ) : ?>
- 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
} elseif ( $ahead ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
input.name = 'GitiumIgnorePath';
- 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
function add_path_and_submit( elem ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$counter++;
- 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
echo '</tr>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->show_git_changes_table_rows( $changes );
- 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
new Gitium_Help( $submenu_hook, 'status' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function get_change_meanings() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'D' => __( 'deleted from work tree', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $change;
- 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
if ( ! $merge_success ) {
- 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
var input = document.createElement( 'input' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
container.submit();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
_e( 'Submodules are not supported in this version.', 'gitium' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo '</td>';
- Exclude checks
Line exceeds 120 characters; contains 184 characters Open
<thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>
- 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
$this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );
- 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 = 'hidden';
- 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
add_action( 'admin_init', array( $this, 'save_ignorelist' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$old_filename = substr( $change, 2 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! isset( $gitium_save_changes ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
gitium_disable_maintenance_mode();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$behind = count( $this->git->get_behind_commits() );
- 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
echo '<td>';
- Exclude checks
Line exceeds 120 characters; contains 184 characters Open
<tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>
- 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
__( 'Status', 'gitium' ),
- 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->redirect( __( 'Merge failed: ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';
- 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
array( $this, 'page' )
- 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
$merge_success = gitium_merge_and_push( $commit );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ahead = count( $this->git->get_ahead_commits() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php printf( __( 'Following remote branch <code>%s</code>.', 'gitium' ), $branch );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! $ahead && ! $behind && empty( $changes ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo ( 0 != $counter % 2 ) ? '<tr class="alternate">' : '<tr>';
- 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
_e( 'Nothing to commit, working directory clean.', 'gitium' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! isset( $gitium_ignore_path ) ) {
- Exclude checks
Line exceeds 120 characters; contains 151 characters Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- 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
</script>
- 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
printf( __( 'You are %s commits ahead remote.', 'gitium' ), $ahead );
- 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
var container = document.getElementById( 'form_status' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else :
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
$this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );
- 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 commit!', 'gitium' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $ahead && $behind ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
printf( __( 'You are %s commits ahead and %s behind remote.', 'gitium' ), $ahead, $behind );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$counter = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo '<div class="row-actions"><span class="edit"><a href="#" onclick="add_path_and_submit(\'' . $path . '\');">' . __( 'Add this file to the `.gitignore` list.', 'gitium' ) . '</a></span></div></td>';
- 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
endforeach;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
endif;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</tbody>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );
- 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
container.appendChild( input );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function show_git_changes_table_submit_buttons( $changes ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function save_changes() {
- 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
_e( 'Everything is up to date', 'gitium' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
printf( __( 'You are %s commits behind remote.', 'gitium' ), $behind );
- 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
private function show_git_changes_table_rows( $changes = '' ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $changes as $path => $type ) :
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif ( $behind ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<script type="application/javascript">
- Exclude checks
Line exceeds 120 characters; contains 213 characters Open
echo '<div class="row-actions"><span class="edit"><a href="#" onclick="add_path_and_submit(\'' . $path . '\');">' . __( 'Add this file to the `.gitignore` list.', 'gitium' ) . '</a></span></div></td>';
- 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 ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( empty( $changes ) ) :
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo '<tr><td><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
public function page() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Line exceeds 120 characters; contains 245 characters Open
<input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>
- Exclude checks
Line exceeds 120 characters; contains 248 characters Open
<h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
wp_nonce_field( 'gitium-admin' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $changes ) = _gitium_status();
- 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
</form>
- 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
<form name="form_status" id="form_status" 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
$this->show_message();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<label for="save-changes"><?php _e( 'Commit message', 'gitium' ); ?>:</label>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />
- 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
<?php endif;
- 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 id="icon-options-general" class="icon32"> </div>
- 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
- 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>
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->show_ahead_and_behind_info( $changes );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->show_git_changes_table( $changes );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->show_git_changes_table_submit_buttons( $changes );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function changes_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
$this->show_disconnect_repository_button();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
_gitium_status( true );
- Exclude checks
Line exceeds 120 characters; contains 207 characters Open
<input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->changes_page();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- 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
add_action( 'admin_init', array( $this, 'save_changes' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited 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, 'save_ignorelist' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
__( 'Git Status', 'gitium' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
__( 'Git Status', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
new Gitium_Help( $submenu_hook, 'status' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
'rM' => __( 'modified on remote', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
'A' => __( 'added to work tree', 'gitium' ),
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 === strpos( $change, 'R ' ) ) {
- 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
plugins_url( 'img/gitium.png', dirname( __FILE__ ) )
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$change = sprintf( __( 'renamed from `%s`', 'gitium' ), $old_filename );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $meaning[ $change ] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $meaning[ $change ] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( __( 'The file `.gitignore` is saved!', 'gitium' ), $this->gitium_menu_slug );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );
- 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
'rA' => __( 'added to remote', 'gitium' ),
- Exclude checks
Opening brace should be on a new line Open
public function humanized_change( $change ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $meaning[ $change ] ) ) {
- 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
add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
'M' => __( 'updated in work tree', 'gitium' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! isset( $gitium_ignore_path ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Class name "Gitium_Submenu_Status" is not in camel caps format Open
class Gitium_Submenu_Status extends Gitium_Menu {
- 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
__( 'Status', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( 'admin_init', array( $this, 'save_changes' ) );
- 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
'??' => __( 'untracked', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
'rA' => __( 'added to remote', 'gitium' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commit = $this->git->commit( $commitmsg, $current_user->display_name, $current_user->user_email );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'Could not commit!', 'gitium' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'Merge failed: ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<?php printf( __( 'Following remote branch <code>%s</code>.', 'gitium' ), $branch );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
_e( 'Everything is up to date', 'gitium' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
printf( __( 'You are %s commits ahead remote.', 'gitium' ), $ahead );
- 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
'R' => __( 'deleted from work tree', 'gitium' ),
- Exclude checks
Opening brace should be on a new line Open
public function save_ignorelist() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! isset( $gitium_ignore_path ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Opening brace should be on a new line Open
public function save_changes() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
gitium_enable_maintenance_mode() or wp_die( __( 'Could not enable the maintenance mode!', 'gitium' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
_e( 'Everything is up to date', 'gitium' );
- Exclude checks
Opening brace should be on a new line Open
public function __construct() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
'A' => __( 'added to work tree', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
'AM' => __( 'added to work tree', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );
- Exclude checks
Opening brace should be on a new line Open
private function show_ahead_and_behind_info( $changes = '' ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<?php printf( __( 'Following remote branch <code>%s</code>.', 'gitium' ), $branch );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
printf( __( 'You are %s commits behind remote.', 'gitium' ), $behind );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule
- Exclude checks
Space after opening parenthesis of function call prohibited Open
'??' => __( 'untracked', 'gitium' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
'AM' => __( 'added to work tree', 'gitium' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( 0 === strpos( $change, 'R ' ) ) {
- Exclude checks
Opening brace should be on a new line Open
public function admin_menu() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
'D' => __( 'deleted from work tree', 'gitium' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
'M' => __( 'updated in work tree', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$old_filename = substr( $change, 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
printf( __( 'You are %s commits behind remote.', 'gitium' ), $behind );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$change = sprintf( __( 'renamed from `%s`', 'gitium' ), $old_filename );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$change = sprintf( __( 'renamed from `%s`', 'gitium' ), $old_filename );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';
- Exclude checks
Space after opening parenthesis of function call prohibited Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
check_admin_referer( 'gitium-admin' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>
- 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( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'Merge failed: ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'Could not commit!', 'gitium' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$merge_success = gitium_merge_and_push( $commit );
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 8 Open
if ( $ahead && $behind ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
printf( __( 'You are %s commits ahead remote.', 'gitium' ), $ahead );
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 8 Open
} elseif ( $behind ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
_e( 'Submodules are not supported in this version.', 'gitium' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
echo '<td><strong>' . esc_html( $path ) . '</strong>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
_e( 'Nothing to commit, working directory clean.', 'gitium' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Opening brace should be on a new line Open
private function get_change_meanings() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
'rD' => __( 'deleted from remote', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
'D' => __( 'deleted from work tree', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
gitium_enable_maintenance_mode() or wp_die( __( 'Could not enable the maintenance mode!', 'gitium' ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
} elseif ( $ahead ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
echo '<div class="row-actions"><span class="edit"><a href="#" onclick="add_path_and_submit(\'' . $path . '\');">' . __( 'Add this file to the `.gitignore` list.', 'gitium' ) . '</a></span></div></td>';
- Exclude checks
Opening brace should be on a new line Open
private function show_git_changes_table_submit_buttons( $changes ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! empty( $changes ) ) : ?>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'Could not commit!', 'gitium' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'Could not commit!', 'gitium' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$merge_success = gitium_merge_and_push( $commit );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'Merge failed: ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<?php printf( __( 'Following remote branch <code>%s</code>.', 'gitium' ), $branch );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $ahead && $behind ) {
- Exclude checks
Opening brace should be on a new line Open
private function show_git_changes_table_rows( $changes = '' ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_action( 'admin_init', array( $this, 'save_ignorelist' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
__( 'Git Status', 'gitium' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
__( 'Status', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 === strpos( $change, 'R ' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->redirect( __( 'The file `.gitignore` could not be saved!', 'gitium' ), false, $this->gitium_menu_slug );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $gitium_commit_msg ) && ! empty( $gitium_commit_msg ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commit = $this->git->commit( $commitmsg, $current_user->display_name, $current_user->user_email );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<?php printf( __( 'Following remote branch <code>%s</code>.', 'gitium' ), $branch );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
echo '<td><strong>' . esc_html( $path ) . '</strong>';
- Exclude checks
Opening brace should be on a new line Open
private function show_git_changes_table( $changes = '' ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( empty( $changes ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $changes ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $changes ) ) : ?>
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
__( 'Git Status', 'gitium' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
'R' => __( 'deleted from work tree', 'gitium' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$old_filename = substr( $change, 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$change = sprintf( __( 'renamed from `%s`', 'gitium' ), $old_filename );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $gitium_ignore_path ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
gitium_enable_maintenance_mode() or wp_die( __( 'Could not enable the maintenance mode!', 'gitium' ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $merge_success ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$behind = count( $this->git->get_behind_commits() );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! $ahead && ! $behind && empty( $changes ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
printf( __( 'You are %s commits ahead and %s behind remote.', 'gitium' ), $ahead, $behind );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
printf( __( 'You are %s commits ahead and %s behind remote.', 'gitium' ), $ahead, $behind );
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 8 Open
}
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
new Gitium_Help( $submenu_hook, 'status' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
'rM' => __( 'modified on remote', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
'rD' => __( 'deleted from remote', 'gitium' ),
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
gitium_commit_and_push_gitignore_file( $path );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( __( 'The file `.gitignore` is saved!', 'gitium' ), $this->gitium_menu_slug );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->success_redirect( sprintf( __( 'Pushed commit: `%s`', 'gitium' ), $commitmsg ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$ahead = count( $this->git->get_ahead_commits() );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$ahead = count( $this->git->get_ahead_commits() );
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 8 Open
if ( ! $ahead && ! $behind && empty( $changes ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! isset( $gitium_save_changes ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commitmsg = sprintf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $commit ) {
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 8 Open
}
- Exclude checks
Space after opening parenthesis of function call prohibited Open
printf( __( 'You are %s commits behind remote.', 'gitium' ), $behind );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $changes ) ) : ?>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( __( 'The file `.gitignore` is saved!', 'gitium' ), $this->gitium_menu_slug );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $ahead && ! $behind && empty( $changes ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
} elseif ( $behind ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->show_git_changes_table_rows( $changes );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! isset( $gitium_save_changes ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$behind = count( $this->git->get_behind_commits() );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
printf( __( 'You are %s commits ahead and %s behind remote.', 'gitium' ), $ahead, $behind );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( empty( $changes ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->success_redirect( __( 'The file `.gitignore` is saved!', 'gitium' ), $this->gitium_menu_slug );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $gitium_save_changes ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->redirect( __( 'Merge failed: ', 'gitium' ) . $this->git->get_last_error() );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
printf( __( 'You are %s commits ahead remote.', 'gitium' ), $ahead );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule
- Exclude checks
Space after opening parenthesis of function call prohibited Open
echo '<span title="' . esc_html( $type ) .'">' . esc_html( $this->humanized_change( $type ) ) . '</span>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->git->set_gitignore( join( "\n", array_unique( array_merge( explode( "\n", $this->git->get_gitignore() ), array( $path ) ) ) ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
gitium_commit_and_push_gitignore_file( $path );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
gitium_enable_maintenance_mode() or wp_die( __( 'Could not enable the maintenance mode!', 'gitium' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $ahead && ! $behind && empty( $changes ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
printf( __( 'You are %s commits ahead remote.', 'gitium' ), $ahead );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
_e( 'Submodules are not supported in this version.', 'gitium' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
echo '<div class="row-actions"><span class="edit"><a href="#" onclick="add_path_and_submit(\'' . $path . '\');">' . __( 'Add this file to the `.gitignore` list.', 'gitium' ) . '</a></span></div></td>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_dir( ABSPATH . '/' . $path ) && is_dir( ABSPATH . '/' . trailingslashit( $path ) . '.git' ) ) { // test if is submodule
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
printf( __( 'You are %s commits ahead and %s behind remote.', 'gitium' ), $ahead, $behind );
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 8 Open
} elseif ( $ahead ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
printf( __( 'You are %s commits behind remote.', 'gitium' ), $behind );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $changes as $path => $type ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
_e( 'Nothing to commit, working directory clean.', 'gitium' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->show_git_changes_table_rows( $changes );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
<input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>
- Exclude checks
Closing brace must be on a line by itself Open
<input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>
- Exclude checks
Opening brace should be on a new line Open
private function changes_page() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<label for="save-changes"><?php _e( 'Commit message', 'gitium' ); ?>:</label>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
wp_nonce_field( 'gitium-admin' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<label for="save-changes"><?php _e( 'Commit message', 'gitium' ); ?>:</label>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->show_git_changes_table( $changes );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->show_git_changes_table( $changes );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
wp_nonce_field( 'gitium-admin' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->show_git_changes_table_submit_buttons( $changes );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->show_ahead_and_behind_info( $changes );
- Exclude checks
Opening brace should be on a new line Open
public function page() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
_gitium_status( true );
- Exclude checks
Newline required after opening brace Open
<input type="submit" name="GitiumSubmitSaveChanges" class="button-primary button" value="<?php _e( 'Save changes', 'gitium' ); ?>" <?php if ( get_transient( 'gitium_remote_disconnected' ) ) { echo 'disabled="disabled" '; } ?>/>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />
- 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
<h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<h2><?php _e( 'Status', 'gitium' ); ?> <code class="small" style="background-color:forestgreen; color:whitesmoke;"><?php _e( 'connected to', 'gitium' ); ?> <strong><?php echo esc_html( $this->git->get_remote_url() ); ?></strong></code></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->show_ahead_and_behind_info( $changes );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->show_git_changes_table_submit_buttons( $changes );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />
- Exclude checks
The variable $gitium_save_changes is not named in camelCase. Open
public function save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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 save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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 save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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_commit_msg is not named in camelCase. Open
public function save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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 save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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_save_changes is not named in camelCase. Open
public function save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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_commit_msg is not named in camelCase. Open
public function save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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 Status', '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 $gitium_commit_msg is not named in camelCase. Open
public function save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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 $merge_success is not named in camelCase. Open
public function save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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 $old_filename is not named in camelCase. Open
public function humanized_change( $change ) {
$meaning = $this->get_change_meanings();
if ( isset( $meaning[ $change ] ) ) {
return $meaning[ $change ];
- 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_commit_msg is not named in camelCase. Open
public function save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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_ignore_path is not named in camelCase. Open
public function save_ignorelist() {
$gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_ignore_path ) ) {
return;
} else {
- 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 $old_filename is not named in camelCase. Open
public function humanized_change( $change ) {
$meaning = $this->get_change_meanings();
if ( isset( $meaning[ $change ] ) ) {
return $meaning[ $change ];
- 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_ignore_path is not named in camelCase. Open
public function save_ignorelist() {
$gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_ignore_path ) ) {
return;
} else {
- 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 Status', '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 $merge_success is not named in camelCase. Open
public function save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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_ignore_path is not named in camelCase. Open
public function save_ignorelist() {
$gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_ignore_path ) ) {
return;
} else {
- 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 humanized_change is not named in camelCase. Open
public function humanized_change( $change ) {
$meaning = $this->get_change_meanings();
if ( isset( $meaning[ $change ] ) ) {
return $meaning[ $change ];
- 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 show_git_changes_table is not named in camelCase. Open
private function show_git_changes_table( $changes = '' ) {
?>
<table class="widefat" id="git-changes-table">
<thead><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></thead>
<tfoot><tr><th scope="col" class="manage-column"><?php _e( 'Path', 'gitium' ); ?></th><th scope="col" class="manage-column"><?php _e( 'Change', 'gitium' ); ?></th></tr></tfoot>
- 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 show_git_changes_table_submit_buttons is not named in camelCase. Open
private function show_git_changes_table_submit_buttons( $changes ) {
if ( ! empty( $changes ) ) : ?>
<p>
<label for="save-changes"><?php _e( 'Commit message', 'gitium' ); ?>:</label>
<input type="text" name="commitmsg" id="save-changes" class="widefat" value="" placeholder="<?php printf( __( 'Merged changes from %s on %s', 'gitium' ), get_site_url(), date( 'm.d.Y' ) ); ?>" />
- 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 get_change_meanings is not named in camelCase. Open
private function get_change_meanings() {
return array(
'??' => __( 'untracked', 'gitium' ),
'rM' => __( 'modified on remote', 'gitium' ),
'rA' => __( 'added to remote', 'gitium' ),
- 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 save_ignorelist is not named in camelCase. Open
public function save_ignorelist() {
$gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_ignore_path ) ) {
return;
} else {
- 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 save_changes is not named in camelCase. Open
public function save_changes() {
$gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ( ! isset( $gitium_save_changes ) ) {
return;
- 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 show_git_changes_table_rows is not named in camelCase. Open
private function show_git_changes_table_rows( $changes = '' ) {
?>
<script type="application/javascript">
function add_path_and_submit( elem ) {
var container = document.getElementById( 'form_status' );
- 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 changes_page is not named in camelCase. Open
private function changes_page() {
list( , $changes ) = _gitium_status();
?>
<div class="wrap">
<div id="icon-options-general" class="icon32"> </div>
- 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 Status', '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 show_ahead_and_behind_info is not named in camelCase. Open
private function show_ahead_and_behind_info( $changes = '' ) {
$branch = $this->git->get_remote_tracking_branch();
$ahead = count( $this->git->get_ahead_commits() );
$behind = count( $this->git->get_behind_commits() );
?>
- 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() {
}
}