File class-git-wrapper.php
has 522 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
Git_Wrapper
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
class Git_Wrapper {
private $last_error = '';
private $gitignore = GITIGNORE;
The class Git_Wrapper has an overall complexity of 129 which is very high. The configured complexity threshold is 50. Open
class Git_Wrapper {
private $last_error = '';
private $gitignore = GITIGNORE;
- Exclude checks
The class Git_Wrapper has 20 public methods. Consider refactoring Git_Wrapper to keep number of public methods under 10. Open
class Git_Wrapper {
private $last_error = '';
private $gitignore = GITIGNORE;
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
Function local_status
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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
Function get_local_changes
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function get_local_changes() {
list( $return, $response ) = $this->_call( 'status', '--porcelain' );
if ( 0 !== $return ) {
return 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
Method _call
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _call(...$args) {
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
$return = -1;
$response = array();
$env = $this->get_env();
Method merge_with_accept_mine
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
Function status
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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
Function cherry_pick
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function cherry_pick( $commits ) {
foreach ( $commits as $commit ) {
if ( empty( $commit ) ) { return false; }
list( $return, $response ) = $this->_call( 'cherry-pick', $commit );
- 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
Function _call
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function _call(...$args) {
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
$return = -1;
$response = array();
$env = $this->get_env();
- 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
Function _log
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function _log(...$args) {
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
$output = '';
if (isset($args) && $args) foreach ( $args as $arg ) {
- 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
Function get_last_commits
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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
Function merge_with_accept_mine
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- 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
Function commit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function commit( $message, $author_name = '', $author_email = '' ) {
$author = '';
if ( $author_email ) {
if ( empty( $author_name ) ) {
$author_name = $author_email;
- 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
Avoid using undefined variables such as '$commits' which will lead to PHP notices. Open
$commits[ $commit_info[0] ]['committer_name'] = $commit_info[4];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$commits' which will lead to PHP notices. Open
$commits[ $commit_info[0] ] = array(
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$commits' which will lead to PHP notices. Open
$commits[ $commit_info[0] ]['committer_email'] = $commit_info[5];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$commits' which will lead to PHP notices. Open
$commits[ $commit_info[0] ]['committer_date'] = $commit_info[6];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$commits' which will lead to PHP notices. Open
return $commits;
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
The method status has a boolean flag argument $local_only, which is a certain sign of a Single Responsibility Principle violation. Open
function status( $local_only = 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 get_env uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$env['GIT_SSH'] = dirname( __FILE__ ) . '/ssh-git';
}
- 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 push uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', 'HEAD' );
}
- 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 get_local_changes uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$action = 'modified';
}
- 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 commit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
list( $return, $response ) = $this->_call( 'commit', '-m', $message );
}
- 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 merge_with_accept_mine uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->_call( 'cherry-pick', '--abort' );
$this->_call( 'checkout', '-b', 'merge_local' );
$this->_call( 'branch', '-M', $local_branch );
return false;
- 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 _call uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->last_error = null;
}
- 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 '$idx'. Open
foreach ( $response as $idx => $line ) :
- 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 using count() function in for loops. Open
for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {
$file = $response[ $idx * 2 + 1 ];
$change = $response[ $idx * 2 ];
if ( ! isset( $new_response[ $file ] ) ) {
$new_response[ $file ] = "r$change";
- Read upRead up
- Exclude checks
CountInLoopExpression
Since: 2.7.0
Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.
Example
class Foo {
public function bar()
{
$array = array();
for ($i = 0; count($array); $i++) {
// ...
}
}
}
Source https://phpmd.org/rules/design.html#countinloopexpression
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Git_Wrapper {
- Exclude checks
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 19 and the first side effect is on line 18. Open
<?php
- Exclude checks
The property $private_key is not named in camelCase. Open
class Git_Wrapper {
private $last_error = '';
private $gitignore = GITIGNORE;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $repo_dir is not named in camelCase. Open
function __construct( $repo_dir ) {
$this->repo_dir = $repo_dir;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The class Git_Wrapper is not named in CamelCase. Open
class Git_Wrapper {
private $last_error = '';
private $gitignore = GITIGNORE;
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
The parameter $author_email is not named in camelCase. Open
function commit( $message, $author_name = '', $author_email = '' ) {
$author = '';
if ( $author_email ) {
if ( empty( $author_name ) ) {
$author_name = $author_email;
- 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 $author_name is not named in camelCase. Open
function commit( $message, $author_name = '', $author_email = '' ) {
$author = '';
if ( $author_email ) {
if ( empty( $author_name ) ) {
$author_name = $author_email;
- 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 property $last_error is not named in camelCase. Open
class Git_Wrapper {
private $last_error = '';
private $gitignore = GITIGNORE;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $repo_dir is not named in camelCase. Open
class Git_Wrapper {
private $last_error = '';
private $gitignore = GITIGNORE;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
Avoid variables with short names like $n. Configured minimum length is 3. Open
function get_last_commits( $n = 20 ) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $private_key is not named in camelCase. Open
function set_key( $private_key ) {
$this->private_key = $private_key;
}
- 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
Avoid variables with short names like $b. Configured minimum length is 3. Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $local_only is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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
Visibility must be declared on method "__construct" Open
function __construct( $repo_dir ) {
- Exclude checks
Visibility must be declared on method "_rrmdir" Open
function _rrmdir( $dir ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
if (isset($args) && $args) foreach ( $args as $arg ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$dir"; 1 found Open
function _rrmdir( $dir ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $files as $file ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( defined( 'GIT_SSH' ) && GIT_SSH ) {
- Exclude checks
Expected 0 spaces between argument "$repo_dir" and closing bracket; 1 found Open
function __construct( $repo_dir ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $files as $file ) {
- Exclude checks
Method name "_log" should not be prefixed with an underscore to indicate visibility Open
function _log(...$args) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$private_key"; 1 found Open
function set_key( $private_key ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 != $return ) {
- Exclude checks
Visibility must be declared on method "can_exec_git" Open
function can_exec_git() {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $files as $file ) {
- Exclude checks
Method name "_call" should not be prefixed with an underscore to indicate visibility Open
protected function _call(...$args) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_resource( $proc ) ) {
- Exclude checks
Method name "_rrmdir" should not be prefixed with an underscore to indicate visibility Open
function _rrmdir( $dir ) {
- Exclude checks
Visibility must be declared on method "set_key" Open
function set_key( $private_key ) {
- Exclude checks
Expected 0 spaces between argument "$dir" and closing bracket; 1 found Open
function _rrmdir( $dir ) {
- Exclude checks
Method name "_git_temp_key_file" should not be prefixed with an underscore to indicate visibility Open
function _git_temp_key_file() {
- Exclude checks
Expected 0 spaces between argument "$private_key" and closing bracket; 1 found Open
function set_key( $private_key ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( defined( 'GIT_KEY_FILE' ) && GIT_KEY_FILE ) {
- Exclude checks
Method name "Git_Wrapper::get_behind_commits" is not in camel caps format Open
function get_behind_commits() {
- Exclude checks
Visibility must be declared on method "_log" Open
function _log(...$args) {
- Exclude checks
Visibility must be declared on method "get_last_error" Open
function get_last_error() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( $line = fgets( $pipes[1] ) ) {
- Exclude checks
Method name "Git_Wrapper::can_exec_git" is not in camel caps format Open
function can_exec_git() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if (isset($args) && $args) foreach ( $args as $arg ) {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
class Git_Wrapper {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $dir ) || ! is_dir( $dir ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Method name "Git_Wrapper::set_key" is not in camel caps format Open
function set_key( $private_key ) {
- Exclude checks
Visibility must be declared on method "_git_temp_key_file" Open
function _git_temp_key_file() {
- Exclude checks
Method name "Git_Wrapper::get_last_error" is not in camel caps format Open
function get_last_error() {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$repo_dir"; 1 found Open
function __construct( $repo_dir ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} elseif ( $this->private_key ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
if (isset($args) && $args) foreach ( $args as $arg ) {
- Exclude checks
Method name "Git_Wrapper::_git_temp_key_file" is not in camel caps format Open
function _git_temp_key_file() {
- Exclude checks
Method name "Git_Wrapper::get_env" is not in camel caps format Open
private function get_env() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {
- Exclude checks
Visibility must be declared on method "get_version" Open
function get_version() {
- Exclude checks
Expected 0 spaces between argument "$message" and closing bracket; 1 found Open
protected function _resolve_merge_conflicts( $message ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $haystack as $query ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $haystack as $query ) {
- Exclude checks
Expected 0 spaces between argument "$dir" and closing bracket; 1 found Open
function is_dot_git_dir( $dir ) {
- Exclude checks
Visibility must be declared on method "fetch_ref" Open
function fetch_ref() {
- Exclude checks
Visibility must be declared on method "get_commit_message" Open
function get_commit_message( $commit ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $commits as $commit ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 != $return ) { return ''; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
- Exclude checks
Method name "Git_Wrapper::remove_remote" is not in camel caps format Open
function remove_remote() {
- Exclude checks
Method name "Git_Wrapper::get_remote_tracking_branch" is not in camel caps format Open
function get_remote_tracking_branch() {
- Exclude checks
Expected 0 spaces between argument "$offset" and closing bracket; 1 found Open
private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $commit ) ) { return false; }
- Exclude checks
Method name "Git_Wrapper::merge_with_accept_mine" is not in camel caps format Open
function merge_with_accept_mine(...$commits) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( WP_DEBUG ) {
- Exclude checks
Expected 0 spaces between argument "$url" and closing bracket; 1 found Open
function add_remote_url( $url ) {
- Exclude checks
Visibility must be declared on method "get_remote_tracking_branch" Open
function get_remote_tracking_branch() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 == $return ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $changes as $path => $change ) {
- Exclude checks
Method name "Git_Wrapper::get_remote_url" is not in camel caps format Open
function get_remote_url() {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$commits"; 1 found Open
private function cherry_pick( $commits ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $changes as $path => $change ) {
- Exclude checks
Method name "Git_Wrapper::get_commit_message" is not in camel caps format Open
function get_commit_message( $commit ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 != $return ) {
- Exclude checks
Visibility must be declared on method "is_status_working" Open
function is_status_working() {
- Exclude checks
Visibility must be declared on method "get_behind_commits" Open
function get_behind_commits() {
- Exclude checks
Visibility must be declared on method "is_dot_git_dir" Open
function is_dot_git_dir( $dir ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $response[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} elseif ( in_array( $change, array( 'AA', 'UU', 'AU', 'UA' ) ) ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$haystack"; 1 found Open
private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {
- Exclude checks
Method name "Git_Wrapper::successfully_merged" is not in camel caps format Open
function successfully_merged() {
- Exclude checks
Visibility must be declared on method "init" Open
function init() {
- Exclude checks
Visibility must be declared on method "get_local_branch" Open
function get_local_branch() {
- Exclude checks
Expected 0 spaces between argument "$commit" and closing bracket; 1 found Open
function get_commit_message( $commit ) {
- Exclude checks
Method name "Git_Wrapper::is_dot_git_dir" is not in camel caps format Open
function is_dot_git_dir( $dir ) {
- Exclude checks
Visibility must be declared on method "merge_initial_commit" Open
function merge_initial_commit( $commit, $branch ) {
- Exclude checks
Method name "Git_Wrapper::get_local_branch" is not in camel caps format Open
function get_local_branch() {
- Exclude checks
Method name "Git_Wrapper::fetch_ref" is not in camel caps format Open
function fetch_ref() {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$message"; 1 found Open
protected function _resolve_merge_conflicts( $message ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $version[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( in_array( $change, array( 'UD', 'DD' ) ) ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$commit"; 1 found Open
function get_commit_message( $commit ) {
- Exclude checks
Visibility must be declared on method "successfully_merged" Open
function successfully_merged() {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$dir"; 1 found Open
function is_dot_git_dir( $dir ) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "True" Open
return True;
- Exclude checks
Method name "Git_Wrapper::merge_initial_commit" is not in camel caps format Open
function merge_initial_commit( $commit, $branch ) {
- Exclude checks
Visibility must be declared on method "add_remote_url" Open
function add_remote_url( $url ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 == $return ) {
- Exclude checks
Method name "_resolve_merge_conflicts" should not be prefixed with an underscore to indicate visibility Open
protected function _resolve_merge_conflicts( $message ) {
- Exclude checks
Method name "Git_Wrapper::strpos_haystack_array" is not in camel caps format Open
private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {
- Exclude checks
Expected 0 spaces between argument "$commits" and closing bracket; 1 found Open
private function cherry_pick( $commits ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $commits as $commit ) {
- Exclude checks
Method name "Git_Wrapper::get_version" is not in camel caps format Open
function get_version() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $haystack as $query ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $commits as $commit ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false !== $this->strpos_haystack_array( $response, 'previous cherry-pick is now empty' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $return != 0 ) {
- Exclude checks
Method name "Git_Wrapper::get_ahead_commits" is not in camel caps format Open
function get_ahead_commits() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( count( $commits ) > 0 ) {
- Exclude checks
Visibility must be declared on method "cleanup" Open
function cleanup() {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "True" Open
return True;
- Exclude checks
Expected 0 spaces between argument "$branch" and closing bracket; 1 found Open
function merge_initial_commit( $commit, $branch ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( WP_DEBUG ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$url"; 1 found Open
function add_remote_url( $url ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $changes as $path => $change ) {
- Exclude checks
Visibility must be declared on method "remove_remote" Open
function remove_remote() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} elseif ( 'DU' == $change ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$offset"; expected 1 but found 0 Open
private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( strpos( $query, $needle, $offset) !== false ) { return true; }
- Exclude checks
Method name "Git_Wrapper::cherry_pick" is not in camel caps format Open
private function cherry_pick( $commits ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->successfully_merged() ) { // git status without states: AA, DD, UA, AU ...
- Exclude checks
Method name "Git_Wrapper::is_status_working" is not in camel caps format Open
function is_status_working() {
- Exclude checks
Visibility must be declared on method "get_ahead_commits" Open
function get_ahead_commits() {
- Exclude checks
Visibility must be declared on method "get_remote_url" Open
function get_remote_url() {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "False" Open
return False;
- Exclude checks
Method name "Git_Wrapper::_resolve_merge_conflicts" is not in camel caps format Open
protected function _resolve_merge_conflicts( $message ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
- Exclude checks
Incorrect spacing between argument "$offset" and equals sign; expected 1 but found 0 Open
private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $return != 0 ) {
- Exclude checks
Visibility must be declared on method "merge_with_accept_mine" Open
function merge_with_accept_mine(...$commits) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "False" Open
return False;
- Exclude checks
Method name "Git_Wrapper::add_remote_url" is not in camel caps format Open
function add_remote_url( $url ) {
- Exclude checks
Expected 0 spaces between argument "$author_email" and closing bracket; 1 found Open
function commit( $message, $author_name = '', $author_email = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( '#' == $line[0] ) { continue; } // ignore branch status
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ( 'R' === $index_status ) && ( ! empty( $new_path[1] ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $return != 0 ) {
- Exclude checks
Expected 0 spaces between argument "$b" and closing bracket; 1 found Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Visibility must be declared on method "get_local_changes" Open
function get_local_changes() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 'D' == $work_tree_status ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 !== $return ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $response ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $response as $index => $value ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! $this->successfully_merged() ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 1 == count($args) && is_array( $args[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $response ) ) {
- Exclude checks
Method name "Git_Wrapper::local_status" is not in camel caps format Open
function local_status() {
- Exclude checks
Visibility must be declared on method "get_last_commits" Open
function get_last_commits( $n = 20 ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$content"; 1 found Open
public function set_gitignore( $content ) {
- Exclude checks
Expected 0 spaces between argument "$branch" and closing bracket; 1 found Open
function push( $branch = '' ) {
- Exclude checks
Space found before first semicolon of FOR loop Open
for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {
- Exclude checks
Method name "Git_Wrapper::rm_cached" is not in camel caps format Open
function rm_cached( $path ) {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $branch ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ( '"' == $path[0] ) && ('"' == $path[strlen( $path ) - 1] ) ) {
- Exclude checks
Visibility must be declared on method "status" Open
function status( $local_only = false ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $new_response[ $file ] ) ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $response as $index => $value ) {
- Exclude checks
Method name "Git_Wrapper::set_gitignore" is not in camel caps format Open
public function set_gitignore( $content ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $response as $line ) :
- Exclude checks
Method name "Git_Wrapper::get_gitignore" is not in camel caps format Open
public function get_gitignore() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 != $return ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $author_email ) {
- Exclude checks
Visibility must be declared on method "push" Open
function push( $branch = '' ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$b"; 1 found Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Visibility must be declared on method "add" Open
function add(...$args) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$branch"; 1 found Open
function push( $branch = '' ) {
- Exclude checks
Method name "Git_Wrapper::get_last_commits" is not in camel caps format Open
function get_last_commits( $n = 20 ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $response as $line ) :
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $response as $idx => $line ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $behind_count ) {
- Exclude checks
Expected 0 spaces between argument "$content" and closing bracket; 1 found Open
public function set_gitignore( $content ) {
- Exclude checks
Visibility must be declared on method "rm_cached" Open
function rm_cached( $path ) {
- Exclude checks
Visibility must be declared on method "commit" Open
function commit( $message, $author_name = '', $author_email = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $author ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $return !== 0 ) { return false; }
- Exclude checks
Space found before second semicolon of FOR loop Open
for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {
- Exclude checks
Expected 0 spaces between argument "$n" and closing bracket; 1 found Open
function get_last_commits( $n = 20 ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $response as $index => $value ) {
- Exclude checks
Expected 0 spaces between argument "$path" and closing bracket; 1 found Open
function rm_cached( $path ) {
- Exclude checks
Visibility must be declared on method "local_status" Open
function local_status() {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$local_only"; 1 found Open
function status( $local_only = false ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 !== $return ) { return false; }
- Exclude checks
Expected 0 spaces between opening bracket and argument "$commit"; 1 found Open
function merge_initial_commit( $commit, $branch ) {
- Exclude checks
Each PHP statement must be on a line by itself Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Method name "Git_Wrapper::get_local_changes" is not in camel caps format Open
function get_local_changes() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 !== $return ) {
- Exclude checks
Space found after opening bracket of FOR loop Open
for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 0 !== $return ) { return false; }
- Exclude checks
Method name "Git_Wrapper::get_remote_branches" is not in camel caps format Open
function get_remote_branches() {
- Exclude checks
Visibility must be declared on method "get_remote_branches" Open
function get_remote_branches() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $response as $idx => $line ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $line ) ) { continue; } // ignore empty lines like the last item
- Exclude checks
Expected 0 spaces between opening bracket and argument "$message"; 1 found Open
function commit( $message, $author_name = '', $author_email = '' ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $author_name ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $local_only ) { return array( $branch_status, $new_response ); }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( preg_match( '/## ([^.]+)\.+([^ ]+)/', $branch_status, $matches ) ) {
- Exclude checks
Visibility must be declared on method "get_uncommited_changes" Open
function get_uncommited_changes() {
- Exclude checks
Expected 0 spaces between argument "$local_only" and closing bracket; 1 found Open
function status( $local_only = false ) {
- Exclude checks
Space found before closing bracket of FOR loop Open
for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {
- Exclude checks
Method name "Git_Wrapper::get_uncommited_changes" is not in camel caps format Open
function get_uncommited_changes() {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$n"; 1 found Open
function get_last_commits( $n = 20 ) {
- Exclude checks
Visibility must be declared on method "remove_wp_content_from_version_control" Open
function remove_wp_content_from_version_control() {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $response as $idx => $line ) :
- Exclude checks
Visibility must be declared on method "is_dirty" Open
function is_dirty() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $commit_info[1] != $commit_info[4] && $commit_info[2] != $commit_info[5] ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$path"; 1 found Open
function rm_cached( $path ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $response as $line ) :
- Exclude checks
Method name "Git_Wrapper::is_dirty" is not in camel caps format Open
function is_dirty() {
- Exclude checks
Method name "Git_Wrapper::remove_wp_content_from_version_control" is not in camel caps format Open
function remove_wp_content_from_version_control() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_resource( $process ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'GIT_DIR' ) ) {
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->repo_dir = $repo_dir;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function _log(...$args) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$env['GIT_SSH'] = dirname( __FILE__ ) . '/ssh-git';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
0 => array( 'pipe', 'r' ), // stdin
- 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
Inline control structures are not allowed Open
if (!defined('GITIGNORE'))
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private $last_error = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function _rrmdir( $dir ) {
- 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
$env['GIT_KEY_FILE'] = GIT_KEY_FILE;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->repo_dir,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response[] = rtrim( $line, "\n\r" );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->last_error = null;
- 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
$output = '';
- Exclude checks
Inline control structures are not allowed Open
if (isset($args) && $args) foreach ( $args as $arg ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->private_key = $private_key;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $env;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unlink( $env['GIT_KEY_FILE'] );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$cmd,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $files as $file ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function set_key( $private_key ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function is_status_working() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private $gitignore = GITIGNORE;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git_bin_path = apply_filters( 'gitium_git_bin_path', '' );
- 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
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$key_file = tempnam( sys_get_temp_dir(), 'ssh-git' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( is_resource( $proc ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_log( "$return $cmd", join( "\n", $response ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function can_exec_git() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private $repo_dir = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function __construct( $repo_dir ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$filepath = realpath("$dir/$file");
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($output) error_log($output);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = array();
- 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
if ( 0 != $return ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return ( 0 == $return );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function _git_temp_key_file() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'HOME' => getenv( 'HOME' ),
- 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
$proc = proc_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
if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( $return, $response );
- 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
private function get_env() {
- 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
protected function _call(...$args) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$output .= var_export($arg, true).'/n/n';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return ( 0 == $return );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( defined( 'GIT_KEY_FILE' ) && GIT_KEY_FILE ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$env = $this->get_env();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
array(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$pipes,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$env
- 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 ( empty( $dir ) || ! is_dir( $dir ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif ( $this->private_key ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
chmod( $key_file, 0600 );
- 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 ( defined( 'GIT_SSH' ) && GIT_SSH ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$cmd = "{$git_bin_path}git $args 2>&1";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (isset($args) && $args) foreach ( $args as $arg ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$return = (int)proc_close( $proc );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_last_error() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->last_error;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
1 => array( 'pipe', 'w' ), // stdout
- 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
while ( $line = fgets( $pipes[1] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->last_error = join( "\n", $response );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$env = array(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$key_file = null;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$key_file = $this->_git_temp_key_file();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
file_put_contents( $key_file, $this->private_key );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$env['GIT_KEY_FILE'] = $key_file;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private $private_key = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$files = array_diff( scandir( $dir ), array( '.', '..' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return rmdir( $dir );
- Exclude checks
Inline control structures are not allowed Open
if ($output) error_log($output);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $key_file;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$env['GIT_SSH'] = GIT_SSH;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$return = -1;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
fclose( $pipes[0] );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $commits ) = $this->_call( 'rev-list', '@{u}..' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// git rev-list ..@{u}
- 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
foreach ( $haystack as $query ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( false !== $this->strpos_haystack_array( $response, 'previous cherry-pick is now empty' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'branch', '-M', $local_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
function get_version() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'config', 'user.email', 'gitium@presslabs.com' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{u}' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_local_branch() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 0 == $return ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif ( 'DU' == $change ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// abort the cherry-pick if the changes are already pushed
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return substr( $version[0], 12 );
- 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
// rename the local branch to 'merge_local'
- 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
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dot_git_dir = realpath( $this->repo_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
list( $return, ) = $this->_call( 'remote', 'add', 'origin', $url );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_remote_url() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $response[0];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 0 == $return ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'add', '--all', $path );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// delete the 'merge_local' branch
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $response ) = $this->status( true );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 0 != $return ) { return ''; }
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $commits;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', 'HEAD' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( WP_DEBUG ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( in_array( $change, array( 'UD', 'DD' ) ) ) {
- 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
return ( $return !== 0 ? false : join( "\n", $response ) );
- 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
// local branch set up to track remote branch
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( count( $commits ) > 0 ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'branch', '-D', 'merge_local' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'cherry-pick', '--abort' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function merge_with_accept_mine(...$commits) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commits = array_reverse( $commits );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, ) = $this->_call( 'checkout', $local_branch );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, ) = $this->_call( 'status', '-s' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! empty( $version[0] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$realpath = realpath( $dir );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git_index = realpath( $realpath . '/index' );
- 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
error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( isset( $response[0] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return ( 0 == $return );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'add', $path );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_commit_message( $commit ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'branch', '-m', 'merge_local' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'checkout', '-b', 'merge_local' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return ( 0 == count( array_intersect( $changes, array( 'DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU' ) ) ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// git rev-list @{u}..
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
file_put_contents( "$this->repo_dir/.gitignore", $this->gitignore );
- 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 cleanup() {
- 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( $return, ) = $this->_call( 'fetch', 'origin' );
- 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
if ( $return != 0 ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $return != 0 ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'config', 'user.name', 'Gitium' );
- 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
}
- 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
list( $return, $version ) = $this->_call( 'version' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $commits ) = $this->_call( 'rev-list', '..@{u}' );
- 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 ( 0 == $return );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
continue;
- 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
$commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, ) = $this->_call( 'version' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $this->successfully_merged() ) { // git status without states: AA, DD, UA, AU ...
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// checkout to the $local_branch
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git_config = realpath( $realpath . '/config' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function successfully_merged() {
- 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 ( 0 == $return );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'rm', $path );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$message .= "\n\tConflict: $path [local version]";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( empty( $commit ) ) { return false; }
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'cherry-pick', '--abort' );
- 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
$ahead_commits = $this->get_ahead_commits();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// get the local branch
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$changes = array_values( $response );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, ) = $this->_call( 'checkout', $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
function get_ahead_commits() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $response ) = $this->_call( 'config', '--get', 'remote.origin.url' );
- 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
foreach ( $changes as $path => $change ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$message .= "\n\tConflict: $path [added]";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $commits as $commit ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, $response ) = $this->_call( 'cherry-pick', $commit );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'branch', '-M', $local_branch );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return ( 0 == $return );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
error_log( "Gitium cleanup failed. '$dot_git_dir' is not a .git dir." );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function fetch_ref() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected function _resolve_merge_conflicts( $message ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $changes ) = $this->status( true );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function remove_remote() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, ) = $this->_call( 'remote', 'rm', 'origin');
- 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
do_action( 'gitium_before_merge_with_accept_mine' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'branch', $local_branch, $remote_branch );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// combine all commits with the ahead commits
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$remote_branch = $this->get_remote_tracking_branch();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 0 != $return ) {
- 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
function get_behind_commits() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function init() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'config', 'push.default', 'matching' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- 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 False;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function is_dot_git_dir( $dir ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $response[0];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif ( in_array( $change, array( 'AA', 'UU', 'AU', 'UA' ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'checkout', '--theirs', $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
$this->commit( $message );
- 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
function get_remote_tracking_branch() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function cherry_pick( $commits ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $response[0];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_log( $changes );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commits = $commits[0];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// get the remote branch
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, $response ) = $this->_call( 'log', '--format=%B', '-n', '1', $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
list( $return, ) = $this->_call( 'init' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// don't cherry pick if there are no commits
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( WP_DEBUG ) {
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function add_remote_url( $url ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$message .= "\n\tConflict: $path [removed]";
- 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 ( strpos( $query, $needle, $offset) !== false ) { return true; }
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// get ahead commits
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$local_branch = $this->get_local_branch();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->cherry_pick( $commits );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, ) = $this->_call(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$author = "$author_name <$author_email>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! $this->successfully_merged() ) {
- 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
$author = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, $response ) = $this->_call( 'commit', '-m', $message );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $return !== 0 ) { return false; }
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, $response ) = $this->_call( 'rev-parse', 'HEAD' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', $branch );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ( '"' == $path[0] ) && ('"' == $path[strlen( $path ) - 1] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 'D' == $work_tree_status ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$new_response = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$branch_status = array_shift( $response );
- 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
$ahead_count = (int)$response[0];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
array_pop( $response );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commits[ $commit_info[0] ]['committer_email'] = $commit_info[5];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function set_gitignore( $content ) {
- 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 ( 1 == count($args) && is_array( $args[0] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$count = count( $response );
- 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
$work_tree_status = substr( $line, 1, 1 );
- 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
unset( $index_status, $work_tree_status, $path, $new_path, $old_path );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return ! empty( $changes );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'subject' => $message[ $index ],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'author_date' => $commit_info[3],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return file_get_contents( $this->repo_dir . '/.gitignore' );
- 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
list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $count;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return ( $return === 0 ) ? $response[0] : false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_local_changes() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// git status --porcelain will put quotes around paths with whitespaces
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$old_path = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Return the last n commits
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commits[ $commit_info[0] ]['committer_name'] = $commit_info[4];
- 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
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, ) = $this->_call( 'rm', '--cached', $path );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function merge_initial_commit( $commit, $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
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'checkout', 'initial' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params = array_merge( array( 'add', '-n', '--all' ), $args );
- 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
$new_response = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$new_response[ $path ] = $action;
- 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 !== $return ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$old_path = trim( $new_path[0] );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
endforeach;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ahead_count = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function is_dirty() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$changes = $this->get_uncommited_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
$this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! empty( $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
endforeach;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$new_path = explode( '->', $path );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $commit_info[1] != $commit_info[4] && $commit_info[2] != $commit_info[5] ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
file_put_contents( $this->repo_dir . '/.gitignore', $content );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return ( $return == 0 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $response ) = $this->_call( 'branch', '-r' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params = array_merge( array( 'add', '--all' ), $args );
- 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( $return, $response ) = $this->_call( 'commit', '-m', $message, '--author', $author );
- 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
} 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
if ( empty( $line ) ) { continue; } // ignore empty lines like the last item
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$index_status = substr( $line, 0, 1 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$path = trim( $new_path[1] );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$remote_branch = $matches[2];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$new_response[ $file ] = "r$change";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( $branch_status, $new_response );
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$action = 'modified';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
- 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( , $response ) = $this->_call( 'rev-list', "$remote_branch..$local_branch", '--count' );
- Exclude checks
Line exceeds 120 characters; contains 126 characters Open
list( , $response ) = $this->_call( 'diff', '-z', '--name-status', "$local_branch~$ahead_count", $remote_branch );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$file = $response[ $idx * 2 + 1 ];
- 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
if ( ! empty( $response ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! empty( $response ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'author_name' => $commit_info[1],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$path = substr( $line, 3 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function status( $local_only = false ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$behind_count = (int)$response[0];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commits[ $commit_info[0] ]['committer_date'] = $commit_info[6];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 0 !== $return ) { return false; }
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 0 !== $return ) { return false; }
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function get_gitignore() {
- 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
function rm_cached( $path ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Remove files in .gitignore from version control
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
1 => array( 'pipe', 'w' ), // stdout
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_remote_branches() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$args = $args[0];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function commit( $message, $author_name = '', $author_email = '' ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$author_name = $author_email;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! empty( $author ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$action = 'deleted';
- 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 ( $response as $idx => $line ) :
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $local_only ) { return array( $branch_status, $new_response ); }
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $behind_count ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'author_email' => $commit_info[2],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $author_email ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 0 !== $return ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_uncommited_changes() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$new_response[ $path ] = trim( $index_status . $work_tree_status . ' ' . $old_path );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'branch', '-D', 'initial' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', 'HEAD' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return ( $return == 0 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $response as $line ) :
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$path = substr( $line, 3 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$path = substr( $path, 1, strlen( $path ) - 2 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( '', array() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( $branch_status, $new_response );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$local_branch = $matches[1];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $response ) = $this->_call( 'rev-list', "$local_branch..$remote_branch", '--count' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$change = $response[ $idx * 2 ];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- 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
$commits[ $commit_info[0] ] = array(
- 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
function remove_wp_content_from_version_control() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_call( 'cherry-pick', '--abort' );
- 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 ( $return != 0 ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( $return, $response ) = $this->_call( 'status', '--porcelain' );
- 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
list( $return, ) = $this->_call( 'branch', '-m', 'initial' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = array_map( 'trim', $response );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $response;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function add(...$args) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( 0 != $return ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function push( $branch = '' ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function local_status() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ( 'R' === $index_status ) && ( ! empty( $new_path[1] ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( empty( $author_name ) ) {
- 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
$work_tree_status = substr( $line, 1, 1 );
- 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 ( preg_match( '/## ([^.]+)\.+([^ ]+)/', $branch_status, $matches ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $response ) = $this->_call( 'diff', '-z', '--name-status', "$local_branch~$ahead_count", $remote_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
foreach ( $response as $index => $value ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$commit_info = explode( '|', $value );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! isset( $new_response[ $file ] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list( , $changes ) = $this->status();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
array(
- 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( $branch_status, $new_response ) = $this->local_status();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$behind_count = 0;
- 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
function get_last_commits( $n = 20 ) {
- 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
// we don't want the quotes, let's get rid of them
- 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 $new_response;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( '#' == $line[0] ) { continue; } // ignore branch status
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = explode( chr( 0 ), $response[0] );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'rm -rf ' . ABSPATH . '/wp-content/.git',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( is_resource( $process ) ) {
- 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
$pipes
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
define( 'GIT_DIR', dirname( WP_CONTENT_DIR ) );
- 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
$process = proc_open(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
0 => array( 'pipe', 'r' ), // stdin
- 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
proc_close( $process );
- 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
fclose( $pipes[0] );
- 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
Space after opening parenthesis of function call prohibited Open
( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$env['GIT_SSH'] = dirname( __FILE__ ) . '/ssh-git';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'version' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );
- Exclude checks
Closing brace must be on a line by itself Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Opening brace should be on a new line Open
private function get_env() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
'HOME' => getenv( 'HOME' ),
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( defined( 'GIT_SSH' ) && GIT_SSH ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( defined( 'GIT_KEY_FILE' ) && GIT_KEY_FILE ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
chmod( $key_file, 0600 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_log( "$return $cmd", join( "\n", $response ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_log( "$return $cmd", join( "\n", $response ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
'HOME' => getenv( 'HOME' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( is_resource( $proc ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
unlink( $env['GIT_KEY_FILE'] );
- Exclude checks
Opening brace should be on a new line Open
function can_exec_git() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git_bin_path = apply_filters( 'gitium_git_bin_path', '' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_resource( $proc ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
fclose( $pipes[0] );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
while ( $line = fgets( $pipes[1] ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 != $return ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $dir ) || ! is_dir( $dir ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $files as $file ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if (isset($args) && $args) foreach ( $args as $arg ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$env['GIT_SSH'] = dirname( __FILE__ ) . '/ssh-git';
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$return = (int)proc_close( $proc );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->last_error = join( "\n", $response );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$files = array_diff( scandir( $dir ), array( '.', '..' ) );
- Exclude checks
Opening brace should be on a new line Open
function _log(...$args) {
- Exclude checks
Class name "Git_Wrapper" is not in camel caps format Open
class Git_Wrapper {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_log( "$return $cmd", join( "\n", $response ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_log( "$return $cmd", join( "\n", $response ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->last_error = join( "\n", $response );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$files = array_diff( scandir( $dir ), array( '.', '..' ) );
- Exclude checks
Opening brace should be on a new line Open
function get_last_error() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( defined( 'GIT_KEY_FILE' ) && GIT_KEY_FILE ) {
- Exclude checks
Opening brace should be on a new line Open
protected function _call(...$args) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {
- Exclude checks
Opening brace should be on a new line Open
function _rrmdir( $dir ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$files = array_diff( scandir( $dir ), array( '.', '..' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return rmdir( $dir );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
while ( $line = fgets( $pipes[1] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );
- Exclude checks
Newline required after opening brace Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Opening brace should be on a new line Open
function set_key( $private_key ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
} elseif ( $this->private_key ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git_bin_path = apply_filters( 'gitium_git_bin_path', '' );
- Exclude checks
Opening brace should be on a new line Open
function __construct( $repo_dir ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
unlink( $env['GIT_KEY_FILE'] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$files = array_diff( scandir( $dir ), array( '.', '..' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return rmdir( $dir );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( is_resource( $proc ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( $line = fgets( $pipes[1] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$return = (int)proc_close( $proc );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$key_file = tempnam( sys_get_temp_dir(), 'ssh-git' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
chmod( $key_file, 0600 );
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
);
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( defined( 'GIT_KEY_FILE' ) && GIT_KEY_FILE ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$key_file = tempnam( sys_get_temp_dir(), 'ssh-git' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
file_put_contents( $key_file, $this->private_key );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( defined( 'GIT_SSH' ) && GIT_SSH ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
file_put_contents( $key_file, $this->private_key );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
fclose( $pipes[0] );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( empty( $dir ) || ! is_dir( $dir ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( defined( 'GIT_SSH' ) && GIT_SSH ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$response[] = rtrim( $line, "\n\r" );
- Exclude checks
Opening brace should be on a new line Open
function get_version() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $version[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $dir ) || ! is_dir( $dir ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'version' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( empty( $dir ) || ! is_dir( $dir ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( empty( $dir ) || ! is_dir( $dir ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
- Exclude checks
Opening brace should be on a new line Open
function _git_temp_key_file() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$response[] = rtrim( $line, "\n\r" );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 != $return ) { return ''; }
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! empty( $version[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( , $commits ) = $this->_call( 'rev-list', '@{u}..' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( , $response ) = $this->_call( 'config', '--get', 'remote.origin.url' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( , $response ) = $this->_call( 'config', '--get', 'remote.origin.url' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $response ) = $this->_call( 'log', '--format=%B', '-n', '1', $commit );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( strpos( $query, $needle, $offset) !== false ) { return true; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( false !== $this->strpos_haystack_array( $response, 'previous cherry-pick is now empty' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'cherry-pick', '--abort' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return ( 0 == count( array_intersect( $changes, array( 'DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU' ) ) ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return ( 0 == count( array_intersect( $changes, array( 'DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU' ) ) ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $version[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'config', 'user.name', 'Gitium' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
error_log( "Gitium cleanup failed. '$dot_git_dir' is not a .git dir." );
- Exclude checks
Opening brace should be on a new line Open
function remove_remote() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( , $changes ) = $this->status( true );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $changes as $path => $change ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( strpos( $query, $needle, $offset) !== false ) { return true; }
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $return != 0 ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Exclude checks
Opening brace should be on a new line Open
function successfully_merged() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
- Exclude checks
Opening brace should be on a new line Open
function add_remote_url( $url ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', 'HEAD' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return ( $return !== 0 ? false : join( "\n", $response ) );
- Exclude checks
Newline required after opening brace Open
if ( strpos( $query, $needle, $offset) !== false ) { return true; }
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( empty( $commit ) ) { return false; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'branch', $local_branch, $remote_branch );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return ( 0 == count( array_intersect( $changes, array( 'DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU' ) ) ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'status', '-s' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( , $commits ) = $this->_call( 'rev-list', '..@{u}' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'config', 'user.email', 'gitium@presslabs.com' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'config', 'user.email', 'gitium@presslabs.com' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $version ) = $this->_call( 'version' );
- Exclude checks
Newline required after opening brace Open
if ( 0 != $return ) { return ''; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( , $commits ) = $this->_call( 'rev-list', '@{u}..' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
file_put_contents( "$this->repo_dir/.gitignore", $this->gitignore );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'init' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$realpath = realpath( $dir );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $response[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} elseif ( in_array( $change, array( 'AA', 'UU', 'AU', 'UA' ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{u}' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( empty( $commit ) ) { return false; }
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $commit ) ) { return false; }
- Exclude checks
Opening brace should be on a new line Open
function merge_initial_commit( $commit, $branch ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'checkout', '-b', 'merge_local' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_log( $changes );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
} elseif ( in_array( $change, array( 'AA', 'UU', 'AU', 'UA' ) ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $commits as $commit ) {
- Exclude checks
Newline required after opening brace Open
if ( empty( $commit ) ) { return false; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'branch', '-M', $local_branch );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->cherry_pick( $commits );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 != $return ) {
- Exclude checks
Opening brace should be on a new line Open
function get_ahead_commits() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'config', 'push.default', 'matching' );
- Exclude checks
Opening brace should be on a new line Open
function is_dot_git_dir( $dir ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'add', $path );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->commit( $message );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $version ) = $this->_call( 'version' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
do_action( 'gitium_before_merge_with_accept_mine' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return substr( $version[0], 12 );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $return != 0 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->cherry_pick( $commits );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$changes = array_values( $response );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$realpath = realpath( $dir );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$dot_git_dir = realpath( $this->repo_dir . '/.git' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $response[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( , $commits ) = $this->_call( 'rev-list', '..@{u}' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git_index = realpath( $realpath . '/index' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
error_log( "Gitium cleanup failed. '$dot_git_dir' is not a .git dir." );
- Exclude checks
Opening brace should be on a new line Open
function get_remote_url() {
- Exclude checks
Opening brace should be on a new line Open
protected function _resolve_merge_conflicts( $message ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( , $changes ) = $this->status( true );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'checkout', '--theirs', $path );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return ( $return !== 0 ? false : join( "\n", $response ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( in_array( $change, array( 'UD', 'DD' ) ) ) {
- Exclude checks
Opening brace should be on a new line Open
function merge_with_accept_mine(...$commits) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commits = array_reverse( $commits );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'branch', '-m', 'merge_local' );
- Exclude checks
Opening brace should be on a new line Open
function is_status_working() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'checkout', $local_branch );
- Exclude checks
Closing brace must be on a line by itself Open
if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( count( $commits ) > 0 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'status', '-s' );
- Exclude checks
Opening brace should be on a new line Open
function get_remote_branches() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'checkout', $local_branch );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( count( $commits ) > 0 ) {
- Exclude checks
Opening brace should be on a new line Open
function cleanup() {
- Exclude checks
Opening brace should be on a new line Open
function fetch_ref() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_log( $changes );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( in_array( $change, array( 'UD', 'DD' ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'add', '--all', $path );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'branch', '-D', 'merge_local' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'branch', '-M', $local_branch );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return substr( $version[0], 12 );
- Exclude checks
Opening brace should be on a new line Open
function get_behind_commits() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git_config = realpath( $realpath . '/config' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Exclude checks
Opening brace should be on a new line Open
function get_local_branch() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'fetch', 'origin' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'add', '--all', $path );
- Exclude checks
Opening brace should be on a new line Open
function get_commit_message( $commit ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $haystack as $query ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( count( $commits ) > 0 ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
file_put_contents( "$this->repo_dir/.gitignore", $this->gitignore );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'config', 'user.name', 'Gitium' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git_config = realpath( $realpath . '/config' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return ( 0 == count( array_intersect( $changes, array( 'DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU' ) ) ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$dot_git_dir = realpath( $this->repo_dir . '/.git' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'remote', 'add', 'origin', $url );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'remote', 'rm', 'origin');
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{u}' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( WP_DEBUG ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $response[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'rm', $path );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->commit( $message );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 == $return ) {
- Exclude checks
Opening brace should be on a new line Open
private function cherry_pick( $commits ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( in_array( $change, array( 'UD', 'DD' ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $response ) = $this->_call( 'cherry-pick', $commit );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'cherry-pick', '--abort' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commits = array_reverse( $commits );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'cherry-pick', '--abort' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'branch', '-m', 'merge_local' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'checkout', '-b', 'merge_local' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( , $response ) = $this->status( true );
- Exclude checks
Closing brace must be on a line by itself Open
if ( 0 != $return ) { return ''; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git_index = realpath( $realpath . '/index' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'init' );
- Exclude checks
Opening brace should be on a new line Open
function get_remote_tracking_branch() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'config', 'push.default', 'matching' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 == $return ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', 'HEAD' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'fetch', 'origin' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'rm', $path );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
} elseif ( 'DU' == $change ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $response ) = $this->_call( 'cherry-pick', $commit );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
do_action( 'gitium_before_merge_with_accept_mine' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'checkout', '--theirs', $path );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'branch', '-M', $local_branch );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $response ) = $this->_call( 'log', '--format=%B', '-n', '1', $commit );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( , $response ) = $this->status( true );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$changes = array_values( $response );
- Exclude checks
Closing brace must be on a line by itself Open
if ( strpos( $query, $needle, $offset) !== false ) { return true; }
- Exclude checks
Closing brace must be on a line by itself Open
if ( empty( $commit ) ) { return false; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false !== $this->strpos_haystack_array( $response, 'previous cherry-pick is now empty' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'cherry-pick', '--abort' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );
- Exclude checks
Opening brace should be on a new line Open
function init() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $this->successfully_merged() ) { // git status without states: AA, DD, UA, AU ...
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( WP_DEBUG ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'branch', '-M', $local_branch );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'remote', 'add', 'origin', $url );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'add', $path );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
} elseif ( in_array( $change, array( 'AA', 'UU', 'AU', 'UA' ) ) ) {
- Exclude checks
Opening brace should be on a new line Open
private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {
- Exclude checks
Newline required after opening brace Open
if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( false !== $this->strpos_haystack_array( $response, 'previous cherry-pick is now empty' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'branch', $local_branch, $remote_branch );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'branch', '-D', 'merge_local' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'cherry-pick', '--abort' );
- Exclude checks
Opening brace should be on a new line Open
function commit( $message, $author_name = '', $author_email = '' ) {
- Exclude checks
Closing brace must be on a line by itself Open
if ( $return !== 0 ) { return false; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'branch', '-m', 'initial' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );
- Exclude checks
Opening brace should be on a new line Open
function push( $branch = '' ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $response ) = $this->_call( 'status', '--porcelain' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$path = substr( $path, 1, strlen( $path ) - 2 );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ( 'R' === $index_status ) && ( ! empty( $new_path[1] ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'rm', '--cached', $path );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! $this->successfully_merged() ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'checkout', 'initial' );
- Exclude checks
Opening brace must be the last content on the line Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $branch ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! empty( $response ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ( '"' == $path[0] ) && ('"' == $path[strlen( $path ) - 1] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$branch_status = array_shift( $response );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$path = substr( $line, 3 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$old_path = trim( $new_path[0] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( preg_match( '/## ([^.]+)\.+([^ ]+)/', $branch_status, $matches ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$response = explode( chr( 0 ), $response[0] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$count = count( $response );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$params = array_merge( array( 'add', '--all' ), $args );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! empty( $author ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 'D' == $work_tree_status ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
unset( $index_status, $work_tree_status, $path, $new_path, $old_path );
- Exclude checks
Closing brace must be on a line by itself Open
if ( $local_only ) { return array( $branch_status, $new_response ); }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( , $response ) = $this->_call( 'diff', '-z', '--name-status', "$local_branch~$ahead_count", $remote_branch );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$commit_info = explode( '|', $value );
- Exclude checks
Opening brace should be on a new line Open
public function get_gitignore() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'branch', '-D', 'initial' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$response = array_map( 'trim', $response );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 1 == count($args) && is_array( $args[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( 1 == count($args) && is_array( $args[0] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $author_email ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', $branch );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', 'HEAD' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$path = substr( $path, 1, strlen( $path ) - 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ( 'R' === $index_status ) && ( ! empty( $new_path[1] ) ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 != $return ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( , $response ) = $this->_call( 'branch', '-r' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $author ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $response ) = $this->_call( 'commit', '-m', $message );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $response ) = $this->_call( 'rev-parse', 'HEAD' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $response ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ( '"' == $path[0] ) && ('"' == $path[strlen( $path ) - 1] ) ) {
- Exclude checks
Opening brace should be on a new line Open
function get_uncommited_changes() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! empty( $response ) ) {
- Exclude checks
Newline required after opening brace Open
if ( $local_only ) { return array( $branch_status, $new_response ); }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$response = explode( chr( 0 ), $response[0] );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $author_name ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $response ) = $this->_call( 'commit', '-m', $message, '--author', $author );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', $branch );
- Exclude checks
Opening brace should be on a new line Open
function get_local_changes() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $response as $idx => $line ) :
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( empty( $line ) ) { continue; } // ignore empty lines like the last item
- Exclude checks
Closing brace must be on a line by itself Open
if ( '#' == $line[0] ) { continue; } // ignore branch status
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$path = trim( $new_path[1] );
- Exclude checks
Opening brace should be on a new line Open
function status( $local_only = false ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( , $response ) = $this->_call( 'rev-list', "$remote_branch..$local_branch", '--count' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( , $response ) = $this->_call( 'rev-list', "$remote_branch..$local_branch", '--count' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! isset( $new_response[ $file ] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return file_get_contents( $this->repo_dir . '/.gitignore' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
proc_close( $process );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'checkout', $branch );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $return != 0 ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$params = array_merge( array( 'add', '-n', '--all' ), $args );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'branch', '-D', 'initial' );
- Exclude checks
Closing brace must be on a line by itself Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$work_tree_status = substr( $line, 1, 1 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( 1 == count($args) && is_array( $args[0] ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $local_only ) { return array( $branch_status, $new_response ); }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( , $response ) = $this->_call( 'rev-list', "$local_branch..$remote_branch", '--count' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $response ) = $this->_call( 'commit', '-m', $message, '--author', $author );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
array_pop( $response );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $return !== 0 ) { return false; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! isset( $new_response[ $file ] ) ) {
- Exclude checks
Closing brace must be on a line by itself Open
if ( 0 !== $return ) { return false; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$path = substr( $line, 3 );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $commit_info[1] != $commit_info[4] && $commit_info[2] != $commit_info[5] ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$new_response[ $path ] = trim( $index_status . $work_tree_status . ' ' . $old_path );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
file_put_contents( $this->repo_dir . '/.gitignore', $content );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return file_get_contents( $this->repo_dir . '/.gitignore' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! empty( $branch ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 !== $return ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $response as $line ) :
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$path = substr( $line, 3 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! empty( $response ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$new_path = explode( '->', $path );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( preg_match( '/## ([^.]+)\.+([^ ]+)/', $branch_status, $matches ) ) {
- Exclude checks
Opening brace should be on a new line Open
function get_last_commits( $n = 20 ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 !== $return ) { return false; }
- Exclude checks
Newline required after opening brace Open
if ( 0 !== $return ) { return false; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$params = array_merge( array( 'add', '--all' ), $args );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( empty( $author_name ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, $response ) = $this->_call( 'commit', '-m', $message );
- Exclude checks
Newline required after opening brace Open
if ( $return !== 0 ) { return false; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$new_path = explode( '->', $path );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( , $response ) = $this->_call( 'diff', '-z', '--name-status', "$local_branch~$ahead_count", $remote_branch );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$response = explode( chr( 0 ), $response[0] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
return ! empty( $changes );
- Exclude checks
Opening brace should be on a new line Open
public function set_gitignore( $content ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git = new Git_Wrapper( GIT_DIR );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( empty( $author_name ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $branch ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ( '"' == $path[0] ) && ('"' == $path[strlen( $path ) - 1] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $response ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! isset( $new_response[ $file ] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'checkout', $branch );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( , $response ) = $this->_call( 'branch', '-r' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$response = array_map( 'trim', $response );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$this->_call( 'cherry-pick', '--abort' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$work_tree_status = substr( $line, 1, 1 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$path = substr( $line, 3 );
- Exclude checks
Opening brace should be on a new line Open
function local_status() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'branch', '-m', 'initial' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$params = array_merge( array( 'add', '-n', '--all' ), $args );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( empty( $line ) ) { continue; } // ignore empty lines like the last item
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$count = count( $response );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( '#' == $line[0] ) { continue; } // ignore branch status
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->_call( 'checkout', 'initial' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', 'HEAD' );
- Exclude checks
Opening brace should be on a new line Open
function add(...$args) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$index_status = substr( $line, 0, 1 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$path = substr( $path, 1, strlen( $path ) - 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$index_status = substr( $line, 0, 1 );
- Exclude checks
Expected 0 spaces before closing bracket; 2 found Open
list( $return, $response ) = $this->_call( 'status', '--porcelain' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 !== $return ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $author ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$work_tree_status = substr( $line, 1, 1 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( preg_match( '/## ([^.]+)\.+([^ ]+)/', $branch_status, $matches ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $response ) = $this->_call( 'rev-parse', 'HEAD' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$branch_status = array_shift( $response );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$path = substr( $path, 1, strlen( $path ) - 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ( 'R' === $index_status ) && ( ! empty( $new_path[1] ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$old_path = trim( $new_path[0] );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $behind_count ) {
- Exclude checks
Newline required after opening brace Open
if ( 0 !== $return ) { return false; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$commit_info = explode( '|', $value );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$response = explode( chr( 0 ), $response[0] );
- Exclude checks
Closing brace must be on a line by itself Open
if ( 0 !== $return ) { return false; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
file_put_contents( $this->repo_dir . '/.gitignore', $content );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
unset( $index_status, $work_tree_status, $path, $new_path, $old_path );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $line ) ) { continue; } // ignore empty lines like the last item
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$path = trim( $new_path[1] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$new_response[ $path ] = trim( $index_status . $work_tree_status . ' ' . $old_path );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( , $response ) = $this->_call( 'rev-list', "$local_branch..$remote_branch", '--count' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
array_pop( $response );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
return ! empty( $changes );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( 0 !== $return ) { return false; }
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! empty( $response ) ) {
- Exclude checks
Newline required after opening brace Open
if ( empty( $line ) ) { continue; } // ignore empty lines like the last item
- Exclude checks
Closing brace must be on a line by itself Open
if ( empty( $line ) ) { continue; } // ignore empty lines like the last item
- Exclude checks
Newline required after opening brace Open
if ( '#' == $line[0] ) { continue; } // ignore branch status
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$work_tree_status = substr( $line, 1, 1 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {
- Exclude checks
Opening brace should be on a new line Open
function is_dirty() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $response as $index => $value ) {
- Exclude checks
Opening brace should be on a new line Open
function remove_wp_content_from_version_control() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
define( 'GIT_DIR', dirname( WP_CONTENT_DIR ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( is_resource( $process ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! defined( 'GIT_DIR' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
define( 'GIT_DIR', dirname( WP_CONTENT_DIR ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( is_resource( $process ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! defined( 'GIT_DIR' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
fclose( $pipes[0] );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! defined( 'GIT_DIR' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_resource( $process ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
define( 'GIT_DIR', dirname( WP_CONTENT_DIR ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
proc_close( $process );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git = new Git_Wrapper( GIT_DIR );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
list( $return, ) = $this->_call( 'rm', '--cached', $path );
- Exclude checks
Opening brace should be on a new line Open
function rm_cached( $path ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
define( 'GIT_DIR', dirname( WP_CONTENT_DIR ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
fclose( $pipes[0] );
- Exclude checks
The variable $git_bin_path is not named in camelCase. Open
protected function _call(...$args) {
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
$return = -1;
$response = array();
$env = $this->get_env();
- 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_config is not named in camelCase. Open
function is_dot_git_dir( $dir ) {
$realpath = realpath( $dir );
$git_config = realpath( $realpath . '/config' );
$git_index = realpath( $realpath . '/index' );
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- 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_file is not named in camelCase. Open
private function get_env() {
$env = array(
'HOME' => getenv( 'HOME' ),
);
$key_file = null;
- 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_file is not named in camelCase. Open
private function get_env() {
$env = array(
'HOME' => getenv( 'HOME' ),
);
$key_file = null;
- 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_bin_path is not named in camelCase. Open
protected function _call(...$args) {
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
$return = -1;
$response = array();
$env = $this->get_env();
- 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 $dot_git_dir is not named in camelCase. Open
function cleanup() {
$dot_git_dir = realpath( $this->repo_dir . '/.git' );
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
if ( WP_DEBUG ) {
error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );
- 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 $new_response is not named in camelCase. Open
function get_local_changes() {
list( $return, $response ) = $this->_call( 'status', '--porcelain' );
if ( 0 !== $return ) {
return 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 $new_path is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $new_path is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $behind_count is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 $new_response is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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_index is not named in camelCase. Open
function is_dot_git_dir( $dir ) {
$realpath = realpath( $dir );
$git_config = realpath( $realpath . '/config' );
$git_index = realpath( $realpath . '/index' );
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- 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 $work_tree_status is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $branch_status is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $new_response is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $local_only is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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 $new_response is not named in camelCase. Open
function get_local_changes() {
list( $return, $response ) = $this->_call( 'status', '--porcelain' );
if ( 0 !== $return ) {
return 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 $index_status is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $ahead_count is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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_file is not named in camelCase. Open
private function get_env() {
$env = array(
'HOME' => getenv( 'HOME' ),
);
$key_file = null;
- 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 $work_tree_status is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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 $local_branch is not named in camelCase. Open
function merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- 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 $new_response is not named in camelCase. Open
function get_local_changes() {
list( $return, $response ) = $this->_call( 'status', '--porcelain' );
if ( 0 !== $return ) {
return 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 $old_path is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $behind_count is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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_file is not named in camelCase. Open
function _git_temp_key_file() {
$key_file = tempnam( sys_get_temp_dir(), 'ssh-git' );
return $key_file;
}
- 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 $author_email is not named in camelCase. Open
function commit( $message, $author_name = '', $author_email = '' ) {
$author = '';
if ( $author_email ) {
if ( empty( $author_name ) ) {
$author_name = $author_email;
- 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 $local_branch is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $old_path is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $new_response is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 $ahead_count is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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 $local_branch is not named in camelCase. Open
function merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- 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 $new_response is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 $local_branch is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 $local_branch is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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 $local_branch is not named in camelCase. Open
function merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- 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 $work_tree_status is not named in camelCase. Open
function get_local_changes() {
list( $return, $response ) = $this->_call( 'status', '--porcelain' );
if ( 0 !== $return ) {
return 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 $work_tree_status is not named in camelCase. Open
function get_local_changes() {
list( $return, $response ) = $this->_call( 'status', '--porcelain' );
if ( 0 !== $return ) {
return 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 $branch_status is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 $behind_count is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 $branch_status is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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 $dot_git_dir is not named in camelCase. Open
function cleanup() {
$dot_git_dir = realpath( $this->repo_dir . '/.git' );
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
if ( WP_DEBUG ) {
error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );
- 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 $dot_git_dir is not named in camelCase. Open
function cleanup() {
$dot_git_dir = realpath( $this->repo_dir . '/.git' );
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
if ( WP_DEBUG ) {
error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );
- 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 $dot_git_dir is not named in camelCase. Open
function cleanup() {
$dot_git_dir = realpath( $this->repo_dir . '/.git' );
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
if ( WP_DEBUG ) {
error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );
- 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 $new_path is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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 $ahead_commits is not named in camelCase. Open
function merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- 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 merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- 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 $local_branch is not named in camelCase. Open
function merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- 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 $author_email is not named in camelCase. Open
function commit( $message, $author_name = '', $author_email = '' ) {
$author = '';
if ( $author_email ) {
if ( empty( $author_name ) ) {
$author_name = $author_email;
- 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 $index_status is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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_file is not named in camelCase. Open
function _git_temp_key_file() {
$key_file = tempnam( sys_get_temp_dir(), 'ssh-git' );
return $key_file;
}
- 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_file is not named in camelCase. Open
private function get_env() {
$env = array(
'HOME' => getenv( 'HOME' ),
);
$key_file = null;
- 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 $dot_git_dir is not named in camelCase. Open
function cleanup() {
$dot_git_dir = realpath( $this->repo_dir . '/.git' );
if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {
if ( WP_DEBUG ) {
error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );
- 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 $new_response is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $branch_status is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $new_path is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $index_status is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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 $repo_dir is not named in camelCase. Open
function __construct( $repo_dir ) {
$this->repo_dir = $repo_dir;
}
- 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 $local_branch is not named in camelCase. Open
function merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- 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 $author_name is not named in camelCase. Open
function commit( $message, $author_name = '', $author_email = '' ) {
$author = '';
if ( $author_email ) {
if ( empty( $author_name ) ) {
$author_name = $author_email;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $old_path is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $old_path is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $new_response is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $ahead_count is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 $local_branch is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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_config is not named in camelCase. Open
function is_dot_git_dir( $dir ) {
$realpath = realpath( $dir );
$git_config = realpath( $realpath . '/config' );
$git_index = realpath( $realpath . '/index' );
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- 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 $author_name is not named in camelCase. Open
function commit( $message, $author_name = '', $author_email = '' ) {
$author = '';
if ( $author_email ) {
if ( empty( $author_name ) ) {
$author_name = $author_email;
- 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 $work_tree_status is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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 set_key( $private_key ) {
$this->private_key = $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 $key_file is not named in camelCase. Open
private function get_env() {
$env = array(
'HOME' => getenv( 'HOME' ),
);
$key_file = null;
- 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 $ahead_commits is not named in camelCase. Open
function merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- 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 $index_status is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $new_path is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', 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 $branch_status is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 $new_response is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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_info is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- 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_index is not named in camelCase. Open
function is_dot_git_dir( $dir ) {
$realpath = realpath( $dir );
$git_config = realpath( $realpath . '/config' );
$git_index = realpath( $realpath . '/index' );
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- 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 merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- 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 $author_email is not named in camelCase. Open
function commit( $message, $author_name = '', $author_email = '' ) {
$author = '';
if ( $author_email ) {
if ( empty( $author_name ) ) {
$author_name = $author_email;
- 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 $author_name is not named in camelCase. Open
function commit( $message, $author_name = '', $author_email = '' ) {
$author = '';
if ( $author_email ) {
if ( empty( $author_name ) ) {
$author_name = $author_email;
- 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 $new_response is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- 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 $branch_status is not named in camelCase. Open
function status( $local_only = false ) {
list( $branch_status, $new_response ) = $this->local_status();
if ( $local_only ) { return array( $branch_status, $new_response ); }
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method _log is not named in camelCase. Open
function _log(...$args) {
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
$output = '';
if (isset($args) && $args) foreach ( $args as $arg ) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method set_key is not named in camelCase. Open
function set_key( $private_key ) {
$this->private_key = $private_key;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_local_changes is not named in camelCase. Open
function get_local_changes() {
list( $return, $response ) = $this->_call( 'status', '--porcelain' );
if ( 0 !== $return ) {
return array();
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_gitignore is not named in camelCase. Open
public function get_gitignore() {
return file_get_contents( $this->repo_dir . '/.gitignore' );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method strpos_haystack_array is not named in camelCase. Open
private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {
if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }
foreach ( $haystack as $query ) {
if ( strpos( $query, $needle, $offset) !== false ) { return true; }
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_remote_branches is not named in camelCase. Open
function get_remote_branches() {
list( , $response ) = $this->_call( 'branch', '-r' );
$response = array_map( 'trim', $response );
$response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );
return $response;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method rm_cached is not named in camelCase. Open
function rm_cached( $path ) {
list( $return, ) = $this->_call( 'rm', '--cached', $path );
return ( $return == 0 );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_last_error is not named in camelCase. Open
function get_last_error() {
return $this->last_error;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_behind_commits is not named in camelCase. Open
function get_behind_commits() {
list( , $commits ) = $this->_call( 'rev-list', '..@{u}' );
return $commits;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method add_remote_url is not named in camelCase. Open
function add_remote_url( $url ) {
list( $return, ) = $this->_call( 'remote', 'add', 'origin', $url );
return ( 0 == $return );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method remove_remote is not named in camelCase. Open
function remove_remote() {
list( $return, ) = $this->_call( 'remote', 'rm', 'origin');
return ( 0 == $return );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method successfully_merged is not named in camelCase. Open
function successfully_merged() {
list( , $response ) = $this->status( true );
$changes = array_values( $response );
return ( 0 == count( array_intersect( $changes, array( 'DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU' ) ) ) );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method set_gitignore is not named in camelCase. Open
public function set_gitignore( $content ) {
file_put_contents( $this->repo_dir . '/.gitignore', $content );
return true;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method is_status_working is not named in camelCase. Open
function is_status_working() {
list( $return, ) = $this->_call( 'status', '-s' );
return ( 0 == $return );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_version is not named in camelCase. Open
function get_version() {
list( $return, $version ) = $this->_call( 'version' );
if ( 0 != $return ) { return ''; }
if ( ! empty( $version[0] ) ) {
return substr( $version[0], 12 );
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method merge_with_accept_mine is not named in camelCase. Open
function merge_with_accept_mine(...$commits) {
do_action( 'gitium_before_merge_with_accept_mine' );
if ( 1 == count($commits) && is_array( $commits[0] ) ) {
$commits = $commits[0];
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method merge_initial_commit is not named in camelCase. Open
function merge_initial_commit( $commit, $branch ) {
list( $return, ) = $this->_call( 'branch', '-m', 'initial' );
if ( 0 != $return ) {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_uncommited_changes is not named in camelCase. Open
function get_uncommited_changes() {
list( , $changes ) = $this->status();
return $changes;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method local_status is not named in camelCase. Open
function local_status() {
list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );
if ( 0 !== $return ) {
return array( '', array() );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _git_temp_key_file is not named in camelCase. Open
function _git_temp_key_file() {
$key_file = tempnam( sys_get_temp_dir(), 'ssh-git' );
return $key_file;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_env is not named in camelCase. Open
private function get_env() {
$env = array(
'HOME' => getenv( 'HOME' ),
);
$key_file = null;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method cherry_pick is not named in camelCase. Open
private function cherry_pick( $commits ) {
foreach ( $commits as $commit ) {
if ( empty( $commit ) ) { return false; }
list( $return, $response ) = $this->_call( 'cherry-pick', $commit );
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_last_commits is not named in camelCase. Open
function get_last_commits( $n = 20 ) {
list( $return, $message ) = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );
if ( 0 !== $return ) { return false; }
list( $return, $response ) = $this->_call( 'log', '-n', $n, '--pretty=format:%h|%an|%ae|%ad|%cn|%ce|%cd' );
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_remote_url is not named in camelCase. Open
function get_remote_url() {
list( , $response ) = $this->_call( 'config', '--get', 'remote.origin.url' );
if ( isset( $response[0] ) ) {
return $response[0];
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _call is not named in camelCase. Open
protected function _call(...$args) {
$args = join( ' ', array_map( 'escapeshellarg', $args ) );
$return = -1;
$response = array();
$env = $this->get_env();
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method fetch_ref is not named in camelCase. Open
function fetch_ref() {
list( $return, ) = $this->_call( 'fetch', 'origin' );
return ( 0 == $return );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method is_dirty is not named in camelCase. Open
function is_dirty() {
$changes = $this->get_uncommited_changes();
return ! empty( $changes );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_commit_message is not named in camelCase. Open
function get_commit_message( $commit ) {
list( $return, $response ) = $this->_call( 'log', '--format=%B', '-n', '1', $commit );
return ( $return !== 0 ? false : join( "\n", $response ) );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _rrmdir is not named in camelCase. Open
function _rrmdir( $dir ) {
if ( empty( $dir ) || ! is_dir( $dir ) ) {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method can_exec_git is not named in camelCase. Open
function can_exec_git() {
list( $return, ) = $this->_call( 'version' );
return ( 0 == $return );
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_ahead_commits is not named in camelCase. Open
function get_ahead_commits() {
list( , $commits ) = $this->_call( 'rev-list', '@{u}..' );
return $commits;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method is_dot_git_dir is not named in camelCase. Open
function is_dot_git_dir( $dir ) {
$realpath = realpath( $dir );
$git_config = realpath( $realpath . '/config' );
$git_index = realpath( $realpath . '/index' );
if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_remote_tracking_branch is not named in camelCase. Open
function get_remote_tracking_branch() {
list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{u}' );
if ( 0 == $return ) {
return $response[0];
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_local_branch is not named in camelCase. Open
function get_local_branch() {
list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', 'HEAD' );
if ( 0 == $return ) {
return $response[0];
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _resolve_merge_conflicts is not named in camelCase. Open
protected function _resolve_merge_conflicts( $message ) {
list( , $changes ) = $this->status( true );
$this->_log( $changes );
foreach ( $changes as $path => $change ) {
if ( in_array( $change, array( 'UD', 'DD' ) ) ) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method remove_wp_content_from_version_control is not named in camelCase. Open
function remove_wp_content_from_version_control() {
$process = proc_open(
'rm -rf ' . ABSPATH . '/wp-content/.git',
array(
0 => array( 'pipe', 'r' ), // stdin
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}