Function _gitium_module_by_path
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
function _gitium_module_by_path( $path ) {
$versions = gitium_get_versions();
// default values
$module = array(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File functions.php
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* Copyright 2014-2016 Presslabs SRL <ping@presslabs.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
Method _gitium_module_by_path
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _gitium_module_by_path( $path ) {
$versions = gitium_get_versions();
// default values
$module = array(
Function _gitium_status
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function _gitium_status( $update_transient = false ) {
global $git;
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
return $changes;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The function _gitium_module_by_path() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. Open
function _gitium_module_by_path( $path ) {
$versions = gitium_get_versions();
// default values
$module = array(
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The method _gitium_is_status_working has a boolean flag argument $update_transient, which is a certain sign of a Single Responsibility Principle violation. Open
function _gitium_is_status_working( $update_transient = false ) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method _gitium_get_remote_tracking_branch has a boolean flag argument $update_transient, which is a certain sign of a Single Responsibility Principle violation. Open
function _gitium_get_remote_tracking_branch( $update_transient = false ) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method _gitium_format_message has a boolean flag argument $version, which is a certain sign of a Single Responsibility Principle violation. Open
function _gitium_format_message( $name, $version = false, $prefix = '' ) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method _gitium_status has a boolean flag argument $update_transient, which is a certain sign of a Single Responsibility Principle violation. Open
function _gitium_status( $update_transient = false ) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method gitium_get_webhook_key has a boolean flag argument $generate_new_webhook_key, which is a certain sign of a Single Responsibility Principle violation. Open
function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method gitium_get_keypair has a boolean flag argument $generate_new_keypair, which is a certain sign of a Single Responsibility Principle violation. Open
function gitium_get_keypair( $generate_new_keypair = false ) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid assigning values to variables in if clauses and the like (line '289', column '44'). Open
function _gitium_get_remote_tracking_branch( $update_transient = false ) {
if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
return $remote_branch;
} else {
return gitium_update_remote_tracking_branch();
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method _gitium_status uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
delete_transient( 'gitium_remote_disconnected' );
}
- 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
Avoid assigning values to variables in if clauses and the like (line '304', column '44'). Open
function _gitium_is_status_working( $update_transient = false ) {
if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
return $is_status_working;
} else {
return gitium_update_is_status_working();
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method gitium_enable_maintenance_mode uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return true;
}
- 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 _gitium_get_remote_tracking_branch uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return gitium_update_remote_tracking_branch();
}
- 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
Avoid assigning values to variables in if clauses and the like (line '314', column '44'). Open
function _gitium_status( $update_transient = false ) {
global $git;
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
return $changes;
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '398', column '19'). Open
function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
if ( $generate_new_webhook_key ) {
$key = _gitium_generate_webhook_key();
delete_option( 'gitium_webhook_key' );
add_option( 'gitium_webhook_key', $key, '', false );
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method _gitium_status uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
delete_transient( 'gitium_remote_disconnected' );
$changes = array();
}
- 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 gitium_check_after_event uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$name = $plugin;
}
- 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
Avoid assigning values to variables in if clauses and the like (line '380', column '19'). Open
function gitium_get_keypair( $generate_new_keypair = false ) {
if ( $generate_new_keypair ) {
$keypair = _gitium_generate_keypair();
delete_option( 'gitium_keypair' );
add_option( 'gitium_keypair', $keypair, '', false );
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method _gitium_is_status_working uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return gitium_update_is_status_working();
}
- 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
Avoid unused local variables such as '$gitium_lock_path'. Open
list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid excessively long variable names like $generate_new_webhook_key. Keep variable name length under 20. Open
function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
- 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
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 18 and the first side effect is on line 37. Open
<?php
- Exclude checks
The parameter $update_transient is not named in camelCase. Open
function _gitium_is_status_working( $update_transient = false ) {
if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
return $is_status_working;
} else {
return gitium_update_is_status_working();
- 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 parameter $update_transient is not named in camelCase. Open
function _gitium_get_remote_tracking_branch( $update_transient = false ) {
if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
return $remote_branch;
} else {
return gitium_update_remote_tracking_branch();
- 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 parameter $msg_append is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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 parameter $generate_new_keypair is not named in camelCase. Open
function gitium_get_keypair( $generate_new_keypair = false ) {
if ( $generate_new_keypair ) {
$keypair = _gitium_generate_keypair();
delete_option( 'gitium_keypair' );
add_option( 'gitium_keypair', $keypair, '', false );
- 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 parameter $update_transient is not named in camelCase. Open
function _gitium_status( $update_transient = false ) {
global $git;
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
return $changes;
- 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 parameter $generate_new_webhook_key is not named in camelCase. Open
function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
if ( $generate_new_webhook_key ) {
$key = _gitium_generate_webhook_key();
delete_option( 'gitium_webhook_key' );
add_option( 'gitium_webhook_key', $key, '', false );
- 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
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'gitium_disable_maintenance_mode' ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $version ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$name"; 1 found Open
function _gitium_format_message( $name, $version = false, $prefix = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Expected 0 spaces between opening bracket and argument "$message"; 1 found Open
function _gitium_commit_changes( $message, $dir = '.' ) {
- Exclude checks
Expected 0 spaces between argument "$path" and closing bracket; 1 found Open
function _gitium_module_by_path( $path ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'gitium_enable_maintenance_mode' ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false === file_put_contents( $file, '<?php $upgrading = ' . time() .';' ) ) {
- Exclude checks
Expected 0 spaces between argument "$dir" and closing bracket; 1 found Open
function _gitium_commit_changes( $message, $dir = '.' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $versions['themes'] as $theme => $data ) {
- Exclude checks
Expected 0 spaces between argument "$msg_append" and closing bracket; 1 found Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $versions ) ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $uncommited_changes as $path => $action ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 2 < count( $split_path ) ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$path"; 1 found Open
function _gitium_module_by_path( $path ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$message"; 1 found Open
function gitium_error_log( $message ) {
- Exclude checks
Expected 0 spaces between argument "$message" and closing bracket; 1 found Open
function gitium_error_log( $message ) {
- Exclude checks
Expected 0 spaces between argument "$prefix" and closing bracket; 1 found Open
function _gitium_format_message( $name, $version = false, $prefix = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $uncommited_changes as $path => $action ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $prefix ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $versions['themes'] as $theme => $data ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $versions['plugins'] as $plugin => $data ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 === strpos( $path, "wp-content/themes/$theme" ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $msg_append ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ord( $buffer[0] ) & 0x80 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $commit_groups as $base_path => $change ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 'gitium/gitium.php' == $plugin ) { return; } // do not hook on activation of this plugin
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $versions['plugins'][ $plugin ] ) ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$update_transient"; 1 found Open
function _gitium_status( $update_transient = false ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$generate_new_keypair"; 1 found Open
function gitium_get_keypair( $generate_new_keypair = false ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$commits"; 1 found Open
function gitium_merge_and_push( $commits ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$plugin"; 1 found Open
function gitium_check_after_event( $plugin, $event = 'activation' ) {
- Exclude checks
Expected 0 spaces between argument "$update_transient" and closing bracket; 1 found Open
function _gitium_status( $update_transient = false ) {
- Exclude checks
Expected 0 spaces between argument "$update_transient" and closing bracket; 1 found Open
function _gitium_is_status_working( $update_transient = false ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $commit_groups as $base_path => $change ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$generate_new_webhook_key"; 1 found Open
function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( ! flock( $gitium_lock_handle, LOCK_EX | LOCK_NB ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
- Exclude checks
Expected 0 spaces between argument "$generate_new_keypair" and closing bracket; 1 found Open
function gitium_get_keypair( $generate_new_keypair = false ) {
- Exclude checks
Expected 0 spaces between argument "$generate_new_webhook_key" and closing bracket; 1 found Open
function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( "wp-content/plugins/$plugin" === $path ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $commit ) {
- Exclude checks
Expected 0 spaces between argument "$path" and closing bracket; 1 found Open
function gitium_commit_and_push_gitignore_file( $path = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $git->is_dirty() ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$update_transient"; 1 found Open
function _gitium_is_status_working( $update_transient = false ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $uncommited_changes as $path => $action ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $git->fetch_ref() ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $git->fetch_ref() ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $git->is_status_working() && $git->get_remote_tracking_branch() ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $versions['plugins'] as $plugin => $data ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( '.' === dirname( $plugin ) ) { // single file plugin
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $commit_groups as $base_path => $change ) {
- Exclude checks
Expected 0 spaces between argument "$lock" and closing bracket; 1 found Open
function gitium_release_merge_lock( $lock ) {
- Exclude checks
Expected 0 spaces between argument "$commits" and closing bracket; 1 found Open
function gitium_merge_and_push( $commits ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $lock_retries * $lock_timeout_ms > $lock_timeout * 1000 ) {
- Exclude checks
Expected 0 spaces between argument "$event" and closing bracket; 1 found Open
function gitium_check_after_event( $plugin, $event = 'activation' ) {
- Exclude checks
Expected 0 spaces between argument "$buffer" and closing bracket; 1 found Open
function _gitium_ssh_encode_buffer( $buffer ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $generate_new_keypair ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false === ( $keypair = get_option( 'gitium_keypair', false ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false === ( $key = get_option( 'gitium_webhook_key', false ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'gitium_release_merge_lock' ) ) :
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $versions['themes'] as $theme => $data ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $versions['plugins'] as $plugin => $data ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$msg_append"; 1 found Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$lock"; 1 found Open
function gitium_release_merge_lock( $lock ) {
- Exclude checks
Expected 0 spaces between argument "$update_transient" and closing bracket; 1 found Open
function _gitium_get_remote_tracking_branch( $update_transient = false ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$buffer"; 1 found Open
function _gitium_ssh_encode_buffer( $buffer ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $generate_new_webhook_key ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$path"; 1 found Open
function gitium_commit_and_push_gitignore_file( $path = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'gitium_acquire_merge_lock' ) ) :
- Exclude checks
Expected 0 spaces between opening bracket and argument "$update_transient"; 1 found Open
function _gitium_get_remote_tracking_branch( $update_transient = false ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false === $git_version ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false === $git_version ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( false === file_put_contents( $file, '<?php $upgrading = ' . time() .';' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $git_private_key ) = gitium_get_keypair();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'name' => basename( $path ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git->set_key( $git_private_key );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'base_path' => $path,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'type' => 'file',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- 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
$commit_message .= " version $version";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$file = ABSPATH . '/.maintenance';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$versions = get_transient( 'gitium_versions' );
- Exclude checks
Inline control structures are not allowed Open
if (!$git_private_key)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commit_message = "`$name`";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 2 < count( $split_path ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( empty( $versions ) ) {
- 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
return $git->commit( $message, $current_user->display_name, $current_user->user_email );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// default values
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// find the base_path
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$git_private_key)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$versions = gitium_get_versions();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function gitium_enable_maintenance_mode() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $prefix ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $versions['themes'] as $theme => $data ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $versions['plugins'] as $plugin => $data ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$msg_append = "($msg_append)";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commits[] = $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
return unlink( ABSPATH . '/.maintenance' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commit_message = "$prefix $commit_message";
- 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 $commits;
- 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
function gitium_disable_maintenance_mode() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $version ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module['name'] = $data['name'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$change['action'] = $action;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$versions = gitium_update_versions();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// find other data for theme
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module['version'] = $data['version'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $module;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$uncommited_changes = $git->get_local_changes();
- 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
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- 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 $versions;
- 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
gitium_update_versions();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module['name'] = $data['name'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$change = _gitium_module_by_path( $path );
- 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_merge_and_push( $commit );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
error_log( "gitium_error_log: $message" );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'version' => null,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commits = array();
- 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
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git->add( $dir );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $commit_message;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module = array(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( "wp-content/plugins/$plugin" === $path ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module['version'] = $data['version'];
- 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
if ( ! empty( $msg_append ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commit_message = _gitium_format_message( $change['name'], $change['version'], "{$change['action']} {$change['type']}" );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git->add( '.gitignore' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commit = $git->commit( 'Update the `.gitignore` file', $current_user->display_name, $current_user->user_email );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function gitium_acquire_merge_lock() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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
);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$split_path = explode( '/', $path );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module['base_path'] = "{$split_path[0]}/{$split_path[1]}/{$split_path[2]}";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module['name'] = $data['name'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $uncommited_changes as $path => $action ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return file_exists( WP_CONTENT_DIR . '/.git' );
- 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
}
- 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
usleep( $lock_timeout_ms * 1000 );
- 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
$versions = gitium_update_versions();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$name = $plugin;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
- 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 ( isset( $versions['plugins'][ $plugin ] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$version = $versions['plugins'][ $plugin ]['version'];
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// find other data for plugin
- 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
foreach ( $commit_groups as $base_path => $change ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$lock_retries = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$lock_retries++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
gitium_error_log( __FUNCTION__ );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
or trigger_error( 'Timeout when gitium lock was acquired', E_USER_WARNING );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$remote_branch = $git->get_remote_tracking_branch();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
set_transient( 'gitium_remote_tracking_branch', $remote_branch );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
set_transient( 'gitium_is_status_working', $is_status_working );
- 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 ( ! $git->fetch_ref() ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$private_key = openssl_pkey_get_private( $rsa_key );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$key_info = openssl_pkey_get_details( $rsa_key );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $generate_new_keypair ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$key = _gitium_generate_webhook_key();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $remote_branch;
- 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
$buffer = pack( 'N', 7 ) . 'ssh-rsa' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_option( 'gitium_keypair', $keypair, '', false );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $generate_new_webhook_key ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( $gitium_lock_path, $gitium_lock_handle );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 'gitium/gitium.php' == $plugin ) { return; } // do not hook on activation of this plugin
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $git->is_dirty() ) {
- 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
}
- 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 $is_status_working;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return gitium_update_is_status_working();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( false === $git_version ) {
- 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_key = 'ssh-rsa ' . base64_encode( $buffer ) . ' gitium@' . parse_url( get_home_url(), PHP_URL_HOST );
- 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 ( false === ( $key = get_option( 'gitium_webhook_key', false ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
fclose( $gitium_lock_handle );
- 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
if ( ! $git->fetch_ref() ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ord( $buffer[0] ) & 0x80 ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$try)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module['type'] = 'plugin';
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $changes;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git_version = get_transient( 'gitium_git_version' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
set_transient( 'gitium_remote_disconnected', $git->get_last_error() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$keypair = _gitium_generate_keypair();
- 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 ( 0 === strpos( $path, "wp-content/themes/$theme" ) ) {
- 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
$commit_groups = array();
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
$commit_message = _gitium_format_message( $change['name'], $change['version'], "{$change['action']} {$change['type']}" );
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$changes = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $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
)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
- 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
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
delete_transient( 'gitium_remote_disconnected' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$try = openssl_pkey_export( $private_key, $pem ); //Private Key
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
gitium_release_merge_lock( $lock );
- 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
$changes = $git->status();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
delete_transient( 'gitium_remote_disconnected' );
- 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
add_option( 'gitium_keypair', $keypair, '', false );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $key;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$lock = gitium_acquire_merge_lock()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $remote_branch;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
array(
- Exclude checks
Inline control structures are not allowed Open
if (!$try)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
delete_option( 'gitium_keypair' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $keypair;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $key;
- 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
$lock_timeout_ms = 10;
- 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
$merge_status = $git->merge_with_accept_mine( $commits );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
gitium_error_log( __FUNCTION__ );
- 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
flock( $gitium_lock_handle, LOCK_UN );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$name = $versions['plugins'][ $plugin ]['name'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
gitium_auto_push( _gitium_format_message( $name, $version, "after $event of" ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $git->is_status_working() && $git->get_remote_tracking_branch() ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return pack( 'Na*', $len, $buffer );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$is_status_working = $git->is_status_working();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $is_status_working;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
delete_option( 'gitium_webhook_key' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_option( 'gitium_webhook_key', $key, '', false );
- 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
set_transient( 'gitium_git_version', $git->get_version() );
- 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
$len = strlen( $buffer );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$len++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$rsa_key = openssl_pkey_new(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$url = add_query_arg( 'key', $key, plugins_url( 'gitium-webhook.php', __FILE__ ) );
- 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
if ( false === ( $keypair = get_option( 'gitium_keypair', false ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_option( 'gitium_webhook_key', $key, '', false );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false; // timeout
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function gitium_release_merge_lock( $lock ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $git->push() && $merge_status;
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
set_transient( 'gitium_uncommited_changes', $changes, 12 * 60 * 60 ); // cache changes for half-a-day
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
try {
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module['type'] = 'theme';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( '.' === dirname( $plugin ) ) { // single file plugin
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module['base_path'] = $path;
- 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 ( $lock_retries * $lock_timeout_ms > $lock_timeout * 1000 ) {
- 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 gitium_update_remote_tracking_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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
_gitium_ssh_encode_buffer( $key_info['rsa']['e'] ) .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
_gitium_ssh_encode_buffer( $key_info['rsa']['n'] );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( $public_key, $pem );
- 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
$module['version'] = $data['version'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commit_groups[ $change['base_path'] ] = $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
$commit = _gitium_commit_changes( "$commit_message $msg_append", $base_path, false );
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ( ! flock( $gitium_lock_handle, LOCK_EX | LOCK_NB ) ) {
- 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
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$buffer = "\x00" . $buffer;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'private_key_bits' => 2048,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} catch (Exception $e) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$keypair = _gitium_generate_keypair();
- 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
$key = _gitium_generate_webhook_key();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$key = gitium_get_webhook_key();
- 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 apply_filters( 'gitium_webhook_url', $url, $key );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git_version = get_transient( 'gitium_git_version' );
- 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
set_transient( 'gitium_git_version', $git->get_version() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( false === $git_version ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Closing brace must be on a line by itself Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $versions ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$split_path = explode( '/', $path );
- Exclude checks
Newline required after opening brace Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( false === file_put_contents( $file, '<?php $upgrading = ' . time() .';' ) ) {
- Exclude checks
Opening brace should be on a new line Open
function gitium_disable_maintenance_mode() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$versions = get_transient( 'gitium_versions' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
'name' => basename( $path ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$versions = get_transient( 'gitium_versions' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( empty( $versions ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git->add( $dir );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return $git->commit( $message, $current_user->display_name, $current_user->user_email );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $version ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $prefix ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git->set_key( $git_private_key );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git->add( $dir );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( empty( $versions ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return unlink( ABSPATH . '/.maintenance' );
- Exclude checks
Opening brace should be on a new line Open
function _gitium_module_by_path( $path ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git->set_key( $git_private_key );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( 2 < count( $split_path ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 2 < count( $split_path ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! function_exists( 'gitium_enable_maintenance_mode' ) ) :
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( false === file_put_contents( $file, '<?php $upgrading = ' . time() .';' ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! function_exists( 'gitium_disable_maintenance_mode' ) ) :
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! function_exists( 'gitium_disable_maintenance_mode' ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git->add( '.gitignore' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'gitium_enable_maintenance_mode' ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'gitium_disable_maintenance_mode' ) ) :
- Exclude checks
Opening brace should be on a new line Open
function _gitium_commit_changes( $message, $dir = '.' ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( '.' === dirname( $plugin ) ) { // single file plugin
- Exclude checks
Opening brace should be on a new line Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git->add( '.gitignore' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commit = $git->commit( 'Update the `.gitignore` file', $current_user->display_name, $current_user->user_email );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- Exclude checks
Opening brace should be on a new line Open
function gitium_error_log( $message ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return file_exists( WP_CONTENT_DIR . '/.git' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
'name' => basename( $path ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 === strpos( $path, "wp-content/themes/$theme" ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commit_message = _gitium_format_message( $change['name'], $change['version'], "{$change['action']} {$change['type']}" );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return file_exists( WP_CONTENT_DIR . '/.git' );
- Exclude checks
Opening brace should be on a new line Open
function gitium_enable_maintenance_mode() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return $git->commit( $message, $current_user->display_name, $current_user->user_email );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$split_path = explode( '/', $path );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
gitium_merge_and_push( $commit );
- Exclude checks
Opening brace should be on a new line Open
function gitium_acquire_merge_lock() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- Exclude checks
Space after opening parenthesis of function call prohibited Open
error_log( "gitium_error_log: $message" );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
error_log( "gitium_error_log: $message" );
- Exclude checks
Opening brace should be on a new line Open
function wp_content_is_versioned() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return unlink( ABSPATH . '/.maintenance' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( '.' === dirname( $plugin ) ) { // single file plugin
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- Exclude checks
Closing brace must be on a line by itself Open
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! function_exists( 'gitium_acquire_merge_lock' ) ) :
- Exclude checks
Opening brace should be on a new line Open
function _gitium_format_message( $name, $version = false, $prefix = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'gitium_acquire_merge_lock' ) ) :
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( 0 === strpos( $path, "wp-content/themes/$theme" ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! empty( $msg_append ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $msg_append ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $commit_groups as $base_path => $change ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! function_exists( 'gitium_enable_maintenance_mode' ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false === file_put_contents( $file, '<?php $upgrading = ' . time() .';' ) ) {
- Exclude checks
Opening brace should be on a new line Open
function gitium_get_versions() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 2 < count( $split_path ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commit = _gitium_commit_changes( "$commit_message $msg_append", $base_path, false );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! function_exists( 'gitium_acquire_merge_lock' ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- Exclude checks
Space after opening parenthesis of function call prohibited Open
gitium_error_log( __FUNCTION__ );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
or trigger_error( 'Timeout when gitium lock was acquired', E_USER_WARNING );
- Exclude checks
Newline required after opening brace Open
if ( 'gitium/gitium.php' == $plugin ) { return; } // do not hook on activation of this plugin
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( false === $git_version ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $lock_retries * $lock_timeout_ms > $lock_timeout * 1000 ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! function_exists( 'gitium_release_merge_lock' ) ) :
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $versions['plugins'][ $plugin ] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
set_transient( 'gitium_git_version', $git->get_version() );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$try = openssl_pkey_export( $private_key, $pem ); //Private Key
- Exclude checks
Opening brace should be on a new line Open
function gitium_get_keypair( $generate_new_keypair = false ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false === ( $key = get_option( 'gitium_webhook_key', false ) ) ) {
- Exclude checks
Opening brace should be on a new line Open
function gitium_commit_and_push_gitignore_file( $path = '' ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
gitium_error_log( __FUNCTION__ );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
or trigger_error( 'Timeout when gitium lock was acquired', E_USER_WARNING );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$merge_status = $git->merge_with_accept_mine( $commits );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$url = add_query_arg( 'key', $key, plugins_url( 'gitium-webhook.php', __FILE__ ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
delete_transient( 'gitium_remote_disconnected' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
delete_transient( 'gitium_remote_disconnected' );
- Exclude checks
Opening brace should be on a new line Open
function _gitium_generate_keypair() {
- Exclude checks
Opening brace should be on a new line Open
function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
delete_option( 'gitium_keypair' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_option( 'gitium_keypair', $keypair, '', false );
- Exclude checks
Opening brace should be on a new line Open
function gitium_get_webhook() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$url = add_query_arg( 'key', $key, plugins_url( 'gitium-webhook.php', __FILE__ ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
gitium_error_log( __FUNCTION__ );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
gitium_release_merge_lock( $lock );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
gitium_auto_push( _gitium_format_message( $name, $version, "after $event of" ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
set_transient( 'gitium_remote_tracking_branch', $remote_branch );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
delete_transient( 'gitium_remote_disconnected' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 === strpos( $path, "wp-content/themes/$theme" ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
_gitium_ssh_encode_buffer( $key_info['rsa']['e'] ) .
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
} else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_option( 'gitium_keypair', $keypair, '', false );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_option( 'gitium_webhook_key', $key, '', false );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commit = $git->commit( 'Update the `.gitignore` file', $current_user->display_name, $current_user->user_email );
- Exclude checks
Newline required after opening brace Open
if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( ! flock( $gitium_lock_handle, LOCK_EX | LOCK_NB ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
usleep( $lock_timeout_ms * 1000 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $versions['plugins'][ $plugin ] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
gitium_auto_push( _gitium_format_message( $name, $version, "after $event of" ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
set_transient( 'gitium_git_version', $git->get_version() );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $git->is_status_working() && $git->get_remote_tracking_branch() ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$len = strlen( $buffer );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$private_key = openssl_pkey_get_private( $rsa_key );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
_gitium_ssh_encode_buffer( $key_info['rsa']['e'] ) .
- Exclude checks
Space after opening parenthesis of function call prohibited Open
_gitium_ssh_encode_buffer( $key_info['rsa']['n'] );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $versions['themes'] as $theme => $data ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$change = _gitium_module_by_path( $path );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$change = _gitium_module_by_path( $path );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! function_exists( 'gitium_release_merge_lock' ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
gitium_error_log( __FUNCTION__ );
- Exclude checks
Opening brace should be on a new line Open
function gitium_check_after_event( $plugin, $event = 'activation' ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return pack( 'Na*', $len, $buffer );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$buffer = pack( 'N', 7 ) . 'ssh-rsa' .
- Exclude checks
Opening brace should be on a new line Open
function _gitium_generate_webhook_key() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$merge_status = $git->merge_with_accept_mine( $commits );
- Exclude checks
Closing brace must be on a line by itself Open
if ( 'gitium/gitium.php' == $plugin ) { return; } // do not hook on activation of this plugin
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $versions['plugins'][ $plugin ] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
gitium_auto_push( _gitium_format_message( $name, $version, "after $event of" ) );
- Exclude checks
Opening brace should be on a new line Open
function _gitium_get_remote_tracking_branch( $update_transient = false ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
set_transient( 'gitium_remote_disconnected', $git->get_last_error() );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ord( $buffer[0] ) & 0x80 ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$key_info = openssl_pkey_get_details( $rsa_key );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_option( 'gitium_webhook_key', $key, '', false );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
- Exclude checks
Closing brace must be on a line by itself Open
if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( '.' === dirname( $plugin ) ) { // single file plugin
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( "wp-content/plugins/$plugin" === $path ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
} else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $commit ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
flock( $gitium_lock_handle, LOCK_UN );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
gitium_auto_push( _gitium_format_message( $name, $version, "after $event of" ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
set_transient( 'gitium_is_status_working', $is_status_working );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $git->fetch_ref() ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$len = strlen( $buffer );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$public_key = 'ssh-rsa ' . base64_encode( $buffer ) . ' gitium@' . parse_url( get_home_url(), PHP_URL_HOST );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( false === ( $keypair = get_option( 'gitium_keypair', false ) ) ) {
- Exclude checks
Opening brace should be on a new line Open
function gitium_merge_and_push( $commits ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $git->fetch_ref() ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git_version = get_transient( 'gitium_git_version' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
delete_transient( 'gitium_remote_disconnected' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
set_transient( 'gitium_uncommited_changes', $changes, 12 * 60 * 60 ); // cache changes for half-a-day
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
set_transient( 'gitium_uncommited_changes', $changes, 12 * 60 * 60 ); // cache changes for half-a-day
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ord( $buffer[0] ) & 0x80 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$private_key = openssl_pkey_get_private( $rsa_key );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$buffer = pack( 'N', 7 ) . 'ssh-rsa' .
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
_gitium_ssh_encode_buffer( $key_info['rsa']['n'] );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $generate_new_keypair ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
delete_option( 'gitium_webhook_key' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_option( 'gitium_webhook_key', $key, '', false );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $msg_append ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commit_message = _gitium_format_message( $change['name'], $change['version'], "{$change['action']} {$change['type']}" );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- Exclude checks
Newline required after opening brace Open
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
flock( $gitium_lock_handle, LOCK_UN );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
gitium_merge_and_push( $commit );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
fclose( $gitium_lock_handle );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
while ( ! flock( $gitium_lock_handle, LOCK_EX | LOCK_NB ) ) {
- Exclude checks
Opening brace should be on a new line Open
function gitium_update_is_status_working() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
set_transient( 'gitium_is_status_working', $is_status_working );
- Exclude checks
Opening brace should be on a new line Open
function gitium_update_remote_tracking_branch() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$try = openssl_pkey_export( $private_key, $pem ); //Private Key
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_option( 'gitium_webhook_key', $key, '', false );
- Exclude checks
Opening brace should be on a new line Open
function _gitium_status( $update_transient = false ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( false === ( $key = get_option( 'gitium_webhook_key', false ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
set_transient( 'gitium_remote_disconnected', $git->get_last_error() );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$public_key = 'ssh-rsa ' . base64_encode( $buffer ) . ' gitium@' . parse_url( get_home_url(), PHP_URL_HOST );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( false === ( $keypair = get_option( 'gitium_keypair', false ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
delete_option( 'gitium_webhook_key' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
- Exclude checks
Opening brace should be on a new line Open
function _gitium_ssh_encode_buffer( $buffer ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return pack( 'Na*', $len, $buffer );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$public_key = 'ssh-rsa ' . base64_encode( $buffer ) . ' gitium@' . parse_url( get_home_url(), PHP_URL_HOST );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$public_key = 'ssh-rsa ' . base64_encode( $buffer ) . ' gitium@' . parse_url( get_home_url(), PHP_URL_HOST );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_option( 'gitium_keypair', $keypair, '', false );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( false === ( $key = get_option( 'gitium_webhook_key', false ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
fclose( $gitium_lock_handle );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git_version = get_transient( 'gitium_git_version' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ord( $buffer[0] ) & 0x80 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$key_info = openssl_pkey_get_details( $rsa_key );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $generate_new_webhook_key ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$url = add_query_arg( 'key', $key, plugins_url( 'gitium-webhook.php', __FILE__ ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $versions['plugins'] as $plugin => $data ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $uncommited_changes as $path => $action ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commit = _gitium_commit_changes( "$commit_message $msg_append", $base_path, false );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
while ( ! flock( $gitium_lock_handle, LOCK_EX | LOCK_NB ) ) {
- Exclude checks
Opening brace should be on a new line Open
function gitium_release_merge_lock( $lock ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 'gitium/gitium.php' == $plugin ) { return; } // do not hook on activation of this plugin
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
set_transient( 'gitium_remote_tracking_branch', $remote_branch );
- Exclude checks
Opening brace should be on a new line Open
function _gitium_is_status_working( $update_transient = false ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_option( 'gitium_keypair', $keypair, '', false );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false === ( $keypair = get_option( 'gitium_keypair', false ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
- Exclude checks
Usage of ELSE IF is discouraged; use ELSEIF instead Open
} else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
usleep( $lock_timeout_ms * 1000 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'gitium_release_merge_lock' ) ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
gitium_release_merge_lock( $lock );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $git->is_dirty() ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
delete_option( 'gitium_keypair' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$url = add_query_arg( 'key', $key, plugins_url( 'gitium-webhook.php', __FILE__ ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( 'admin_init', 'gitium_admin_init' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return apply_filters( 'gitium_webhook_url', $url, $key );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git_version = get_transient( 'gitium_git_version' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
set_transient( 'gitium_git_version', $git->get_version() );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return apply_filters( 'gitium_webhook_url', $url, $key );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( false === $git_version ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git_version = get_transient( 'gitium_git_version' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
set_transient( 'gitium_git_version', $git->get_version() );
- Exclude checks
Opening brace should be on a new line Open
function gitium_admin_init() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_action( 'admin_init', 'gitium_admin_init' );
- Exclude checks
The variable $git_private_key is not named in camelCase. Open
function _gitium_commit_changes( $message, $dir = '.' ) {
global $git;
list( , $git_private_key ) = gitium_get_keypair();
if (!$git_private_key)
- 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 $commit_message is not named in camelCase. Open
function _gitium_format_message( $name, $version = false, $prefix = '' ) {
$commit_message = "`$name`";
if ( $version ) {
$commit_message .= " version $version";
}
- 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_lock_handle is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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_lock_handle is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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
function _gitium_commit_changes( $message, $dir = '.' ) {
global $git;
list( , $git_private_key ) = gitium_get_keypair();
if (!$git_private_key)
- 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 $commit_message is not named in camelCase. Open
function _gitium_format_message( $name, $version = false, $prefix = '' ) {
$commit_message = "`$name`";
if ( $version ) {
$commit_message .= " version $version";
}
- 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 $uncommited_changes is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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 $commit_groups is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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_lock_handle is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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 $lock_timeout_ms is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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 $lock_retries is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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_lock_handle is not named in camelCase. Open
function gitium_release_merge_lock( $lock ) {
list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
gitium_error_log( __FUNCTION__ );
flock( $gitium_lock_handle, LOCK_UN );
fclose( $gitium_lock_handle );
- 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_lock_handle is not named in camelCase. Open
function gitium_release_merge_lock( $lock ) {
list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
gitium_error_log( __FUNCTION__ );
flock( $gitium_lock_handle, LOCK_UN );
fclose( $gitium_lock_handle );
- 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 $commit_message is not named in camelCase. Open
function _gitium_format_message( $name, $version = false, $prefix = '' ) {
$commit_message = "`$name`";
if ( $version ) {
$commit_message .= " version $version";
}
- 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_branch is not named in camelCase. Open
function gitium_update_remote_tracking_branch() {
global $git;
$remote_branch = $git->get_remote_tracking_branch();
set_transient( 'gitium_remote_tracking_branch', $remote_branch );
- 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 $is_status_working is not named in camelCase. Open
function _gitium_is_status_working( $update_transient = false ) {
if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
return $is_status_working;
} else {
return gitium_update_is_status_working();
- 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 $msg_append is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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_lock_path is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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 $lock_retries is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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 $lock_timeout is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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_lock_handle is not named in camelCase. Open
function gitium_release_merge_lock( $lock ) {
list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
gitium_error_log( __FUNCTION__ );
flock( $gitium_lock_handle, LOCK_UN );
fclose( $gitium_lock_handle );
- 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 $split_path is not named in camelCase. Open
function _gitium_module_by_path( $path ) {
$versions = gitium_get_versions();
// default values
$module = array(
- 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 $msg_append is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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 $msg_append is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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_branch is not named in camelCase. Open
function _gitium_get_remote_tracking_branch( $update_transient = false ) {
if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
return $remote_branch;
} else {
return gitium_update_remote_tracking_branch();
- 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_private_key is not named in camelCase. Open
function _gitium_commit_changes( $message, $dir = '.' ) {
global $git;
list( , $git_private_key ) = gitium_get_keypair();
if (!$git_private_key)
- 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 $commit_message is not named in camelCase. Open
function _gitium_format_message( $name, $version = false, $prefix = '' ) {
$commit_message = "`$name`";
if ( $version ) {
$commit_message .= " version $version";
}
- 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 $commit_groups is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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 $commit_message is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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_branch is not named in camelCase. Open
function _gitium_get_remote_tracking_branch( $update_transient = false ) {
if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
return $remote_branch;
} else {
return gitium_update_remote_tracking_branch();
- 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
function _gitium_commit_changes( $message, $dir = '.' ) {
global $git;
list( , $git_private_key ) = gitium_get_keypair();
if (!$git_private_key)
- 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
function gitium_commit_and_push_gitignore_file( $path = '' ) {
global $git;
$current_user = wp_get_current_user();
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- 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_branch is not named in camelCase. Open
function gitium_update_remote_tracking_branch() {
global $git;
$remote_branch = $git->get_remote_tracking_branch();
set_transient( 'gitium_remote_tracking_branch', $remote_branch );
- 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 $rsa_key is not named in camelCase. Open
function _gitium_generate_keypair() {
$rsa_key = openssl_pkey_new(
array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 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 $key_info is not named in camelCase. Open
function _gitium_generate_keypair() {
$rsa_key = openssl_pkey_new(
array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 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 $uncommited_changes is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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 $commit_message is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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_lock_path is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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_lock_path is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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_branch is not named in camelCase. Open
function gitium_update_remote_tracking_branch() {
global $git;
$remote_branch = $git->get_remote_tracking_branch();
set_transient( 'gitium_remote_tracking_branch', $remote_branch );
- 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 $is_status_working is not named in camelCase. Open
function gitium_update_is_status_working() {
global $git;
$is_status_working = $git->is_status_working();
set_transient( 'gitium_is_status_working', $is_status_working );
return $is_status_working;
- 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_version is not named in camelCase. Open
function gitium_admin_init() {
global $git;
$git_version = get_transient( 'gitium_git_version' );
if ( false === $git_version ) {
- 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 $commit_groups is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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 $msg_append is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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 $base_path is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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
function gitium_commit_and_push_gitignore_file( $path = '' ) {
global $git;
$current_user = wp_get_current_user();
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- 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 $lock_timeout_ms is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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_status is not named in camelCase. Open
function gitium_merge_and_push( $commits ) {
global $git;
$lock = gitium_acquire_merge_lock()
or trigger_error( 'Timeout when gitium lock was acquired', E_USER_WARNING );
- 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 $update_transient is not named in camelCase. Open
function _gitium_is_status_working( $update_transient = false ) {
if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
return $is_status_working;
} else {
return gitium_update_is_status_working();
- 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 $is_status_working is not named in camelCase. Open
function _gitium_is_status_working( $update_transient = false ) {
if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
return $is_status_working;
} else {
return gitium_update_is_status_working();
- 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 $private_key is not named in camelCase. Open
function _gitium_generate_keypair() {
$rsa_key = openssl_pkey_new(
array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 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 $rsa_key is not named in camelCase. Open
function _gitium_generate_keypair() {
$rsa_key = openssl_pkey_new(
array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 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 $lock_retries is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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_status is not named in camelCase. Open
function gitium_merge_and_push( $commits ) {
global $git;
$lock = gitium_acquire_merge_lock()
or trigger_error( 'Timeout when gitium lock was acquired', E_USER_WARNING );
- 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 $is_status_working is not named in camelCase. Open
function gitium_update_is_status_working() {
global $git;
$is_status_working = $git->is_status_working();
set_transient( 'gitium_is_status_working', $is_status_working );
return $is_status_working;
- 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 $key_info is not named in camelCase. Open
function _gitium_generate_keypair() {
$rsa_key = openssl_pkey_new(
array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 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 $generate_new_webhook_key is not named in camelCase. Open
function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
if ( $generate_new_webhook_key ) {
$key = _gitium_generate_webhook_key();
delete_option( 'gitium_webhook_key' );
add_option( 'gitium_webhook_key', $key, '', false );
- 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 $split_path is not named in camelCase. Open
function _gitium_module_by_path( $path ) {
$versions = gitium_get_versions();
// default values
$module = array(
- 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 $split_path is not named in camelCase. Open
function _gitium_module_by_path( $path ) {
$versions = gitium_get_versions();
// default values
$module = array(
- 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 $lock_timeout_ms is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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_lock_path is not named in camelCase. Open
function gitium_release_merge_lock( $lock ) {
list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
gitium_error_log( __FUNCTION__ );
flock( $gitium_lock_handle, LOCK_UN );
fclose( $gitium_lock_handle );
- 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_private_key is not named in camelCase. Open
function _gitium_commit_changes( $message, $dir = '.' ) {
global $git;
list( , $git_private_key ) = gitium_get_keypair();
if (!$git_private_key)
- 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 $update_transient is not named in camelCase. Open
function _gitium_get_remote_tracking_branch( $update_transient = false ) {
if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
return $remote_branch;
} else {
return gitium_update_remote_tracking_branch();
- 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
function _gitium_commit_changes( $message, $dir = '.' ) {
global $git;
list( , $git_private_key ) = gitium_get_keypair();
if (!$git_private_key)
- 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 $commit_message is not named in camelCase. Open
function _gitium_format_message( $name, $version = false, $prefix = '' ) {
$commit_message = "`$name`";
if ( $version ) {
$commit_message .= " version $version";
}
- 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 $split_path is not named in camelCase. Open
function _gitium_module_by_path( $path ) {
$versions = gitium_get_versions();
// default values
$module = array(
- 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 $split_path is not named in camelCase. Open
function _gitium_module_by_path( $path ) {
$versions = gitium_get_versions();
// default values
$module = array(
- 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 $base_path is not named in camelCase. Open
function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
global $git;
$uncommited_changes = $git->get_local_changes();
$commit_groups = array();
- 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
function gitium_commit_and_push_gitignore_file( $path = '' ) {
global $git;
$current_user = wp_get_current_user();
if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
- 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 $lock_timeout is not named in camelCase. Open
function gitium_acquire_merge_lock() {
$gitium_lock_path = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
$gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
$lock_timeout = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
- 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 $is_status_working is not named in camelCase. Open
function gitium_update_is_status_working() {
global $git;
$is_status_working = $git->is_status_working();
set_transient( 'gitium_is_status_working', $is_status_working );
return $is_status_working;
- 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 $key_info is not named in camelCase. Open
function _gitium_generate_keypair() {
$rsa_key = openssl_pkey_new(
array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 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_version is not named in camelCase. Open
function gitium_admin_init() {
global $git;
$git_version = get_transient( 'gitium_git_version' );
if ( false === $git_version ) {
- 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 $private_key is not named in camelCase. Open
function _gitium_generate_keypair() {
$rsa_key = openssl_pkey_new(
array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 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 $rsa_key is not named in camelCase. Open
function _gitium_generate_keypair() {
$rsa_key = openssl_pkey_new(
array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 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 $update_transient is not named in camelCase. Open
function _gitium_status( $update_transient = false ) {
global $git;
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
return $changes;
- 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 $public_key is not named in camelCase. Open
function _gitium_generate_keypair() {
$rsa_key = openssl_pkey_new(
array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 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 $generate_new_keypair is not named in camelCase. Open
function gitium_get_keypair( $generate_new_keypair = false ) {
if ( $generate_new_keypair ) {
$keypair = _gitium_generate_keypair();
delete_option( 'gitium_keypair' );
add_option( 'gitium_keypair', $keypair, '', false );
- 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 $public_key is not named in camelCase. Open
function _gitium_generate_keypair() {
$rsa_key = openssl_pkey_new(
array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 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_version is not named in camelCase. Open
function _gitium_status( $update_transient = false ) {
global $git;
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
return $changes;
- 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_version is not named in camelCase. Open
function _gitium_status( $update_transient = false ) {
global $git;
if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
return $changes;
- 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();
}
}