PressLabs/gitium

View on GitHub
gitium/inc/class-git-wrapper.php

Summary

Maintainability
D
3 days
Test Coverage

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
Severity: Major
Found in gitium/inc/class-git-wrapper.php - About 1 day to fix

    Git_Wrapper has 43 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Git_Wrapper {
    
        private $last_error = '';
        private $gitignore  = GITIGNORE;
    
    
    Severity: Minor
    Found in gitium/inc/class-git-wrapper.php - About 5 hrs to fix

      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;
      
      
      Severity: Minor
      Found in gitium/inc/class-git-wrapper.php by phpmd

      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;
      
      
      Severity: Minor
      Found in gitium/inc/class-git-wrapper.php by phpmd

      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() );
              }
      Severity: Minor
      Found in gitium/inc/class-git-wrapper.php - About 2 hrs to fix

      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();
      Severity: Minor
      Found in gitium/inc/class-git-wrapper.php - About 1 hr to fix

      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();
      Severity: Minor
      Found in gitium/inc/class-git-wrapper.php - About 1 hr to fix

        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];
        Severity: Minor
        Found in gitium/inc/class-git-wrapper.php - About 1 hr to fix

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php - About 45 mins to fix

          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 );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php - About 45 mins to fix

          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();
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php - About 35 mins to fix

          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 ) {
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php - About 35 mins to fix

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php - About 25 mins to fix

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php - About 25 mins to fix

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php - About 25 mins to fix

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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(
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ) {
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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';
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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';
                          }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ) :
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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";
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 {

          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

          The property $private_key is not named in camelCase.
          Open

          class Git_Wrapper {
          
              private $last_error = '';
              private $gitignore  = GITIGNORE;
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ) {
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

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

          Visibility must be declared on method "_rrmdir"
          Open

              function _rrmdir( $dir ) {

          Space found after opening bracket of FOREACH loop
          Open

                  if (isset($args) && $args) foreach ( $args as $arg ) {

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

              function _rrmdir( $dir ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  foreach ( $files as $file ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( defined( 'GIT_SSH' ) && GIT_SSH ) {

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

              function __construct( $repo_dir ) {

          Space found before closing bracket of FOREACH loop
          Open

                  foreach ( $files as $file ) {

          Method name "_log" should not be prefixed with an underscore to indicate visibility
          Open

              function _log(...$args) {

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

              function set_key( $private_key ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 0 != $return ) {

          Visibility must be declared on method "can_exec_git"
          Open

              function can_exec_git() {

          Space found after opening bracket of FOREACH loop
          Open

                  foreach ( $files as $file ) {

          Method name "_call" should not be prefixed with an underscore to indicate visibility
          Open

              protected function _call(...$args) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( is_resource( $proc ) ) {

          Method name "_rrmdir" should not be prefixed with an underscore to indicate visibility
          Open

              function _rrmdir( $dir ) {

          Visibility must be declared on method "set_key"
          Open

              function set_key( $private_key ) {

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

              function _rrmdir( $dir ) {

          Method name "_git_temp_key_file" should not be prefixed with an underscore to indicate visibility
          Open

              function _git_temp_key_file() {

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

              function set_key( $private_key ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( defined( 'GIT_KEY_FILE' ) && GIT_KEY_FILE ) {

          Method name "Git_Wrapper::get_behind_commits" is not in camel caps format
          Open

              function get_behind_commits() {

          Visibility must be declared on method "_log"
          Open

              function _log(...$args) {

          Visibility must be declared on method "get_last_error"
          Open

              function get_last_error() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      while ( $line = fgets( $pipes[1] ) ) {

          Method name "Git_Wrapper::can_exec_git" is not in camel caps format
          Open

              function can_exec_git() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (isset($args) && $args) foreach ( $args as $arg ) {

          Opening brace of a class must be on the line after the definition
          Open

          class Git_Wrapper {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( empty( $dir ) || ! is_dir( $dir ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }

          Method name "Git_Wrapper::set_key" is not in camel caps format
          Open

              function set_key( $private_key ) {

          Visibility must be declared on method "_git_temp_key_file"
          Open

              function _git_temp_key_file() {

          Method name "Git_Wrapper::get_last_error" is not in camel caps format
          Open

              function get_last_error() {

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

              function __construct( $repo_dir ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  } elseif ( $this->private_key ) {

          Space found before closing bracket of FOREACH loop
          Open

                  if (isset($args) && $args) foreach ( $args as $arg ) {

          Method name "Git_Wrapper::_git_temp_key_file" is not in camel caps format
          Open

              function _git_temp_key_file() {

          Method name "Git_Wrapper::get_env" is not in camel caps format
          Open

              private function get_env() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {

          Visibility must be declared on method "get_version"
          Open

              function get_version() {

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

              protected function _resolve_merge_conflicts( $message ) {

          Space found after opening bracket of FOREACH loop
          Open

                  foreach ( $haystack as $query ) {

          Space found before closing bracket of FOREACH loop
          Open

                  foreach ( $haystack as $query ) {

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

              function is_dot_git_dir( $dir ) {

          Visibility must be declared on method "fetch_ref"
          Open

              function fetch_ref() {

          Visibility must be declared on method "get_commit_message"
          Open

              function get_commit_message( $commit ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  foreach ( $commits as $commit ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 0 != $return ) { return ''; }

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 1 == count($commits) && is_array( $commits[0] ) ) {

          Method name "Git_Wrapper::remove_remote" is not in camel caps format
          Open

              function remove_remote() {

          Method name "Git_Wrapper::get_remote_tracking_branch" is not in camel caps format
          Open

              function get_remote_tracking_branch() {

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

              private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( empty( $commit ) ) { return false; }

          Method name "Git_Wrapper::merge_with_accept_mine" is not in camel caps format
          Open

              function merge_with_accept_mine(...$commits) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( WP_DEBUG ) {

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

              function add_remote_url( $url ) {

          Visibility must be declared on method "get_remote_tracking_branch"
          Open

              function get_remote_tracking_branch() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 0 == $return ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  foreach ( $changes as $path => $change ) {

          Method name "Git_Wrapper::get_remote_url" is not in camel caps format
          Open

              function get_remote_url() {

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

              private function cherry_pick( $commits ) {

          Space found after opening bracket of FOREACH loop
          Open

                  foreach ( $changes as $path => $change ) {

          Method name "Git_Wrapper::get_commit_message" is not in camel caps format
          Open

              function get_commit_message( $commit ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 0 != $return ) {

          Visibility must be declared on method "is_status_working"
          Open

              function is_status_working() {

          Visibility must be declared on method "get_behind_commits"
          Open

              function get_behind_commits() {

          Visibility must be declared on method "is_dot_git_dir"
          Open

              function is_dot_git_dir( $dir ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( isset( $response[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      } elseif ( in_array( $change, array( 'AA', 'UU', 'AU', 'UA' ) ) ) {

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

              private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {

          Method name "Git_Wrapper::successfully_merged" is not in camel caps format
          Open

              function successfully_merged() {

          Visibility must be declared on method "init"
          Open

              function init() {

          Visibility must be declared on method "get_local_branch"
          Open

              function get_local_branch() {

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

              function get_commit_message( $commit ) {

          Method name "Git_Wrapper::is_dot_git_dir" is not in camel caps format
          Open

              function is_dot_git_dir( $dir ) {

          Visibility must be declared on method "merge_initial_commit"
          Open

              function merge_initial_commit( $commit, $branch ) {

          Method name "Git_Wrapper::get_local_branch" is not in camel caps format
          Open

              function get_local_branch() {

          Method name "Git_Wrapper::fetch_ref" is not in camel caps format
          Open

              function fetch_ref() {

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

              protected function _resolve_merge_conflicts( $message ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $version[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( in_array( $change, array( 'UD', 'DD' ) ) ) {

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

              function get_commit_message( $commit ) {

          Visibility must be declared on method "successfully_merged"
          Open

              function successfully_merged() {

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

              function is_dot_git_dir( $dir ) {

          TRUE, FALSE and NULL must be lowercase; expected "true" but found "True"
          Open

                      return True;

          Method name "Git_Wrapper::merge_initial_commit" is not in camel caps format
          Open

              function merge_initial_commit( $commit, $branch ) {

          Visibility must be declared on method "add_remote_url"
          Open

              function add_remote_url( $url ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 0 == $return ) {

          Method name "_resolve_merge_conflicts" should not be prefixed with an underscore to indicate visibility
          Open

              protected function _resolve_merge_conflicts( $message ) {

          Method name "Git_Wrapper::strpos_haystack_array" is not in camel caps format
          Open

              private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {

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

              private function cherry_pick( $commits ) {

          Space found before closing bracket of FOREACH loop
          Open

                  foreach ( $commits as $commit ) {

          Method name "Git_Wrapper::get_version" is not in camel caps format
          Open

              function get_version() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  foreach ( $haystack as $query ) {

          Space found after opening bracket of FOREACH loop
          Open

                  foreach ( $commits as $commit ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( false !== $this->strpos_haystack_array( $response, 'previous cherry-pick is now empty' ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( $return != 0 ) {

          Method name "Git_Wrapper::get_ahead_commits" is not in camel caps format
          Open

              function get_ahead_commits() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( count( $commits ) > 0 ) {

          Visibility must be declared on method "cleanup"
          Open

              function cleanup() {

          TRUE, FALSE and NULL must be lowercase; expected "true" but found "True"
          Open

                      return True;

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

              function merge_initial_commit( $commit, $branch ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( WP_DEBUG ) {

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

              function add_remote_url( $url ) {

          Space found before closing bracket of FOREACH loop
          Open

                  foreach ( $changes as $path => $change ) {

          Visibility must be declared on method "remove_remote"
          Open

              function remove_remote() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      } elseif ( 'DU' == $change ) {

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

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( strpos( $query, $needle, $offset) !== false ) { return true; }

          Method name "Git_Wrapper::cherry_pick" is not in camel caps format
          Open

              private function cherry_pick( $commits ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( $this->successfully_merged() ) { // git status without states: AA, DD, UA, AU ...

          Method name "Git_Wrapper::is_status_working" is not in camel caps format
          Open

              function is_status_working() {

          Visibility must be declared on method "get_ahead_commits"
          Open

              function get_ahead_commits() {

          Visibility must be declared on method "get_remote_url"
          Open

              function get_remote_url() {

          TRUE, FALSE and NULL must be lowercase; expected "false" but found "False"
          Open

                  return False;

          Method name "Git_Wrapper::_resolve_merge_conflicts" is not in camel caps format
          Open

              protected function _resolve_merge_conflicts( $message ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {

          Incorrect spacing between argument "$offset" and equals sign; expected 1 but found 0
          Open

              private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( $return != 0 ) {

          Visibility must be declared on method "merge_with_accept_mine"
          Open

              function merge_with_accept_mine(...$commits) {

          TRUE, FALSE and NULL must be lowercase; expected "false" but found "False"
          Open

                  return False;

          Method name "Git_Wrapper::add_remote_url" is not in camel caps format
          Open

              function add_remote_url( $url ) {

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

              function commit( $message, $author_name = '', $author_email = '' ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if ( '#' == $line[0] ) { continue; } // ignore branch status

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if ( ( 'R' === $index_status ) && ( ! empty( $new_path[1] ) ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( $return != 0 ) {

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

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

          Visibility must be declared on method "get_local_changes"
          Open

              function get_local_changes() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if ( 'D' == $work_tree_status ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 0 !== $return ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $response ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  foreach ( $response as $index => $value ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( ! $this->successfully_merged() ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 1 == count($args) && is_array( $args[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $response ) ) {

          Method name "Git_Wrapper::local_status" is not in camel caps format
          Open

              function local_status() {

          Visibility must be declared on method "get_last_commits"
          Open

              function get_last_commits( $n = 20 ) {

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

              public function set_gitignore( $content ) {

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

              function push( $branch = '' ) {

          Space found before first semicolon of FOR loop
          Open

                      for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {

          Method name "Git_Wrapper::rm_cached" is not in camel caps format
          Open

              function rm_cached( $path ) {

          Expected 1 space after FUNCTION keyword; 0 found
          Open

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $branch ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if ( ( '"' == $path[0] ) && ('"' == $path[strlen( $path ) - 1] ) ) {

          Visibility must be declared on method "status"
          Open

              function status( $local_only = false ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if ( ! isset( $new_response[ $file ] ) ) {

          Space found before closing bracket of FOREACH loop
          Open

                  foreach ( $response as $index => $value ) {

          Method name "Git_Wrapper::set_gitignore" is not in camel caps format
          Open

              public function set_gitignore( $content ) {

          Space found before closing bracket of FOREACH loop
          Open

                      foreach ( $response as $line ) :

          Method name "Git_Wrapper::get_gitignore" is not in camel caps format
          Open

              public function get_gitignore() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 0 != $return ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( $author_email ) {

          Visibility must be declared on method "push"
          Open

              function push( $branch = '' ) {

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

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

          Visibility must be declared on method "add"
          Open

              function add(...$args) {

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

              function push( $branch = '' ) {

          Method name "Git_Wrapper::get_last_commits" is not in camel caps format
          Open

              function get_last_commits( $n = 20 ) {

          Space found after opening bracket of FOREACH loop
          Open

                      foreach ( $response as $line ) :

          Space found before closing bracket of FOREACH loop
          Open

                      foreach ( $response as $idx => $line ) :

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( $behind_count ) {

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

              public function set_gitignore( $content ) {

          Visibility must be declared on method "rm_cached"
          Open

              function rm_cached( $path ) {

          Visibility must be declared on method "commit"
          Open

              function commit( $message, $author_name = '', $author_email = '' ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $author ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( $return !== 0 ) { return false; }

          Space found before second semicolon of FOR loop
          Open

                      for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {

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

              function get_last_commits( $n = 20 ) {

          Space found after opening bracket of FOREACH loop
          Open

                  foreach ( $response as $index => $value ) {

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

              function rm_cached( $path ) {

          Visibility must be declared on method "local_status"
          Open

              function local_status() {

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

              function status( $local_only = false ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 0 !== $return ) { return false; }

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

              function merge_initial_commit( $commit, $branch ) {

          Each PHP statement must be on a line by itself
          Open

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

          Method name "Git_Wrapper::get_local_changes" is not in camel caps format
          Open

              function get_local_changes() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 0 !== $return ) {

          Space found after opening bracket of FOR loop
          Open

                      for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 0 !== $return ) { return false; }

          Method name "Git_Wrapper::get_remote_branches" is not in camel caps format
          Open

              function get_remote_branches() {

          Visibility must be declared on method "get_remote_branches"
          Open

              function get_remote_branches() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      foreach ( $response as $idx => $line ) :

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if ( empty( $line ) ) { continue; } // ignore empty lines like the last item

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

              function commit( $message, $author_name = '', $author_email = '' ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( empty( $author_name ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( $local_only ) { return array( $branch_status, $new_response ); }

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( preg_match( '/## ([^.]+)\.+([^ ]+)/', $branch_status, $matches ) ) {

          Visibility must be declared on method "get_uncommited_changes"
          Open

              function get_uncommited_changes() {

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

              function status( $local_only = false ) {

          Space found before closing bracket of FOR loop
          Open

                      for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {

          Method name "Git_Wrapper::get_uncommited_changes" is not in camel caps format
          Open

              function get_uncommited_changes() {

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

              function get_last_commits( $n = 20 ) {

          Visibility must be declared on method "remove_wp_content_from_version_control"
          Open

              function remove_wp_content_from_version_control() {

          Space found after opening bracket of FOREACH loop
          Open

                      foreach ( $response as $idx => $line ) :

          Visibility must be declared on method "is_dirty"
          Open

              function is_dirty() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( $commit_info[1] != $commit_info[4] && $commit_info[2] != $commit_info[5] ) {

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

              function rm_cached( $path ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      foreach ( $response as $line ) :

          Method name "Git_Wrapper::is_dirty" is not in camel caps format
          Open

              function is_dirty() {

          Method name "Git_Wrapper::remove_wp_content_from_version_control" is not in camel caps format
          Open

              function remove_wp_content_from_version_control() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( is_resource( $process ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

          if ( ! defined( 'GIT_DIR' ) ) {

          Only one argument is allowed per line in a multi-line function call
          Open

                      'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit

          Only one argument is allowed per line in a multi-line function call
          Open

                      'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit

          Only one argument is allowed per line in a multi-line function call
          Open

                      'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit

          Only one argument is allowed per line in a multi-line function call
          Open

                      'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit

          Only one argument is allowed per line in a multi-line function call
          Open

                      'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit

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

                  $this->repo_dir = $repo_dir;

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

              function _log(...$args) {

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

                      $env['GIT_SSH'] = dirname( __FILE__ ) . '/ssh-git';

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

                          0 => array( 'pipe', 'r' ),  // stdin

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

                      ),

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

                      }

          Inline control structures are not allowed
          Open

          if (!defined('GITIGNORE'))

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

              private $last_error = '';

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

              function _rrmdir( $dir ) {

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

              }

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

              }

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

                  );

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

                  }

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

                      $env['GIT_KEY_FILE'] = GIT_KEY_FILE;

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

                      $this->repo_dir,

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

                          $response[] = rtrim( $line, "\n\r" );

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

                      $this->last_error = null;

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

              }

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

                  $output = '';

          Inline control structures are not allowed
          Open

                  if (isset($args) && $args) foreach ( $args as $arg ) {

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

                  $this->private_key = $private_key;

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

                  return $env;

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

                      unlink( $env['GIT_KEY_FILE'] );

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

                  }

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

                  } else {

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

                      $cmd,

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

                  foreach ( $files as $file ) {

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

              function set_key( $private_key ) {

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

                  $args     = join( ' ', array_map( 'escapeshellarg', $args ) );

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

              function is_status_working() {

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

              private $gitignore  = GITIGNORE;

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

                      ( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );

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

                  $git_bin_path = apply_filters( 'gitium_git_bin_path', '' );

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

                      return false;

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

                  } else {

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

                  $key_file = tempnam( sys_get_temp_dir(), 'ssh-git' );

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

                  if ( is_resource( $proc ) ) {

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

                  $this->_log( "$return $cmd", join( "\n", $response ) );

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

              function can_exec_git() {

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

              private $repo_dir = '';

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

              function __construct( $repo_dir ) {

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

                      $filepath = realpath("$dir/$file");

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

                  if ($output) error_log($output);

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

                  $response = array();

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

                  );

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

                  }

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

                  if ( 0 != $return ) {

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

                  return ( 0 == $return );

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

                  }

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

              function _git_temp_key_file() {

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

                      'HOME' => getenv( 'HOME' ),

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

              }

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

                  $proc = proc_open(

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

                  }

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

                  if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {

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

                  return array( $return, $response );

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

                  if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }

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

              private function get_env() {

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

                  }

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

              protected function _call(...$args) {

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

                      $output .= var_export($arg, true).'/n/n';

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

                  return ( 0 == $return );

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

              }

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

                  if ( defined( 'GIT_KEY_FILE' ) && GIT_KEY_FILE ) {

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

                  }

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

                  $env      = $this->get_env();

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

                      array(

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

                      $pipes,

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

                      $env

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

              }

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

                  if ( empty( $dir ) || ! is_dir( $dir ) ) {

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

                  }

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

                  } elseif ( $this->private_key ) {

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

                      chmod( $key_file, 0600 );

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

              }

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

                  if ( defined( 'GIT_SSH' ) && GIT_SSH ) {

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

                  $cmd = "{$git_bin_path}git $args 2>&1";

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

                  if (isset($args) && $args) foreach ( $args as $arg ) {

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

                      $return = (int)proc_close( $proc );

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

              function get_last_error() {

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

                  return $this->last_error;

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

                          1 => array( 'pipe', 'w' ),  // stdout

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

              }

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

                      while ( $line = fgets( $pipes[1] ) ) {

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

                      $this->last_error = join( "\n", $response );

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

                  $env      = array(

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

                  $key_file = null;

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

                      $key_file = $this->_git_temp_key_file();

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

                      file_put_contents( $key_file, $this->private_key );

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

                      $env['GIT_KEY_FILE'] = $key_file;

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

              private $private_key = '';

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

                  $files = array_diff( scandir( $dir ), array( '.', '..' ) );

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

                  return rmdir( $dir );

          Inline control structures are not allowed
          Open

                  if ($output) error_log($output);

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

                  return $key_file;

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

                      $env['GIT_SSH'] = GIT_SSH;

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

                  $return   = -1;

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

                      fclose( $pipes[0] );

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

                  list( , $commits ) = $this->_call( 'rev-list', '@{u}..' );

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

              // git rev-list ..@{u}

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

                  }

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

                  }

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

                  foreach ( $haystack as $query ) {

          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' ) ) {

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

                  }

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

                  }

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

                      $this->_call( 'branch', '-M', $local_branch );

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

              }

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

              function get_version() {

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

                  $this->_call( 'config', 'user.email', 'gitium@presslabs.com' );

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

          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}' );

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

              function get_local_branch() {

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

                  if ( 0 == $return ) {

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

                      } elseif ( 'DU' == $change ) {

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

                      // abort the cherry-pick if the changes are already pushed

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

                      return substr( $version[0], 12 );

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

                  }

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

                  // rename the local branch to 'merge_local'

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

                      return false;

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

                      return false;

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

                  $dot_git_dir = realpath( $this->repo_dir . '/.git' );

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

              }

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

                  list( $return, ) = $this->_call( 'remote', 'add', 'origin', $url );

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

              function get_remote_url() {

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

                      return $response[0];

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

                  return '';

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

              }

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

                  if ( 0 == $return ) {

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

                          $this->_call( 'add', '--all', $path );

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

                      // delete the 'merge_local' branch

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

                  list( , $response ) = $this->status( true );

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

                  if ( 0 != $return ) { return ''; }

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

              }

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

                      }

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

                  return $commits;

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

                  list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', 'HEAD' );

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

                  if ( WP_DEBUG ) {

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

                      if ( in_array( $change, array( 'UD', 'DD' ) ) ) {

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

                  return False;

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

                  return ( $return !== 0 ? false : join( "\n", $response ) );

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

              }

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

              }

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

                  // local branch set up to track remote branch

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

                  if ( count( $commits ) > 0 ) {

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

                  }

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

                      $this->_call( 'branch', '-D', 'merge_local' );

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

                      $this->_call( 'cherry-pick', '--abort' );

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

              function merge_with_accept_mine(...$commits) {

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

                  $commits = array_reverse( $commits );

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

                  list( $return, ) = $this->_call( 'checkout', $local_branch );

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

                  list( $return, ) = $this->_call( 'status', '-s' );

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

                  if ( ! empty( $version[0] ) ) {

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

                  $realpath   = realpath( $dir );

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

                  $git_index  = realpath( $realpath . '/index' );

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

              }

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

                          error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );

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

                  if ( isset( $response[0] ) ) {

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

                  return ( 0 == $return );

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

                          $this->_call( 'add', $path );

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

              function get_commit_message( $commit ) {

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

                  $this->_call( 'branch', '-m', 'merge_local' );

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

                  }

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

                      $this->_call( 'checkout', '-b', 'merge_local' );

          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' ) ) ) );

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

              // git rev-list @{u}..

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

                  file_put_contents( "$this->repo_dir/.gitignore", $this->gitignore );

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

                      return True;

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

              function cleanup() {

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

              }

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

                  list( $return, ) = $this->_call( 'fetch', 'origin' );

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

                      }

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

              }

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

                      if ( $return != 0 ) {

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

                  if ( $return != 0 ) {

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

                  $this->_call( 'config', 'user.name', 'Gitium' );

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

                      return True;

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

              }

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

                  return false;

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

                  list( $return, $version ) = $this->_call( 'version' );

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

                  return '';

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

                  list( , $commits  ) = $this->_call( 'rev-list', '..@{u}' );

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

                  return $commits;

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

                  return ( 0 == $return );

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

                          continue;

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

                      }

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

              }

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

                  $commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );

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

                  list( $return, ) = $this->_call( 'version' );

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

                  if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }

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

                  if ( $this->successfully_merged() ) { // git status without states: AA, DD, UA, AU ...

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

                          $this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );

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

                  // checkout to the $local_branch

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

                  $git_config = realpath( $realpath . '/config' );

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

              function successfully_merged() {

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

                  }

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

                  return ( 0 == $return );

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

              }

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

                          $this->_call( 'rm', $path );

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

                          $message .= "\n\tConflict: $path [local version]";

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

                      if ( empty( $commit ) ) { return false; }

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

                          $this->_call( 'cherry-pick', '--abort' );

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

                      }

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

                  $ahead_commits = $this->get_ahead_commits();

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

                  // get the local branch

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

                  $changes = array_values( $response );

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

                  list( $return, ) = $this->_call( 'checkout', $branch );

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

              }

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

              function get_ahead_commits() {

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

                  list( , $response ) = $this->_call( 'config', '--get', 'remote.origin.url' );

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

                  return false;

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

                  foreach ( $changes as $path => $change ) {

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

                          $message .= "\n\tConflict: $path [added]";

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

              private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {

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

                  foreach ( $commits as $commit ) {

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

                      list( $return, $response ) = $this->_call( 'cherry-pick', $commit );

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

                  if ( 1 == count($commits) && is_array( $commits[0] ) ) {

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

                  }

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

                      $this->_call( 'branch', '-M', $local_branch );

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

                  return ( 0 == $return );

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

                  }

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

              }

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

              }

          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." );

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

              function fetch_ref() {

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

              protected function _resolve_merge_conflicts( $message ) {

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

                  list( , $changes ) = $this->status( true );

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

              function remove_remote() {

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

                  list( $return, ) = $this->_call( 'remote', 'rm', 'origin');

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

                  }

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

              }

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

                  do_action( 'gitium_before_merge_with_accept_mine' );

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

                  $this->_call( 'branch', $local_branch, $remote_branch );

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

                  // combine all commits with the ahead commits

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

                  $remote_branch = $this->get_remote_tracking_branch();

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

                  if ( 0 != $return ) {

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

                  } else {

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

              function get_behind_commits() {

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

              }

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

              function init() {

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

                  $this->_call( 'config', 'push.default', 'matching' );

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

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

              }

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

                  return False;

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

              function is_dot_git_dir( $dir ) {

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

                      return $response[0];

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

              }

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

                      } elseif ( in_array( $change, array( 'AA', 'UU', 'AU', 'UA' ) ) ) {

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

                          $this->_call( 'checkout', '--theirs', $path );

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

                  }

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

                  $this->commit( $message );

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

                  return false;

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

              function get_remote_tracking_branch() {

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

              private function cherry_pick( $commits ) {

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

                      return $response[0];

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

                  $this->_log( $changes );

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

                      $commits = $commits[0];

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

                  // get the remote branch

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

                  list( $return, $response ) = $this->_call( 'log', '--format=%B', '-n', '1', $commit );

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

                  }

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

                  list( $return, ) = $this->_call( 'init' );

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

                  // don't cherry pick if there are no commits

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

                      if ( WP_DEBUG ) {

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

                      return true;

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

                  }

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

              function add_remote_url( $url ) {

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

                  }

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

                          $message .= "\n\tConflict: $path [removed]";

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

              }

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

                      if ( strpos( $query, $needle, $offset) !== false ) { return true; }

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

                  // get ahead commits

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

                  $local_branch  = $this->get_local_branch();

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

                      $this->cherry_pick( $commits );

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

                  list( $return, ) = $this->_call(

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

                      $author = "$author_name <$author_email>";

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

                      if ( ! $this->successfully_merged() ) {

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

              }

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

                  $author = '';

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

                      list( $return, $response ) = $this->_call( 'commit', '-m', $message );

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

                  if ( $return !== 0 ) { return false; }

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

                  list( $return, $response ) = $this->_call( 'rev-parse', 'HEAD' );

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

                      list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', $branch );

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

                          if ( ( '"' == $path[0] ) && ('"' == $path[strlen( $path ) - 1] ) ) {

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

                          if ( 'D' == $work_tree_status ) {

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

                  $new_response = array();

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

                      $branch_status = array_shift( $response );

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

                          }

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

              }

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

                      $ahead_count = (int)$response[0];

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

                      array_pop( $response );

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

                          $commits[ $commit_info[0] ]['committer_email'] = $commit_info[5];

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

              public function set_gitignore( $content ) {

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

              }

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

                  if ( 1 == count($args) && is_array( $args[0] ) ) {

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

                  $count = count( $response );

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

                  } else {

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

                          $work_tree_status = substr( $line, 1, 1 );

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

                  return $changes;

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

                          unset( $index_status, $work_tree_status, $path, $new_path, $old_path );

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

                  return ! empty( $changes );

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

               */

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

                          'subject'         => $message[ $index ],

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

                          'author_date'     => $commit_info[3],

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

                  return file_get_contents( $this->repo_dir . '/.gitignore' );

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

                  );

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

                      }

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

              }

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

                  }

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

                  list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );

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

                  return $count;

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

                  return ( $return === 0 ) ? $response[0] : false;

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

              function get_local_changes() {

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

                      return array();

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

                              // git status --porcelain will put quotes around paths with whitespaces

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

                          $old_path = '';

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

               * Return the last n commits

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

                          $commits[ $commit_info[0] ]['committer_name']  = $commit_info[4];

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

                  return true;

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

               */

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

                  list( $return, ) = $this->_call( 'rm', '--cached', $path );

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

              function merge_initial_commit( $commit, $branch ) {

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

                      return false;

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

                      return false;

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

                      'cherry-pick', '--strategy', 'recursive', '--strategy-option', 'theirs', $commit

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

                          $this->_call( 'checkout', 'initial' );

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

                  $params = array_merge( array( 'add', '-n', '--all' ), $args );

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

                  } else {

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

                  $new_response = array();

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

                          $new_response[ $path ] = $action;

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

              }

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

                  if ( 0 !== $return ) {

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

                              $old_path = trim( $new_path[0] );

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

                      endforeach;

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

                  $ahead_count  = 0;

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

              function is_dirty() {

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

                  $changes = $this->get_uncommited_changes();

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

              }

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

                  }

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

                      $this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );

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

                  if ( ! empty( $branch ) ) {

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

              }

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

                          }

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

                      endforeach;

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

                          $new_path = explode( '->', $path );

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

                      for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {

          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] ) {

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

                  file_put_contents( $this->repo_dir . '/.gitignore', $content );

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

                  return ( $return == 0 );

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

                  list( , $response ) = $this->_call( 'branch', '-r' );

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

                  $params = array_merge( array( 'add', '--all' ), $args );

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

                  }

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

                      list( $return, $response ) = $this->_call( 'commit', '-m', $message, '--author', $author );

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

                  }

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

                  }

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

              /*

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

                          } else {

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

                          }

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

                          if ( empty( $line ) ) { continue; } // ignore empty lines like the last item

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

                          $index_status     = substr( $line, 0, 1 );

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

                              $path     = trim( $new_path[1] );

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

                      $remote_branch = $matches[2];

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

                              $new_response[ $file ] = "r$change";

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

                  return array( $branch_status, $new_response );

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

                  return $commits;

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

                  return true;

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

                      }

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

                              $action = 'modified';

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

                  list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );

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

                  }

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

                      list( , $response ) = $this->_call( 'rev-list', "$remote_branch..$local_branch", '--count' );

          Line exceeds 120 characters; contains 126 characters
          Open

                      list( , $response ) = $this->_call( 'diff', '-z', '--name-status', "$local_branch~$ahead_count", $remote_branch );

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

                          $file   = $response[ $idx * 2 + 1 ];

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

              }

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

                  }

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

                  if ( ! empty( $response ) ) {

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

                  list( $return, $message )  = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );

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

                  if ( ! empty( $response ) ) {

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

                          'author_name'     => $commit_info[1],

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

                          $path             = substr( $line, 3 );

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

              function status( $local_only = false ) {

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

                      $behind_count = (int)$response[0];

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

                          $commits[ $commit_info[0] ]['committer_date']  = $commit_info[6];

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

                  if ( 0 !== $return ) { return false; }

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

                  if ( 0 !== $return ) { return false; }

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

              public function get_gitignore() {

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

              }

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

              function rm_cached( $path ) {

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

               * Remove files in .gitignore from version control

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

                          1 => array( 'pipe', 'w' ),  // stdout

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

              function get_remote_branches() {

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

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

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

                      $args = $args[0];

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

                  list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );

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

              function commit( $message, $author_name = '', $author_email = '' ) {

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

                          $author_name = $author_email;

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

                  if ( ! empty( $author ) ) {

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

                              $action = 'deleted';

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

              }

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

                      foreach ( $response as $idx => $line ) :

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

                  if ( $local_only ) { return array( $branch_status, $new_response ); }

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

                  if ( $behind_count ) {

          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' );

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

                          'author_email'    => $commit_info[2],

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

                  if ( $author_email ) {

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

                  if ( 0 !== $return ) {

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

                  }

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

              function get_uncommited_changes() {

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

                          $new_response[ $path ] = trim( $index_status . $work_tree_status . ' ' . $old_path );

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

                  $this->_call( 'branch', '-D', 'initial' );

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

                      list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', 'HEAD' );

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

                  return ( $return == 0 );

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

                      foreach ( $response as $line ) :

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

                          $path = substr( $line, 3 );

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

                              $path = substr( $path, 1, strlen( $path ) - 2 );

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

                      return array( '', array() );

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

                  return array( $branch_status, $new_response );

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

                      $local_branch  = $matches[1];

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

                      list( , $response ) = $this->_call( 'rev-list', "$local_branch..$remote_branch", '--count' );

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

                          $change = $response[ $idx * 2 ];

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

                          }

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

              }

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

              /*

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

                      $commits[ $commit_info[0] ] = array(

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

                      );

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

                      }

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

              function remove_wp_content_from_version_control() {

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

                          $this->_call( 'cherry-pick', '--abort' );

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

                          return false;

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

                  if ( $return != 0 ) {

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

                  list( $return, $response ) = $this->_call( 'status', '--porcelain'  );

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

              }

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

                  }

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

                  list( $return, ) = $this->_call( 'branch', '-m', 'initial' );

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

                  $response = array_map( 'trim', $response );

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

                  return $response;

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

              function add(...$args) {

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

                  if ( 0 != $return ) {

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

              function push( $branch = '' ) {

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

              function local_status() {

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

                          if ( ( 'R' === $index_status ) && ( ! empty( $new_path[1] ) ) ) {

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

                      if ( empty( $author_name ) ) {

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

                  }

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

                          $work_tree_status = substr( $line, 1, 1 );

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

              /**

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

                  if ( preg_match( '/## ([^.]+)\.+([^ ]+)/', $branch_status, $matches ) ) {

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

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

                  }

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

                  foreach ( $response as $index => $value ) {

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

                      $commit_info = explode( '|', $value );

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

                          if ( ! isset( $new_response[ $file ] ) ) {

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

                  );

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

              }

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

                  list( , $changes ) = $this->status();

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

                      array(

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

              /**

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

                  list( $branch_status, $new_response ) = $this->local_status();

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

                  $behind_count = 0;

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

                      }

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

              function get_last_commits( $n = 20 ) {

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

                  }

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

                              // we don't want the quotes, let's get rid of them

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

                  }

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

                  return $new_response;

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

                          if ( '#' == $line[0] ) { continue; } // ignore branch status

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

                      $response = explode( chr( 0 ), $response[0] );

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

                      'rm -rf ' . ABSPATH . '/wp-content/.git',

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

                  if ( is_resource( $process ) ) {

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

                      return true;

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

                      $pipes

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

              define( 'GIT_DIR', dirname( WP_CONTENT_DIR ) );

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

                  return false;

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

                  $process = proc_open(

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

                          0 => array( 'pipe', 'r' ),  // stdin

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

                      ),

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

                      proc_close( $process );

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

                  }

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

                      fclose( $pipes[0] );

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

              }

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

              }

          Space after opening parenthesis of function call prohibited
          Open

                      ( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );

          Space after opening parenthesis of function call prohibited
          Open

                      $env['GIT_SSH'] = dirname( __FILE__ ) . '/ssh-git';

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, ) = $this->_call( 'version' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      ( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );

          Closing brace must be on a line by itself
          Open

                  if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }

          Opening brace should be on a new line
          Open

              private function get_env() {

          Space after opening parenthesis of function call prohibited
          Open

                      'HOME' => getenv( 'HOME' ),

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( defined( 'GIT_SSH' ) && GIT_SSH ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( defined( 'GIT_KEY_FILE' ) && GIT_KEY_FILE ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      chmod( $key_file, 0600 );

          Space after opening parenthesis of function call prohibited
          Open

                  $this->_log( "$return $cmd", join( "\n", $response ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $this->_log( "$return $cmd", join( "\n", $response ) );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }

          Expected 0 spaces before closing bracket; 1 found
          Open

                      'HOME' => getenv( 'HOME' ),

          Space after opening parenthesis of function call prohibited
          Open

                  if ( is_resource( $proc ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                      unlink( $env['GIT_KEY_FILE'] );

          Opening brace should be on a new line
          Open

              function can_exec_git() {

          Space after opening parenthesis of function call prohibited
          Open

                      ( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $git_bin_path = apply_filters( 'gitium_git_bin_path', '' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( is_resource( $proc ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                      fclose( $pipes[0] );

          Expected 0 spaces after opening bracket; 1 found
          Open

                      while ( $line = fgets( $pipes[1] ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 0 != $return ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( empty( $dir ) || ! is_dir( $dir ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  foreach ( $files as $file ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if (isset($args) && $args) foreach ( $args as $arg ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $env['GIT_SSH'] = dirname( __FILE__ ) . '/ssh-git';

          Space after opening parenthesis of function call prohibited
          Open

                      $return = (int)proc_close( $proc );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->last_error = join( "\n", $response );

          Space after opening parenthesis of function call prohibited
          Open

                  $files = array_diff( scandir( $dir ), array( '.', '..' ) );

          Opening brace should be on a new line
          Open

              function _log(...$args) {

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

          class Git_Wrapper {

          Space after opening parenthesis of function call prohibited
          Open

                  $this->_log( "$return $cmd", join( "\n", $response ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $this->_log( "$return $cmd", join( "\n", $response ) );

          Space after opening parenthesis of function call prohibited
          Open

                      $this->last_error = join( "\n", $response );

          Space after opening parenthesis of function call prohibited
          Open

                  $files = array_diff( scandir( $dir ), array( '.', '..' ) );

          Opening brace should be on a new line
          Open

              function get_last_error() {

          Space after opening parenthesis of function call prohibited
          Open

                  if ( defined( 'GIT_KEY_FILE' ) && GIT_KEY_FILE ) {

          Opening brace should be on a new line
          Open

              protected function _call(...$args) {

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {

          Opening brace should be on a new line
          Open

              function _rrmdir( $dir ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $files = array_diff( scandir( $dir ), array( '.', '..' ) );

          Space after opening parenthesis of function call prohibited
          Open

                  return rmdir( $dir );

          Space after opening parenthesis of function call prohibited
          Open

                      while ( $line = fgets( $pipes[1] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      ( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );

          Newline required after opening brace
          Open

                  if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }

          Opening brace should be on a new line
          Open

              function set_key( $private_key ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  } elseif ( $this->private_key ) {

          Space after opening parenthesis of function call prohibited
          Open

                  $git_bin_path = apply_filters( 'gitium_git_bin_path', '' );

          Opening brace should be on a new line
          Open

              function __construct( $repo_dir ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      unlink( $env['GIT_KEY_FILE'] );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      ( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $files = array_diff( scandir( $dir ), array( '.', '..' ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  return rmdir( $dir );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( is_resource( $proc ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      while ( $line = fgets( $pipes[1] ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $return = (int)proc_close( $proc );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $key_file = tempnam( sys_get_temp_dir(), 'ssh-git' );

          Space after opening parenthesis of function call prohibited
          Open

                      chmod( $key_file, 0600 );

          Line indented incorrectly; expected at least 4 spaces, found 0
          Open

          );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( defined( 'GIT_KEY_FILE' ) && GIT_KEY_FILE ) {

          Space after opening parenthesis of function call prohibited
          Open

                  $key_file = tempnam( sys_get_temp_dir(), 'ssh-git' );

          Space after opening parenthesis of function call prohibited
          Open

                      file_put_contents( $key_file, $this->private_key );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( defined( 'GIT_SSH' ) && GIT_SSH ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      file_put_contents( $key_file, $this->private_key );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $args     = join( ' ', array_map( 'escapeshellarg', $args ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      fclose( $pipes[0] );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( empty( $dir ) || ! is_dir( $dir ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( defined( 'GIT_SSH' ) && GIT_SSH ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $args     = join( ' ', array_map( 'escapeshellarg', $args ) );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $response[] = rtrim( $line, "\n\r" );

          Opening brace should be on a new line
          Open

              function get_version() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $version[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( empty( $dir ) || ! is_dir( $dir ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  $args     = join( ' ', array_map( 'escapeshellarg', $args ) );

          Space after opening parenthesis of function call prohibited
          Open

                  $args     = join( ' ', array_map( 'escapeshellarg', $args ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! defined( 'GIT_KEY_FILE' ) && isset( $env['GIT_KEY_FILE'] ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, ) = $this->_call( 'version' );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( empty( $dir ) || ! is_dir( $dir ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  if ( empty( $dir ) || ! is_dir( $dir ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                      ( is_dir( $filepath ) ) ? $this->_rrmdir( $filepath ) : unlink( $filepath );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }

          Opening brace should be on a new line
          Open

              function _git_temp_key_file() {

          Space after opening parenthesis of function call prohibited
          Open

                          $response[] = rtrim( $line, "\n\r" );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 0 != $return ) { return ''; }

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( ! empty( $version[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( , $commits ) = $this->_call( 'rev-list', '@{u}..' );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                          error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );

          Space after opening parenthesis of function call prohibited
          Open

                  list( , $response ) = $this->_call( 'config', '--get', 'remote.origin.url' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( , $response ) = $this->_call( 'config', '--get', 'remote.origin.url' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, $response ) = $this->_call( 'log', '--format=%B', '-n', '1', $commit );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }

          Space after opening parenthesis of function call prohibited
          Open

                      if ( strpos( $query, $needle, $offset) !== false ) { return true; }

          Space after opening parenthesis of function call prohibited
          Open

                      if ( false !== $this->strpos_haystack_array( $response, 'previous cherry-pick is now empty' ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  if ( 1 == count($commits) && is_array( $commits[0] ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                      $this->_call( 'cherry-pick', '--abort' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  return ( 0 == count( array_intersect( $changes, array( 'DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU' ) ) ) );

          Space after opening parenthesis of function call prohibited
          Open

                  return ( 0 == count( array_intersect( $changes, array( 'DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU' ) ) ) );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! empty( $version[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $this->_call( 'config', 'user.name', 'Gitium' );

          Space after opening parenthesis of function call prohibited
          Open

                      error_log( "Gitium cleanup failed. '$dot_git_dir' is not a .git dir." );

          Opening brace should be on a new line
          Open

              function remove_remote() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( , $changes ) = $this->status( true );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  foreach ( $changes as $path => $change ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                      if ( strpos( $query, $needle, $offset) !== false ) { return true; }

          Expected 0 spaces after opening bracket; 1 found
          Open

                      if ( $return != 0 ) {

          Space after opening parenthesis of function call prohibited
          Open

                  $commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {

          Opening brace should be on a new line
          Open

              function successfully_merged() {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {

          Opening brace should be on a new line
          Open

              function add_remote_url( $url ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', 'HEAD' );

          Space after opening parenthesis of function call prohibited
          Open

                  return ( $return !== 0 ? false : join( "\n", $response ) );

          Newline required after opening brace
          Open

                      if ( strpos( $query, $needle, $offset) !== false ) { return true; }

          Expected 0 spaces after opening bracket; 1 found
          Open

                      if ( empty( $commit ) ) { return false; }

          Space after opening parenthesis of function call prohibited
          Open

                  $this->_call( 'branch', $local_branch, $remote_branch );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  return ( 0 == count( array_intersect( $changes, array( 'DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU' ) ) ) );

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, ) = $this->_call( 'status', '-s' );

          Space after opening parenthesis of function call prohibited
          Open

                  list( , $commits  ) = $this->_call( 'rev-list', '..@{u}' );

          Space after opening parenthesis of function call prohibited
          Open

                  $this->_call( 'config', 'user.email', 'gitium@presslabs.com' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $this->_call( 'config', 'user.email', 'gitium@presslabs.com' );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, $version ) = $this->_call( 'version' );

          Newline required after opening brace
          Open

                  if ( 0 != $return ) { return ''; }

          Space after opening parenthesis of function call prohibited
          Open

                  list( , $commits ) = $this->_call( 'rev-list', '@{u}..' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  file_put_contents( "$this->repo_dir/.gitignore", $this->gitignore );

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, ) = $this->_call( 'init' );

          Space after opening parenthesis of function call prohibited
          Open

                  $realpath   = realpath( $dir );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( isset( $response[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      } elseif ( in_array( $change, array( 'AA', 'UU', 'AU', 'UA' ) ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{u}' );

          Space after opening parenthesis of function call prohibited
          Open

                      if ( empty( $commit ) ) { return false; }

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 1 == count($commits) && is_array( $commits[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( empty( $commit ) ) { return false; }

          Opening brace should be on a new line
          Open

              function merge_initial_commit( $commit, $branch ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->_call( 'checkout', '-b', 'merge_local' );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          error_log( "Gitium cleanup successfull. Removed '$dot_git_dir'." );

          Space after opening parenthesis of function call prohibited
          Open

                  $this->_log( $changes );

          Space after opening parenthesis of function call prohibited
          Open

                      } elseif ( in_array( $change, array( 'AA', 'UU', 'AU', 'UA' ) ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  foreach ( $commits as $commit ) {

          Newline required after opening brace
          Open

                      if ( empty( $commit ) ) { return false; }

          Space after opening parenthesis of function call prohibited
          Open

                      $this->_call( 'branch', '-M', $local_branch );

          Space after opening parenthesis of function call prohibited
          Open

                      $this->cherry_pick( $commits );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 0 != $return ) {

          Opening brace should be on a new line
          Open

              function get_ahead_commits() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $this->_call( 'config', 'push.default', 'matching' );

          Opening brace should be on a new line
          Open

              function is_dot_git_dir( $dir ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $this->_call( 'add', $path );

          Space after opening parenthesis of function call prohibited
          Open

                  $this->commit( $message );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, $version ) = $this->_call( 'version' );

          Space after opening parenthesis of function call prohibited
          Open

                  do_action( 'gitium_before_merge_with_accept_mine' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      return substr( $version[0], 12 );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( $return != 0 ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->cherry_pick( $commits );

          Space after opening parenthesis of function call prohibited
          Open

                  $changes = array_values( $response );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $realpath   = realpath( $dir );

          Space after opening parenthesis of function call prohibited
          Open

                  $dot_git_dir = realpath( $this->repo_dir . '/.git' );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( isset( $response[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( , $commits  ) = $this->_call( 'rev-list', '..@{u}' );

          Space after opening parenthesis of function call prohibited
          Open

                  $git_index  = realpath( $realpath . '/index' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      error_log( "Gitium cleanup failed. '$dot_git_dir' is not a .git dir." );

          Opening brace should be on a new line
          Open

              function get_remote_url() {

          Opening brace should be on a new line
          Open

              protected function _resolve_merge_conflicts( $message ) {

          Space after opening parenthesis of function call prohibited
          Open

                  list( , $changes ) = $this->status( true );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $this->_call( 'checkout', '--theirs', $path );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  return ( $return !== 0 ? false : join( "\n", $response ) );

          Space after opening parenthesis of function call prohibited
          Open

                      if ( in_array( $change, array( 'UD', 'DD' ) ) ) {

          Opening brace should be on a new line
          Open

              function merge_with_accept_mine(...$commits) {

          Space after opening parenthesis of function call prohibited
          Open

                  $commits = array_reverse( $commits );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $this->_call( 'branch', '-m', 'merge_local' );

          Opening brace should be on a new line
          Open

              function is_status_working() {

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, ) = $this->_call( 'checkout', $local_branch );

          Closing brace must be on a line by itself
          Open

                  if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( count( $commits ) > 0 ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, ) = $this->_call( 'status', '-s' );

          Opening brace should be on a new line
          Open

              function get_remote_branches() {

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, ) = $this->_call( 'checkout', $local_branch );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( count( $commits ) > 0 ) {

          Opening brace should be on a new line
          Open

              function cleanup() {

          Opening brace should be on a new line
          Open

              function fetch_ref() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $this->_log( $changes );

          Expected 0 spaces after opening bracket; 1 found
          Open

                      if ( in_array( $change, array( 'UD', 'DD' ) ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $this->_call( 'add', '--all', $path );

          Space after opening parenthesis of function call prohibited
          Open

                          $this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->_call( 'branch', '-D', 'merge_local' );

          Space after opening parenthesis of function call prohibited
          Open

                      $this->_call( 'branch', '-M', $local_branch );

          Space after opening parenthesis of function call prohibited
          Open

                      return substr( $version[0], 12 );

          Opening brace should be on a new line
          Open

              function get_behind_commits() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $git_config = realpath( $realpath . '/config' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {

          Opening brace should be on a new line
          Open

              function get_local_branch() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, ) = $this->_call( 'fetch', 'origin' );

          Space after opening parenthesis of function call prohibited
          Open

                          $this->_call( 'add', '--all', $path );

          Opening brace should be on a new line
          Open

              function get_commit_message( $commit ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  foreach ( $haystack as $query ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( count( $commits ) > 0 ) {

          Space after opening parenthesis of function call prohibited
          Open

                  file_put_contents( "$this->repo_dir/.gitignore", $this->gitignore );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  $this->_call( 'config', 'user.name', 'Gitium' );

          Space after opening parenthesis of function call prohibited
          Open

                  $git_config = realpath( $realpath . '/config' );

          Space after opening parenthesis of function call prohibited
          Open

                  return ( 0 == count( array_intersect( $changes, array( 'DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU' ) ) ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $dot_git_dir = realpath( $this->repo_dir . '/.git' );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, ) = $this->_call( 'remote', 'add', 'origin', $url );

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, ) = $this->_call( 'remote', 'rm', 'origin');

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{u}' );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( WP_DEBUG ) {

          Space after opening parenthesis of function call prohibited
          Open

                  if ( isset( $response[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $this->_call( 'rm', $path );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $this->commit( $message );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 0 == $return ) {

          Opening brace should be on a new line
          Open

              private function cherry_pick( $commits ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( in_array( $change, array( 'UD', 'DD' ) ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                      list( $return, $response ) = $this->_call( 'cherry-pick', $commit );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );

          Space after opening parenthesis of function call prohibited
          Open

                  $commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );

          Space after opening parenthesis of function call prohibited
          Open

                          $this->_call( 'cherry-pick', '--abort' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $commits = array_reverse( $commits );

          Space after opening parenthesis of function call prohibited
          Open

                  $commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->_call( 'cherry-pick', '--abort' );

          Space after opening parenthesis of function call prohibited
          Open

                  $this->_call( 'branch', '-m', 'merge_local' );

          Space after opening parenthesis of function call prohibited
          Open

                      $this->_call( 'checkout', '-b', 'merge_local' );

          Space after opening parenthesis of function call prohibited
          Open

                  list( , $response ) = $this->status( true );

          Closing brace must be on a line by itself
          Open

                  if ( 0 != $return ) { return ''; }

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $git_index  = realpath( $realpath . '/index' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $realpath ) && is_dir( $realpath ) && file_exists( $git_config ) && file_exists( $git_index ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, ) = $this->_call( 'init' );

          Opening brace should be on a new line
          Open

              function get_remote_tracking_branch() {

          Space after opening parenthesis of function call prohibited
          Open

                  $this->_call( 'config', 'push.default', 'matching' );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 0 == $return ) {

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, $response ) = $this->_call( 'rev-parse', '--abbrev-ref', 'HEAD' );

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, ) = $this->_call( 'fetch', 'origin' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( $this->is_dot_git_dir( $dot_git_dir ) && $this->_rrmdir( $dot_git_dir ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                          $this->_call( 'rm', $path );

          Expected 0 spaces after opening bracket; 1 found
          Open

                      } elseif ( 'DU' == $change ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      list( $return, $response ) = $this->_call( 'cherry-pick', $commit );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  do_action( 'gitium_before_merge_with_accept_mine' );

          Space after opening parenthesis of function call prohibited
          Open

                          $this->_call( 'checkout', '--theirs', $path );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $commits = array_unique( array_merge( array_reverse( $commits ), $ahead_commits ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->_call( 'branch', '-M', $local_branch );

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, $response ) = $this->_call( 'log', '--format=%B', '-n', '1', $commit );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( , $response ) = $this->status( true );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $changes = array_values( $response );

          Closing brace must be on a line by itself
          Open

                      if ( strpos( $query, $needle, $offset) !== false ) { return true; }

          Closing brace must be on a line by itself
          Open

                      if ( empty( $commit ) ) { return false; }

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( false !== $this->strpos_haystack_array( $response, 'previous cherry-pick is now empty' ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $this->_call( 'cherry-pick', '--abort' );

          Space after opening parenthesis of function call prohibited
          Open

                          $this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );

          Opening brace should be on a new line
          Open

              function init() {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 1 == count($commits) && is_array( $commits[0] ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( $this->successfully_merged() ) { // git status without states: AA, DD, UA, AU ...

          Expected 0 spaces after opening bracket; 1 found
          Open

                      if ( WP_DEBUG ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->_call( 'branch', '-M', $local_branch );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, ) = $this->_call( 'remote', 'add', 'origin', $url );

          Space after opening parenthesis of function call prohibited
          Open

                          $this->_call( 'add', $path );

          Expected 0 spaces after opening bracket; 1 found
          Open

                      } elseif ( in_array( $change, array( 'AA', 'UU', 'AU', 'UA' ) ) ) {

          Opening brace should be on a new line
          Open

              private function strpos_haystack_array( $haystack, $needle, $offset=0 ) {

          Newline required after opening brace
          Open

                  if ( ! is_array( $haystack ) ) { $haystack = array( $haystack ); }

          Expected 0 spaces after opening bracket; 1 found
          Open

                      if ( false !== $this->strpos_haystack_array( $response, 'previous cherry-pick is now empty' ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $this->_call( 'branch', $local_branch, $remote_branch );

          Space after opening parenthesis of function call prohibited
          Open

                      $this->_call( 'branch', '-D', 'merge_local' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $this->_call( 'cherry-pick', '--abort' );

          Opening brace should be on a new line
          Open

              function commit( $message, $author_name = '', $author_email = '' ) {

          Closing brace must be on a line by itself
          Open

                  if ( $return !== 0 ) { return false; }

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, ) = $this->_call( 'branch', '-m', 'initial' );

          Space after opening parenthesis of function call prohibited
          Open

                      $this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );

          Space after opening parenthesis of function call prohibited
          Open

                  list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );

          Opening brace should be on a new line
          Open

              function push( $branch = '' ) {

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, $response ) = $this->_call( 'status', '--porcelain'  );

          Expected 0 spaces before closing bracket; 1 found
          Open

                              $path = substr( $path, 1, strlen( $path ) - 2 );

          Expected 0 spaces after opening bracket; 1 found
          Open

                          if ( ( 'R' === $index_status ) && ( ! empty( $new_path[1] ) ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, ) = $this->_call( 'rm', '--cached', $path );

          Space after opening parenthesis of function call prohibited
          Open

                      $this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );

          Expected 0 spaces after opening bracket; 1 found
          Open

                      if ( ! $this->successfully_merged() ) {

          Space after opening parenthesis of function call prohibited
          Open

                          $this->_call( 'checkout', 'initial' );

          Opening brace must be the last content on the line
          Open

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! empty( $branch ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( ! empty( $response ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                          if ( ( '"' == $path[0] ) && ('"' == $path[strlen( $path ) - 1] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $branch_status = array_shift( $response );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $path             = substr( $line, 3 );

          Space after opening parenthesis of function call prohibited
          Open

                              $old_path = trim( $new_path[0] );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( preg_match( '/## ([^.]+)\.+([^ ]+)/', $branch_status, $matches ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                      $response = explode( chr( 0 ), $response[0] );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, $message )  = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );

          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' );

          Space after opening parenthesis of function call prohibited
          Open

                  $count = count( $response );

          Space after opening parenthesis of function call prohibited
          Open

                  $params = array_merge( array( 'add', '--all' ), $args );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( ! empty( $author ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                          if ( 'D' == $work_tree_status ) {

          Space after opening parenthesis of function call prohibited
          Open

                          unset( $index_status, $work_tree_status, $path, $new_path, $old_path );

          Closing brace must be on a line by itself
          Open

                  if ( $local_only ) { return array( $branch_status, $new_response ); }

          Expected 0 spaces before closing bracket; 1 found
          Open

                      list( , $response ) = $this->_call( 'diff', '-z', '--name-status', "$local_branch~$ahead_count", $remote_branch );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {

          Space after opening parenthesis of function call prohibited
          Open

                      $commit_info = explode( '|', $value );

          Opening brace should be on a new line
          Open

              public function get_gitignore() {

          Space after opening parenthesis of function call prohibited
          Open

                  $this->_call( 'branch', '-D', 'initial' );

          Space after opening parenthesis of function call prohibited
          Open

                  $response = array_map( 'trim', $response );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 1 == count($args) && is_array( $args[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( 1 == count($args) && is_array( $args[0] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( $author_email ) {

          Space after opening parenthesis of function call prohibited
          Open

                      list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', $branch );

          Space after opening parenthesis of function call prohibited
          Open

                      list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', 'HEAD' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                              $path = substr( $path, 1, strlen( $path ) - 2 );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if ( ( 'R' === $index_status ) && ( ! empty( $new_path[1] ) ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 0 != $return ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( , $response ) = $this->_call( 'branch', '-r' );

          Space after opening parenthesis of function call prohibited
          Open

                  list ( , $response ) = call_user_func_array( array( $this, '_call' ), $params );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! empty( $author ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                      list( $return, $response ) = $this->_call( 'commit', '-m', $message );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, $response ) = $this->_call( 'rev-parse', 'HEAD' );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! empty( $response ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if ( ( '"' == $path[0] ) && ('"' == $path[strlen( $path ) - 1] ) ) {

          Opening brace should be on a new line
          Open

              function get_uncommited_changes() {

          Space after opening parenthesis of function call prohibited
          Open

                  if ( ! empty( $response ) ) {

          Newline required after opening brace
          Open

                  if ( $local_only ) { return array( $branch_status, $new_response ); }

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $response = explode( chr( 0 ), $response[0] );

          Expected 0 spaces after opening bracket; 1 found
          Open

                      for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if ( empty( $author_name ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      list( $return, $response ) = $this->_call( 'commit', '-m', $message, '--author', $author );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', $branch );

          Opening brace should be on a new line
          Open

              function get_local_changes() {

          Expected 0 spaces after opening bracket; 1 found
          Open

                      foreach ( $response as $idx => $line ) :

          Expected 0 spaces after opening bracket; 1 found
          Open

                          if ( empty( $line ) ) { continue; } // ignore empty lines like the last item

          Closing brace must be on a line by itself
          Open

                          if ( '#' == $line[0] ) { continue; } // ignore branch status

          Expected 0 spaces before closing bracket; 1 found
          Open

                              $path     = trim( $new_path[1] );

          Opening brace should be on a new line
          Open

              function status( $local_only = false ) {

          Space after opening parenthesis of function call prohibited
          Open

                      list( , $response ) = $this->_call( 'rev-list', "$remote_branch..$local_branch", '--count' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      list( , $response ) = $this->_call( 'rev-list', "$remote_branch..$local_branch", '--count' );

          Space after opening parenthesis of function call prohibited
          Open

                          if ( ! isset( $new_response[ $file ] ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  return file_get_contents( $this->repo_dir . '/.gitignore' );

          Space after opening parenthesis of function call prohibited
          Open

                      proc_close( $process );

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, ) = $this->_call( 'checkout', $branch );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( $return != 0 ) {

          Space after opening parenthesis of function call prohibited
          Open

                  $params = array_merge( array( 'add', '-n', '--all' ), $args );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $this->_call( 'branch', '-D', 'initial' );

          Closing brace must be on a line by itself
          Open

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $work_tree_status = substr( $line, 1, 1 );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( 1 == count($args) && is_array( $args[0] ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( $local_only ) { return array( $branch_status, $new_response ); }

          Expected 0 spaces before closing bracket; 1 found
          Open

                      list( , $response ) = $this->_call( 'rev-list', "$local_branch..$remote_branch", '--count' );

          Space after opening parenthesis of function call prohibited
          Open

                      list( $return, $response ) = $this->_call( 'commit', '-m', $message, '--author', $author );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      array_pop( $response );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( $return !== 0 ) { return false; }

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if ( ! isset( $new_response[ $file ] ) ) {

          Closing brace must be on a line by itself
          Open

                  if ( 0 !== $return ) { return false; }

          Space after opening parenthesis of function call prohibited
          Open

                          $path             = substr( $line, 3 );

          Expected 0 spaces after opening bracket; 1 found
          Open

                      if ( $commit_info[1] != $commit_info[4] && $commit_info[2] != $commit_info[5] ) {

          Space after opening parenthesis of function call prohibited
          Open

                          $new_response[ $path ] = trim( $index_status . $work_tree_status . ' ' . $old_path );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  file_put_contents( $this->repo_dir . '/.gitignore', $content );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  return file_get_contents( $this->repo_dir . '/.gitignore' );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( ! empty( $branch ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 0 !== $return ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                      foreach ( $response as $line ) :

          Space after opening parenthesis of function call prohibited
          Open

                          $path = substr( $line, 3 );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( ! empty( $response ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $new_path = explode( '->', $path );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( preg_match( '/## ([^.]+)\.+([^ ]+)/', $branch_status, $matches ) ) {

          Opening brace should be on a new line
          Open

              function get_last_commits( $n = 20 ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 0 !== $return ) { return false; }

          Newline required after opening brace
          Open

                  if ( 0 !== $return ) { return false; }

          Space after opening parenthesis of function call prohibited
          Open

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $params = array_merge( array( 'add', '--all' ), $args );

          Space after opening parenthesis of function call prohibited
          Open

                      if ( empty( $author_name ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      list( $return, $response ) = $this->_call( 'commit', '-m', $message );

          Newline required after opening brace
          Open

                  if ( $return !== 0 ) { return false; }

          Space after opening parenthesis of function call prohibited
          Open

                          $new_path = explode( '->', $path );

          Space after opening parenthesis of function call prohibited
          Open

                      list( , $response ) = $this->_call( 'diff', '-z', '--name-status', "$local_branch~$ahead_count", $remote_branch );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $response = explode( chr( 0 ), $response[0] );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  return ! empty( $changes );

          Opening brace should be on a new line
          Open

              public function set_gitignore( $content ) {

          Space after opening parenthesis of function call prohibited
          Open

          $git = new Git_Wrapper( GIT_DIR );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->_resolve_merge_conflicts( $this->get_commit_message( $commit ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

          Space after opening parenthesis of function call prohibited
          Open

                  $response = array_map( function( $b ) { return str_replace( "origin/", "", $b ); }, $response );

          Expected 0 spaces after opening bracket; 1 found
          Open

                      if ( empty( $author_name ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $branch ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                          if ( ( '"' == $path[0] ) && ('"' == $path[strlen( $path ) - 1] ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $response ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

                          if ( ! isset( $new_response[ $file ] ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, $message )  = $this->_call( 'log', '-n', $n, '--pretty=format:%s' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  list( $return, ) = $this->_call( 'checkout', $branch );

          Space after opening parenthesis of function call prohibited
          Open

                  list( , $response ) = $this->_call( 'branch', '-r' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $response = array_map( 'trim', $response );

          Space after opening parenthesis of function call prohibited
          Open

                          $this->_call( 'cherry-pick', '--abort' );

          Space after opening parenthesis of function call prohibited
          Open

                          $work_tree_status = substr( $line, 1, 1 );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $path = substr( $line, 3 );

          Opening brace should be on a new line
          Open

              function local_status() {

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, ) = $this->_call( 'branch', '-m', 'initial' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $params = array_merge( array( 'add', '-n', '--all' ), $args );

          Space after opening parenthesis of function call prohibited
          Open

                          if ( empty( $line ) ) { continue; } // ignore empty lines like the last item

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $count = count( $response );

          Expected 0 spaces after opening bracket; 1 found
          Open

                          if ( '#' == $line[0] ) { continue; } // ignore branch status

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $this->_call( 'checkout', 'initial' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      list( $return, ) = $this->_call( 'push', '--porcelain', '-u', 'origin', 'HEAD' );

          Opening brace should be on a new line
          Open

              function add(...$args) {

          Space after opening parenthesis of function call prohibited
          Open

                          $index_status     = substr( $line, 0, 1 );

          Space after opening parenthesis of function call prohibited
          Open

                              $path = substr( $path, 1, strlen( $path ) - 2 );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $index_status     = substr( $line, 0, 1 );

          Expected 0 spaces before closing bracket; 2 found
          Open

                  list( $return, $response ) = $this->_call( 'status', '--porcelain'  );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 0 !== $return ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $author ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $work_tree_status = substr( $line, 1, 1 );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( preg_match( '/## ([^.]+)\.+([^ ]+)/', $branch_status, $matches ) ) {

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, $response ) = $this->_call( 'rev-parse', 'HEAD' );

          Space after opening parenthesis of function call prohibited
          Open

                      $branch_status = array_shift( $response );

          Space after opening parenthesis of function call prohibited
          Open

                              $path = substr( $path, 1, strlen( $path ) - 2 );

          Space after opening parenthesis of function call prohibited
          Open

                          if ( ( 'R' === $index_status ) && ( ! empty( $new_path[1] ) ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                              $old_path = trim( $new_path[0] );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( $behind_count ) {

          Newline required after opening brace
          Open

                  if ( 0 !== $return ) { return false; }

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $commit_info = explode( '|', $value );

          Space after opening parenthesis of function call prohibited
          Open

                      $response = explode( chr( 0 ), $response[0] );

          Closing brace must be on a line by itself
          Open

                  if ( 0 !== $return ) { return false; }

          Space after opening parenthesis of function call prohibited
          Open

                  file_put_contents( $this->repo_dir . '/.gitignore', $content );

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, $response ) = $this->_call( 'status', '-s', '-b', '-u' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          unset( $index_status, $work_tree_status, $path, $new_path, $old_path );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if ( empty( $line ) ) { continue; } // ignore empty lines like the last item

          Space after opening parenthesis of function call prohibited
          Open

                              $path     = trim( $new_path[1] );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $new_response[ $path ] = trim( $index_status . $work_tree_status . ' ' . $old_path );

          Space after opening parenthesis of function call prohibited
          Open

                      list( , $response ) = $this->_call( 'rev-list', "$local_branch..$remote_branch", '--count' );

          Space after opening parenthesis of function call prohibited
          Open

                      array_pop( $response );

          Space after opening parenthesis of function call prohibited
          Open

                  return ! empty( $changes );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( 0 !== $return ) { return false; }

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( ! empty( $response ) ) {

          Newline required after opening brace
          Open

                          if ( empty( $line ) ) { continue; } // ignore empty lines like the last item

          Closing brace must be on a line by itself
          Open

                          if ( empty( $line ) ) { continue; } // ignore empty lines like the last item

          Newline required after opening brace
          Open

                          if ( '#' == $line[0] ) { continue; } // ignore branch status

          Space after opening parenthesis of function call prohibited
          Open

                          $work_tree_status = substr( $line, 1, 1 );

          Space after opening parenthesis of function call prohibited
          Open

                      for ( $idx = 0 ; $idx < count( $response ) / 2 ; $idx++ ) {

          Opening brace should be on a new line
          Open

              function is_dirty() {

          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' );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  foreach ( $response as $index => $value ) {

          Opening brace should be on a new line
          Open

              function remove_wp_content_from_version_control() {

          Space after opening parenthesis of function call prohibited
          Open

              define( 'GIT_DIR', dirname( WP_CONTENT_DIR ) );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  if ( is_resource( $process ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

          if ( ! defined( 'GIT_DIR' ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

              define( 'GIT_DIR', dirname( WP_CONTENT_DIR ) );

          Space after opening parenthesis of function call prohibited
          Open

                  if ( is_resource( $process ) ) {

          Expected 0 spaces after opening bracket; 1 found
          Open

          if ( ! defined( 'GIT_DIR' ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      fclose( $pipes[0] );

          Space after opening parenthesis of function call prohibited
          Open

          if ( ! defined( 'GIT_DIR' ) ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if ( is_resource( $process ) ) {

          Space after opening parenthesis of function call prohibited
          Open

              define( 'GIT_DIR', dirname( WP_CONTENT_DIR ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      proc_close( $process );

          Expected 0 spaces before closing bracket; 1 found
          Open

          $git = new Git_Wrapper( GIT_DIR );

          Space after opening parenthesis of function call prohibited
          Open

                  list( $return, ) = $this->_call( 'rm', '--cached', $path );

          Opening brace should be on a new line
          Open

              function rm_cached( $path ) {

          Expected 0 spaces before closing bracket; 1 found
          Open

              define( 'GIT_DIR', dirname( WP_CONTENT_DIR ) );

          Space after opening parenthesis of function call prohibited
          Open

                      fclose( $pipes[0] );

          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();
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ) ) {
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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();
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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'." );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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();
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ) ) {
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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();
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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();
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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();
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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();
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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'." );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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'." );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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'." );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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'." );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ) ) {
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ) ) {
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ); }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ) {
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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();
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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; }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' ) ) ) );
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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() );
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' );
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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();
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ) );
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
                  }
          
          
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 );
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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;
              }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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 ) ) {
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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];
                  }
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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' ) ) ) {
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          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
          Severity: Minor
          Found in gitium/inc/class-git-wrapper.php by phpmd

          CamelCaseMethodName

          Since: 0.2

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

          Example

          class ClassName {
              public function get_name() {
              }
          }

          Source

          There are no issues that match your filters.

          Category
          Status