PressLabs/gitium

View on GitHub
gitium/functions.php

Summary

Maintainability
C
1 day
Test Coverage

Function _gitium_module_by_path has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

function _gitium_module_by_path( $path ) {
    $versions = gitium_get_versions();

    // default values
    $module   = array(
Severity: Minor
Found in gitium/functions.php - About 3 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

File functions.php has 294 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/*  Copyright 2014-2016 Presslabs SRL <ping@presslabs.com>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License, version 2, as
Severity: Minor
Found in gitium/functions.php - About 3 hrs to fix

    Method _gitium_module_by_path has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function _gitium_module_by_path( $path ) {
        $versions = gitium_get_versions();
    
        // default values
        $module   = array(
    Severity: Minor
    Found in gitium/functions.php - About 1 hr to fix

      Function _gitium_status has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      function _gitium_status( $update_transient = false ) {
          global $git;
      
          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
              return $changes;
      Severity: Minor
      Found in gitium/functions.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

      The function _gitium_module_by_path() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
      Open

      function _gitium_module_by_path( $path ) {
          $versions = gitium_get_versions();
      
          // default values
          $module   = array(
      Severity: Minor
      Found in gitium/functions.php by phpmd

      CyclomaticComplexity

      Since: 0.1

      Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

      Example

      // Cyclomatic Complexity = 11
      class Foo {
      1   public function example() {
      2       if ($a == $b) {
      3           if ($a1 == $b1) {
                      fiddle();
      4           } elseif ($a2 == $b2) {
                      fiddle();
                  } else {
                      fiddle();
                  }
      5       } elseif ($c == $d) {
      6           while ($c == $d) {
                      fiddle();
                  }
      7        } elseif ($e == $f) {
      8           for ($n = 0; $n < $h; $n++) {
                      fiddle();
                  }
              } else {
                  switch ($z) {
      9               case 1:
                          fiddle();
                          break;
      10              case 2:
                          fiddle();
                          break;
      11              case 3:
                          fiddle();
                          break;
                      default:
                          fiddle();
                          break;
                  }
              }
          }
      }

      Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

      The method _gitium_is_status_working has a boolean flag argument $update_transient, which is a certain sign of a Single Responsibility Principle violation.
      Open

      function _gitium_is_status_working( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.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 _gitium_get_remote_tracking_branch has a boolean flag argument $update_transient, which is a certain sign of a Single Responsibility Principle violation.
      Open

      function _gitium_get_remote_tracking_branch( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.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 _gitium_format_message has a boolean flag argument $version, which is a certain sign of a Single Responsibility Principle violation.
      Open

      function _gitium_format_message( $name, $version = false, $prefix = '' ) {
      Severity: Minor
      Found in gitium/functions.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 _gitium_status has a boolean flag argument $update_transient, which is a certain sign of a Single Responsibility Principle violation.
      Open

      function _gitium_status( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.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 gitium_get_webhook_key has a boolean flag argument $generate_new_webhook_key, which is a certain sign of a Single Responsibility Principle violation.
      Open

      function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
      Severity: Minor
      Found in gitium/functions.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 gitium_get_keypair has a boolean flag argument $generate_new_keypair, which is a certain sign of a Single Responsibility Principle violation.
      Open

      function gitium_get_keypair( $generate_new_keypair = false ) {
      Severity: Minor
      Found in gitium/functions.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

      Avoid assigning values to variables in if clauses and the like (line '289', column '44').
      Open

      function _gitium_get_remote_tracking_branch( $update_transient = false ) {
          if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
              return $remote_branch;
          } else {
              return gitium_update_remote_tracking_branch();
      Severity: Minor
      Found in gitium/functions.php by phpmd

      IfStatementAssignment

      Since: 2.7.0

      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($foo = 'bar') { // possible typo
                  // ...
              }
              if ($baz = 0) { // always false
                  // ...
              }
          }
      }

      Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

      The method _gitium_status uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

              } else {
                  delete_transient( 'gitium_remote_disconnected' );
              }
      Severity: Minor
      Found in gitium/functions.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 assigning values to variables in if clauses and the like (line '304', column '44').
      Open

      function _gitium_is_status_working( $update_transient = false ) {
          if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
              return $is_status_working;
          } else {
              return gitium_update_is_status_working();
      Severity: Minor
      Found in gitium/functions.php by phpmd

      IfStatementAssignment

      Since: 2.7.0

      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($foo = 'bar') { // possible typo
                  // ...
              }
              if ($baz = 0) { // always false
                  // ...
              }
          }
      }

      Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

      The method gitium_enable_maintenance_mode uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

              } else {
                  return true;
              }
      Severity: Minor
      Found in gitium/functions.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 _gitium_get_remote_tracking_branch uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
              return gitium_update_remote_tracking_branch();
          }
      Severity: Minor
      Found in gitium/functions.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 assigning values to variables in if clauses and the like (line '314', column '44').
      Open

      function _gitium_status( $update_transient = false ) {
          global $git;
      
          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
              return $changes;
      Severity: Minor
      Found in gitium/functions.php by phpmd

      IfStatementAssignment

      Since: 2.7.0

      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($foo = 'bar') { // possible typo
                  // ...
              }
              if ($baz = 0) { // always false
                  // ...
              }
          }
      }

      Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

      Avoid assigning values to variables in if clauses and the like (line '398', column '19').
      Open

      function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
          if ( $generate_new_webhook_key ) {
              $key = _gitium_generate_webhook_key();
              delete_option( 'gitium_webhook_key' );
              add_option( 'gitium_webhook_key', $key, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpmd

      IfStatementAssignment

      Since: 2.7.0

      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($foo = 'bar') { // possible typo
                  // ...
              }
              if ($baz = 0) { // always false
                  // ...
              }
          }
      }

      Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

      The method _gitium_status uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
              delete_transient( 'gitium_remote_disconnected' );
              $changes = array();
          }
      Severity: Minor
      Found in gitium/functions.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 gitium_check_after_event uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

              } else {
                  $name = $plugin;
              }
      Severity: Minor
      Found in gitium/functions.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 assigning values to variables in if clauses and the like (line '380', column '19').
      Open

      function gitium_get_keypair( $generate_new_keypair = false ) {
          if ( $generate_new_keypair ) {
              $keypair = _gitium_generate_keypair();
              delete_option( 'gitium_keypair' );
              add_option( 'gitium_keypair', $keypair, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpmd

      IfStatementAssignment

      Since: 2.7.0

      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($foo = 'bar') { // possible typo
                  // ...
              }
              if ($baz = 0) { // always false
                  // ...
              }
          }
      }

      Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

      The method _gitium_is_status_working uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
              return gitium_update_is_status_working();
          }
      Severity: Minor
      Found in gitium/functions.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 '$gitium_lock_path'.
      Open

              list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
      Severity: Minor
      Found in gitium/functions.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 excessively long variable names like $generate_new_webhook_key. Keep variable name length under 20.
      Open

      function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpmd

      LongVariable

      Since: 0.2

      Detects when a field, formal or local variable is declared with a long name.

      Example

      class Something {
          protected $reallyLongIntName = -3; // VIOLATION - Field
          public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
              $otherReallyLongName = -5; // VIOLATION - Local
              for ($interestingIntIndex = 0; // VIOLATION - For
                   $interestingIntIndex < 10;
                   $interestingIntIndex++ ) {
              }
          }
      }

      Source https://phpmd.org/rules/naming.html#longvariable

      A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 18 and the first side effect is on line 37.
      Open

      <?php
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      The parameter $update_transient is not named in camelCase.
      Open

      function _gitium_is_status_working( $update_transient = false ) {
          if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
              return $is_status_working;
          } else {
              return gitium_update_is_status_working();
      Severity: Minor
      Found in gitium/functions.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 $update_transient is not named in camelCase.
      Open

      function _gitium_get_remote_tracking_branch( $update_transient = false ) {
          if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
              return $remote_branch;
          } else {
              return gitium_update_remote_tracking_branch();
      Severity: Minor
      Found in gitium/functions.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 $msg_append is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 $generate_new_keypair is not named in camelCase.
      Open

      function gitium_get_keypair( $generate_new_keypair = false ) {
          if ( $generate_new_keypair ) {
              $keypair = _gitium_generate_keypair();
              delete_option( 'gitium_keypair' );
              add_option( 'gitium_keypair', $keypair, '', false );
      Severity: Minor
      Found in gitium/functions.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 $update_transient is not named in camelCase.
      Open

      function _gitium_status( $update_transient = false ) {
          global $git;
      
          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
              return $changes;
      Severity: Minor
      Found in gitium/functions.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 $generate_new_webhook_key is not named in camelCase.
      Open

      function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
          if ( $generate_new_webhook_key ) {
              $key = _gitium_generate_webhook_key();
              delete_option( 'gitium_webhook_key' );
              add_option( 'gitium_webhook_key', $key, '', false );
      Severity: Minor
      Found in gitium/functions.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

      Expected 0 spaces before closing bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_disable_maintenance_mode' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( $version ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_format_message( $name, $version = false, $prefix = '' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_commit_changes( $message, $dir = '.' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_module_by_path( $path ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_enable_maintenance_mode' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              if ( false === file_put_contents( $file, '<?php $upgrading = ' . time() .';' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_commit_changes( $message, $dir = '.' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              foreach ( $versions['themes'] as $theme => $data ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( empty( $versions ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space found after opening bracket of FOREACH loop
      Open

          foreach ( $uncommited_changes as $path => $action ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( 2 < count( $split_path ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_module_by_path( $path ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_error_log( $message ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_error_log( $message ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_format_message( $name, $version = false, $prefix = '' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                  } else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space found before closing bracket of FOREACH loop
      Open

          foreach ( $uncommited_changes as $path => $action ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( $prefix ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space found before closing bracket of FOREACH loop
      Open

              foreach ( $versions['themes'] as $theme => $data ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              foreach ( $versions['plugins'] as $plugin => $data ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                  if ( 0 === strpos( $path, "wp-content/themes/$theme" ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! empty( $msg_append ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ord( $buffer[0] ) & 0x80 ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          foreach ( $commit_groups as $base_path => $change ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( 'gitium/gitium.php' == $plugin ) { return; } // do not hook on activation of this plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              if ( isset( $versions['plugins'][ $plugin ] ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_status( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_get_keypair( $generate_new_keypair = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_merge_and_push( $commits ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_check_after_event( $plugin, $event = 'activation' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_status( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_is_status_working( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space found before closing bracket of FOREACH loop
      Open

          foreach ( $commit_groups as $base_path => $change ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              while ( ! flock( $gitium_lock_handle, LOCK_EX | LOCK_NB ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_get_keypair( $generate_new_keypair = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                      if ( "wp-content/plugins/$plugin" === $path ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              if ( $commit ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_commit_and_push_gitignore_file( $path = '' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( $git->is_dirty() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_is_status_working( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          foreach ( $uncommited_changes as $path => $action ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! $git->fetch_ref() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              if ( ! $git->fetch_ref() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( $git->is_status_working() && $git->get_remote_tracking_branch() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space found after opening bracket of FOREACH loop
      Open

              foreach ( $versions['plugins'] as $plugin => $data ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                  if ( '.' === dirname( $plugin ) ) { // single file plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space found after opening bracket of FOREACH loop
      Open

          foreach ( $commit_groups as $base_path => $change ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          function gitium_release_merge_lock( $lock ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_merge_and_push( $commits ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                  if ( $lock_retries * $lock_timeout_ms > $lock_timeout * 1000 ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_check_after_event( $plugin, $event = 'activation' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_ssh_encode_buffer( $buffer ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( $generate_new_keypair ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( false === ( $keypair = get_option( 'gitium_keypair', false ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( false === ( $key = get_option( 'gitium_webhook_key', false ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_release_merge_lock' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space found after opening bracket of FOREACH loop
      Open

              foreach ( $versions['themes'] as $theme => $data ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space found before closing bracket of FOREACH loop
      Open

              foreach ( $versions['plugins'] as $plugin => $data ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          function gitium_release_merge_lock( $lock ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_get_remote_tracking_branch( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_ssh_encode_buffer( $buffer ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( $generate_new_webhook_key ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function gitium_commit_and_push_gitignore_file( $path = '' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_acquire_merge_lock' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

      function _gitium_get_remote_tracking_branch( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( false === $git_version ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( false === $git_version ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              if ( false === file_put_contents( $file, '<?php $upgrading = ' . time() .';' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          list( , $git_private_key ) = gitium_get_keypair();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              'name'      => basename( $path ),
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $git->set_key( $git_private_key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              'base_path' => $path,
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              'type'      => 'file',
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $current_user = wp_get_current_user();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $commit_message .= " version $version";
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $file = ABSPATH . '/.maintenance';
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $versions = get_transient( 'gitium_versions' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Inline control structures are not allowed
      Open

          if (!$git_private_key)
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $commit_message = "`$name`";
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( 2 < count( $split_path ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( empty( $versions ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          global $git;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $git->commit( $message, $current_user->display_name, $current_user->user_email );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          // default values
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          // find the base_path
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if (!$git_private_key)
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $versions = gitium_get_versions();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          function gitium_enable_maintenance_mode() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( $prefix ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              foreach ( $versions['themes'] as $theme => $data ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              foreach ( $versions['plugins'] as $plugin => $data ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                      break;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $msg_append = "($msg_append)";
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  $commits[] = $commit;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return unlink( ABSPATH . '/.maintenance' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $commit_message = "$prefix $commit_message";
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $commits;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  return true;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          function gitium_disable_maintenance_mode() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( $version ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                      $module['name']    = $data['name'];
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $change['action'] = $action;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $versions = gitium_update_versions();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          // find other data for theme
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                      $module['version'] = $data['version'];
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                          break;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $module;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $uncommited_changes = $git->get_local_changes();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          global $git;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $versions;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return false;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          gitium_update_versions();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                          $module['name']      = $data['name'];
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $change = _gitium_module_by_path( $path );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          gitium_merge_and_push( $commit );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          error_log( "gitium_error_log: $message" );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              'version'   => null,
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $commits = array();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              if ( $commit ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              } else {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $git->add( $dir );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $commit_message;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $module   = array(
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                      if ( "wp-content/plugins/$plugin" === $path ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                          $module['version']   = $data['version'];
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          global $git;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( ! empty( $msg_append ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $commit_message = _gitium_format_message( $change['name'], $change['version'], "{$change['action']} {$change['type']}" );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $git->add( '.gitignore' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $commit = $git->commit( 'Update the `.gitignore` file', $current_user->display_name, $current_user->user_email );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          function gitium_acquire_merge_lock() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  return false;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $split_path = explode( '/', $path );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $module['base_path'] = "{$split_path[0]}/{$split_path[1]}/{$split_path[2]}";
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                      $module['name']    = $data['name'];
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          foreach ( $uncommited_changes as $path => $action ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return file_exists( WP_CONTENT_DIR . '/.git' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  usleep( $lock_timeout_ms * 1000 );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          global $git;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $versions = gitium_update_versions();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  $name = $plugin;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              if ( isset( $versions['plugins'][ $plugin ] ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  $version = $versions['plugins'][ $plugin ]['version'];
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          global $git;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                      break;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          // find other data for plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          foreach ( $commit_groups as $base_path => $change ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $lock_retries    = 0;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  $lock_retries++;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              gitium_error_log( __FUNCTION__ );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              or trigger_error( 'Timeout when gitium lock was acquired', E_USER_WARNING );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $remote_branch = $git->get_remote_tracking_branch();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          set_transient( 'gitium_remote_tracking_branch', $remote_branch );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          set_transient( 'gitium_is_status_working', $is_status_working );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              if ( ! $git->fetch_ref() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $private_key = openssl_pkey_get_private( $rsa_key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $key_info   = openssl_pkey_get_details( $rsa_key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( $generate_new_keypair ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $key = _gitium_generate_webhook_key();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return $remote_branch;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return false;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $buffer     = pack( 'N', 7 ) . 'ssh-rsa' .
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              add_option( 'gitium_keypair', $keypair, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( $generate_new_webhook_key ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return array( $gitium_lock_path, $gitium_lock_handle );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( 'gitium/gitium.php' == $plugin ) { return; } // do not hook on activation of this plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( $git->is_dirty() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              } else {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return $is_status_working;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return gitium_update_is_status_working();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( false === $git_version ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $public_key = 'ssh-rsa ' . base64_encode( $buffer ) . ' gitium@' . parse_url( get_home_url(), PHP_URL_HOST );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( false === ( $key = get_option( 'gitium_webhook_key', false ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              fclose( $gitium_lock_handle );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          global $git;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( ! $git->fetch_ref() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( ord( $buffer[0] ) & 0x80 ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              if (!$try)
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $module['type'] = 'plugin';
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                      }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return $changes;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $git_version = get_transient( 'gitium_git_version' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  set_transient( 'gitium_remote_disconnected', $git->get_last_error() );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $keypair = _gitium_generate_keypair();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  if ( 0 === strpos( $path, "wp-content/themes/$theme" ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Line exceeds 120 characters; contains 129 characters
      Open

              $commit_message = _gitium_format_message( $change['name'], $change['version'], "{$change['action']} {$change['type']}" );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $current_user = wp_get_current_user();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $changes = array();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $changes;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              )
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return false;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  delete_transient( 'gitium_remote_disconnected' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $try = openssl_pkey_export( $private_key, $pem ); //Private Key
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  } else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          gitium_release_merge_lock( $lock );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          global $git;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $changes = $git->status();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              delete_transient( 'gitium_remote_disconnected' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  return false;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              add_option( 'gitium_keypair', $keypair, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return $key;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $lock = gitium_acquire_merge_lock()
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $remote_branch;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              array(
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Inline control structures are not allowed
      Open

              if (!$try)
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              delete_option( 'gitium_keypair' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $keypair;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $key;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $lock_timeout_ms = 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $merge_status = $git->merge_with_accept_mine( $commits );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              gitium_error_log( __FUNCTION__ );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              flock( $gitium_lock_handle, LOCK_UN );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  $name    = $versions['plugins'][ $plugin ]['name'];
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              gitium_auto_push( _gitium_format_message( $name, $version, "after $event of" ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( $git->is_status_working() && $git->get_remote_tracking_branch() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return pack( 'Na*', $len, $buffer );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $is_status_working = $git->is_status_working();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $is_status_working;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              delete_option( 'gitium_webhook_key' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              add_option( 'gitium_webhook_key', $key, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          } else {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              set_transient( 'gitium_git_version', $git->get_version() );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $len = strlen( $buffer );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $len++;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $rsa_key = openssl_pkey_new(
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $url = add_query_arg( 'key', $key, plugins_url( 'gitium-webhook.php', __FILE__ ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          } else {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( false === ( $keypair = get_option( 'gitium_keypair', false ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              add_option( 'gitium_webhook_key', $key, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                      return false; // timeout
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          function gitium_release_merge_lock( $lock ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return $git->push() && $merge_status;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          } else {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          set_transient( 'gitium_uncommited_changes', $changes, 12 * 60 * 60 ); // cache changes for half-a-day
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          try {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Line exceeds 120 characters; contains 121 characters
      Open

          return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $module['type'] = 'theme';
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  if ( '.' === dirname( $plugin ) ) { // single file plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                          $module['base_path'] = $path;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  if ( $lock_retries * $lock_timeout_ms > $lock_timeout * 1000 ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              return gitium_update_remote_tracking_branch();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                          _gitium_ssh_encode_buffer( $key_info['rsa']['e'] ) .
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                          _gitium_ssh_encode_buffer( $key_info['rsa']['n'] );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return array( $public_key, $pem );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                      $module['version'] = $data['version'];
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $commit_groups[ $change['base_path'] ] = $change;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $commit = _gitium_commit_changes( "$commit_message $msg_append", $base_path, false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Line exceeds 120 characters; contains 127 characters
      Open

              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              while ( ! flock( $gitium_lock_handle, LOCK_EX | LOCK_NB ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          global $git;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              } else {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $buffer = "\x00" . $buffer;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

                  'private_key_bits' => 2048,
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          } catch (Exception $e) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $keypair = _gitium_generate_keypair();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              $key = _gitium_generate_webhook_key();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $key = gitium_get_webhook_key();
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          return apply_filters( 'gitium_webhook_url', $url, $key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          $git_version = get_transient( 'gitium_git_version' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          global $git;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

              set_transient( 'gitium_git_version', $git->get_version() );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

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

          if ( false === $git_version ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Closing brace must be on a line by itself
      Open

          if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( empty( $versions ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $split_path = explode( '/', $path );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Newline required after opening brace
      Open

          if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

              if ( false === file_put_contents( $file, '<?php $upgrading = ' . time() .';' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

          function gitium_disable_maintenance_mode() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $versions = get_transient( 'gitium_versions' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              'name'      => basename( $path ),
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $versions = get_transient( 'gitium_versions' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( empty( $versions ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $git->add( $dir );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          return $git->commit( $message, $current_user->display_name, $current_user->user_email );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( $version ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( $prefix ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $git->set_key( $git_private_key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $git->add( $dir );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( empty( $versions ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              return unlink( ABSPATH . '/.maintenance' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function _gitium_module_by_path( $path ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $git->set_key( $git_private_key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( 2 < count( $split_path ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( 2 < count( $split_path ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_enable_maintenance_mode' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              if ( false === file_put_contents( $file, '<?php $upgrading = ' . time() .';' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_disable_maintenance_mode' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

      if ( ! function_exists( 'gitium_disable_maintenance_mode' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $git->add( '.gitignore' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_enable_maintenance_mode' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_disable_maintenance_mode' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function _gitium_commit_changes( $message, $dir = '.' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

                  if ( '.' === dirname( $plugin ) ) { // single file plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $git->add( '.gitignore' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $commit = $git->commit( 'Update the `.gitignore` file', $current_user->display_name, $current_user->user_email );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_error_log( $message ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { return; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          return file_exists( WP_CONTENT_DIR . '/.git' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              'name'      => basename( $path ),
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                  if ( 0 === strpos( $path, "wp-content/themes/$theme" ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $commit_message = _gitium_format_message( $change['name'], $change['version'], "{$change['action']} {$change['type']}" );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          return file_exists( WP_CONTENT_DIR . '/.git' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

          function gitium_enable_maintenance_mode() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          return $git->commit( $message, $current_user->display_name, $current_user->user_email );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $split_path = explode( '/', $path );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          gitium_merge_and_push( $commit );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

          function gitium_acquire_merge_lock() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          error_log( "gitium_error_log: $message" );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          error_log( "gitium_error_log: $message" );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function wp_content_is_versioned() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              return unlink( ABSPATH . '/.maintenance' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                  if ( '.' === dirname( $plugin ) ) { // single file plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Closing brace must be on a line by itself
      Open

          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

      if ( ! function_exists( 'gitium_acquire_merge_lock' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function _gitium_format_message( $name, $version = false, $prefix = '' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( array_key_exists( 'themes', $versions ) && 0 === strpos( $path, 'wp-content/themes/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_acquire_merge_lock' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

                  if ( 0 === strpos( $path, "wp-content/themes/$theme" ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( ! empty( $msg_append ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( ! empty( $msg_append ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          foreach ( $commit_groups as $base_path => $change ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

      if ( ! function_exists( 'gitium_enable_maintenance_mode' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              if ( false === file_put_contents( $file, '<?php $upgrading = ' . time() .';' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_get_versions() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( 2 < count( $split_path ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                  } else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $commit = _gitium_commit_changes( "$commit_message $msg_append", $base_path, false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_acquire_merge_lock' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              gitium_error_log( __FUNCTION__ );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              or trigger_error( 'Timeout when gitium lock was acquired', E_USER_WARNING );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Newline required after opening brace
      Open

          if ( 'gitium/gitium.php' == $plugin ) { return; } // do not hook on activation of this plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( false === $git_version ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

                  if ( $lock_retries * $lock_timeout_ms > $lock_timeout * 1000 ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_release_merge_lock' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

              if ( isset( $versions['plugins'][ $plugin ] ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              set_transient( 'gitium_git_version', $git->get_version() );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $try = openssl_pkey_export( $private_key, $pem ); //Private Key
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_get_keypair( $generate_new_keypair = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( false === ( $key = get_option( 'gitium_webhook_key', false ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_commit_and_push_gitignore_file( $path = '' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              gitium_error_log( __FUNCTION__ );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              or trigger_error( 'Timeout when gitium lock was acquired', E_USER_WARNING );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $merge_status = $git->merge_with_accept_mine( $commits );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $url = add_query_arg( 'key', $key, plugins_url( 'gitium-webhook.php', __FILE__ ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

                  delete_transient( 'gitium_remote_disconnected' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              delete_transient( 'gitium_remote_disconnected' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function _gitium_generate_keypair() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              delete_option( 'gitium_keypair' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              add_option( 'gitium_keypair', $keypair, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_get_webhook() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $url = add_query_arg( 'key', $key, plugins_url( 'gitium-webhook.php', __FILE__ ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              gitium_error_log( __FUNCTION__ );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          gitium_release_merge_lock( $lock );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              gitium_auto_push( _gitium_format_message( $name, $version, "after $event of" ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          set_transient( 'gitium_remote_tracking_branch', $remote_branch );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                  delete_transient( 'gitium_remote_disconnected' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

                  if ( 0 === strpos( $path, "wp-content/themes/$theme" ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                          _gitium_ssh_encode_buffer( $key_info['rsa']['e'] ) .
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

                  } else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              add_option( 'gitium_keypair', $keypair, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              add_option( 'gitium_webhook_key', $key, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $commit = $git->commit( 'Update the `.gitignore` file', $current_user->display_name, $current_user->user_email );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Newline required after opening brace
      Open

          if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              while ( ! flock( $gitium_lock_handle, LOCK_EX | LOCK_NB ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

                  usleep( $lock_timeout_ms * 1000 );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              if ( isset( $versions['plugins'][ $plugin ] ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              gitium_auto_push( _gitium_format_message( $name, $version, "after $event of" ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              set_transient( 'gitium_git_version', $git->get_version() );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( $git->is_status_working() && $git->get_remote_tracking_branch() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $len = strlen( $buffer );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $private_key = openssl_pkey_get_private( $rsa_key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

                          _gitium_ssh_encode_buffer( $key_info['rsa']['e'] ) .
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

                          _gitium_ssh_encode_buffer( $key_info['rsa']['n'] );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

              foreach ( $versions['themes'] as $theme => $data ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $change = _gitium_module_by_path( $path );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $change = _gitium_module_by_path( $path );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

      if ( ! function_exists( 'gitium_release_merge_lock' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              gitium_error_log( __FUNCTION__ );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_check_after_event( $plugin, $event = 'activation' ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          return pack( 'Na*', $len, $buffer );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $buffer     = pack( 'N', 7 ) . 'ssh-rsa' .
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function _gitium_generate_webhook_key() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $merge_status = $git->merge_with_accept_mine( $commits );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Closing brace must be on a line by itself
      Open

          if ( 'gitium/gitium.php' == $plugin ) { return; } // do not hook on activation of this plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              if ( isset( $versions['plugins'][ $plugin ] ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              gitium_auto_push( _gitium_format_message( $name, $version, "after $event of" ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function _gitium_get_remote_tracking_branch( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

                  set_transient( 'gitium_remote_disconnected', $git->get_last_error() );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( ord( $buffer[0] ) & 0x80 ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $key_info   = openssl_pkey_get_details( $rsa_key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              add_option( 'gitium_webhook_key', $key, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Closing brace must be on a line by itself
      Open

          if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

                  if ( '.' === dirname( $plugin ) ) { // single file plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

                      if ( "wp-content/plugins/$plugin" === $path ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

                  } else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

              if ( $commit ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              flock( $gitium_lock_handle, LOCK_UN );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              gitium_auto_push( _gitium_format_message( $name, $version, "after $event of" ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          set_transient( 'gitium_is_status_working', $is_status_working );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

              if ( ! $git->fetch_ref() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $len = strlen( $buffer );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $public_key = 'ssh-rsa ' . base64_encode( $buffer ) . ' gitium@' . parse_url( get_home_url(), PHP_URL_HOST );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( false === ( $keypair = get_option( 'gitium_keypair', false ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_merge_and_push( $commits ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( ! $git->fetch_ref() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $git_version = get_transient( 'gitium_git_version' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              delete_transient( 'gitium_remote_disconnected' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          set_transient( 'gitium_uncommited_changes', $changes, 12 * 60 * 60 ); // cache changes for half-a-day
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          set_transient( 'gitium_uncommited_changes', $changes, 12 * 60 * 60 ); // cache changes for half-a-day
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ord( $buffer[0] ) & 0x80 ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $private_key = openssl_pkey_get_private( $rsa_key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $buffer     = pack( 'N', 7 ) . 'ssh-rsa' .
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                          _gitium_ssh_encode_buffer( $key_info['rsa']['n'] );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( $generate_new_keypair ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              delete_option( 'gitium_webhook_key' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              add_option( 'gitium_webhook_key', $key, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! empty( $msg_append ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              $commit_message = _gitium_format_message( $change['name'], $change['version'], "{$change['action']} {$change['type']}" );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Newline required after opening brace
      Open

          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              flock( $gitium_lock_handle, LOCK_UN );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          gitium_merge_and_push( $commit );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              fclose( $gitium_lock_handle );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

              while ( ! flock( $gitium_lock_handle, LOCK_EX | LOCK_NB ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_update_is_status_working() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          set_transient( 'gitium_is_status_working', $is_status_working );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_update_remote_tracking_branch() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $try = openssl_pkey_export( $private_key, $pem ); //Private Key
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              add_option( 'gitium_webhook_key', $key, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function _gitium_status( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( false === ( $key = get_option( 'gitium_webhook_key', false ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                  set_transient( 'gitium_remote_disconnected', $git->get_last_error() );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $public_key = 'ssh-rsa ' . base64_encode( $buffer ) . ' gitium@' . parse_url( get_home_url(), PHP_URL_HOST );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( false === ( $keypair = get_option( 'gitium_keypair', false ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              delete_option( 'gitium_webhook_key' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( defined( 'GIT_WEBHOOK_URL' ) && GIT_WEBHOOK_URL ) { return GIT_WEBHOOK_URL; }
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function _gitium_ssh_encode_buffer( $buffer ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          return pack( 'Na*', $len, $buffer );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $public_key = 'ssh-rsa ' . base64_encode( $buffer ) . ' gitium@' . parse_url( get_home_url(), PHP_URL_HOST );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $public_key = 'ssh-rsa ' . base64_encode( $buffer ) . ' gitium@' . parse_url( get_home_url(), PHP_URL_HOST );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              add_option( 'gitium_keypair', $keypair, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( false === ( $key = get_option( 'gitium_webhook_key', false ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              fclose( $gitium_lock_handle );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $git_version = get_transient( 'gitium_git_version' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          if ( ord( $buffer[0] ) & 0x80 ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $key_info   = openssl_pkey_get_details( $rsa_key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          return md5( str_shuffle( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.()[]{}-_=+!@#%^&*~<>:;' ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( $generate_new_webhook_key ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $url = add_query_arg( 'key', $key, plugins_url( 'gitium-webhook.php', __FILE__ ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

              foreach ( $versions['plugins'] as $plugin => $data ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          foreach ( $uncommited_changes as $path => $action ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              $commit = _gitium_commit_changes( "$commit_message $msg_append", $base_path, false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              while ( ! flock( $gitium_lock_handle, LOCK_EX | LOCK_NB ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

          function gitium_release_merge_lock( $lock ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( 'gitium/gitium.php' == $plugin ) { return; } // do not hook on activation of this plugin
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          set_transient( 'gitium_remote_tracking_branch', $remote_branch );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function _gitium_is_status_working( $update_transient = false ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              add_option( 'gitium_keypair', $keypair, '', false );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( false === ( $keypair = get_option( 'gitium_keypair', false ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          if ( array_key_exists( 'plugins', $versions ) && 0 === strpos( $path, 'wp-content/plugins/' ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Usage of ELSE IF is discouraged; use ELSEIF instead
      Open

                  } else if ( 'wp-content/plugins/' . dirname( $plugin ) === $module['base_path'] ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

                  usleep( $lock_timeout_ms * 1000 );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

      if ( ! function_exists( 'gitium_release_merge_lock' ) ) :
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          gitium_release_merge_lock( $lock );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( $git->is_dirty() ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              delete_option( 'gitium_keypair' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $url = add_query_arg( 'key', $key, plugins_url( 'gitium-webhook.php', __FILE__ ) );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

      add_action( 'admin_init', 'gitium_admin_init' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          return apply_filters( 'gitium_webhook_url', $url, $key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          $git_version = get_transient( 'gitium_git_version' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

              set_transient( 'gitium_git_version', $git->get_version() );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

          return apply_filters( 'gitium_webhook_url', $url, $key );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

          if ( false === $git_version ) {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

          $git_version = get_transient( 'gitium_git_version' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

              set_transient( 'gitium_git_version', $git->get_version() );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function gitium_admin_init() {
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      Space after opening parenthesis of function call prohibited
      Open

      add_action( 'admin_init', 'gitium_admin_init' );
      Severity: Minor
      Found in gitium/functions.php by phpcodesniffer

      The variable $git_private_key is not named in camelCase.
      Open

      function _gitium_commit_changes( $message, $dir = '.' ) {
          global $git;
      
          list( , $git_private_key ) = gitium_get_keypair();
          if (!$git_private_key)
      Severity: Minor
      Found in gitium/functions.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_message is not named in camelCase.
      Open

      function _gitium_format_message( $name, $version = false, $prefix = '' ) {
          $commit_message = "`$name`";
          if ( $version ) {
              $commit_message .= " version $version";
          }
      Severity: Minor
      Found in gitium/functions.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 $gitium_lock_handle is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $gitium_lock_handle is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $current_user is not named in camelCase.
      Open

      function _gitium_commit_changes( $message, $dir = '.' ) {
          global $git;
      
          list( , $git_private_key ) = gitium_get_keypair();
          if (!$git_private_key)
      Severity: Minor
      Found in gitium/functions.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_message is not named in camelCase.
      Open

      function _gitium_format_message( $name, $version = false, $prefix = '' ) {
          $commit_message = "`$name`";
          if ( $version ) {
              $commit_message .= " version $version";
          }
      Severity: Minor
      Found in gitium/functions.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 $uncommited_changes is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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_groups is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 $gitium_lock_handle is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $lock_timeout_ms is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $lock_retries is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $gitium_lock_handle is not named in camelCase.
      Open

          function gitium_release_merge_lock( $lock ) {
              list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
              gitium_error_log( __FUNCTION__ );
              flock( $gitium_lock_handle, LOCK_UN );
              fclose( $gitium_lock_handle );
      Severity: Minor
      Found in gitium/functions.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 $gitium_lock_handle is not named in camelCase.
      Open

          function gitium_release_merge_lock( $lock ) {
              list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
              gitium_error_log( __FUNCTION__ );
              flock( $gitium_lock_handle, LOCK_UN );
              fclose( $gitium_lock_handle );
      Severity: Minor
      Found in gitium/functions.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_message is not named in camelCase.
      Open

      function _gitium_format_message( $name, $version = false, $prefix = '' ) {
          $commit_message = "`$name`";
          if ( $version ) {
              $commit_message .= " version $version";
          }
      Severity: Minor
      Found in gitium/functions.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 gitium_update_remote_tracking_branch() {
          global $git;
          $remote_branch = $git->get_remote_tracking_branch();
          set_transient( 'gitium_remote_tracking_branch', $remote_branch );
      
      
      Severity: Minor
      Found in gitium/functions.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 $is_status_working is not named in camelCase.
      Open

      function _gitium_is_status_working( $update_transient = false ) {
          if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
              return $is_status_working;
          } else {
              return gitium_update_is_status_working();
      Severity: Minor
      Found in gitium/functions.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 $msg_append is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 $gitium_lock_path is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $lock_retries is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $lock_timeout is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $gitium_lock_handle is not named in camelCase.
      Open

          function gitium_release_merge_lock( $lock ) {
              list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
              gitium_error_log( __FUNCTION__ );
              flock( $gitium_lock_handle, LOCK_UN );
              fclose( $gitium_lock_handle );
      Severity: Minor
      Found in gitium/functions.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 $split_path is not named in camelCase.
      Open

      function _gitium_module_by_path( $path ) {
          $versions = gitium_get_versions();
      
          // default values
          $module   = array(
      Severity: Minor
      Found in gitium/functions.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 $msg_append is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 $msg_append is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 _gitium_get_remote_tracking_branch( $update_transient = false ) {
          if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
              return $remote_branch;
          } else {
              return gitium_update_remote_tracking_branch();
      Severity: Minor
      Found in gitium/functions.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_private_key is not named in camelCase.
      Open

      function _gitium_commit_changes( $message, $dir = '.' ) {
          global $git;
      
          list( , $git_private_key ) = gitium_get_keypair();
          if (!$git_private_key)
      Severity: Minor
      Found in gitium/functions.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_message is not named in camelCase.
      Open

      function _gitium_format_message( $name, $version = false, $prefix = '' ) {
          $commit_message = "`$name`";
          if ( $version ) {
              $commit_message .= " version $version";
          }
      Severity: Minor
      Found in gitium/functions.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_groups is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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_message is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 _gitium_get_remote_tracking_branch( $update_transient = false ) {
          if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
              return $remote_branch;
          } else {
              return gitium_update_remote_tracking_branch();
      Severity: Minor
      Found in gitium/functions.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 $current_user is not named in camelCase.
      Open

      function _gitium_commit_changes( $message, $dir = '.' ) {
          global $git;
      
          list( , $git_private_key ) = gitium_get_keypair();
          if (!$git_private_key)
      Severity: Minor
      Found in gitium/functions.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 $current_user is not named in camelCase.
      Open

      function gitium_commit_and_push_gitignore_file( $path = '' ) {
          global $git;
      
          $current_user = wp_get_current_user();
          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.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 gitium_update_remote_tracking_branch() {
          global $git;
          $remote_branch = $git->get_remote_tracking_branch();
          set_transient( 'gitium_remote_tracking_branch', $remote_branch );
      
      
      Severity: Minor
      Found in gitium/functions.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 $rsa_key is not named in camelCase.
      Open

      function _gitium_generate_keypair() {
          $rsa_key = openssl_pkey_new(
              array(
                  'private_key_bits' => 2048,
                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.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_info is not named in camelCase.
      Open

      function _gitium_generate_keypair() {
          $rsa_key = openssl_pkey_new(
              array(
                  'private_key_bits' => 2048,
                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.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 $uncommited_changes is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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_message is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 $gitium_lock_path is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $gitium_lock_path is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 gitium_update_remote_tracking_branch() {
          global $git;
          $remote_branch = $git->get_remote_tracking_branch();
          set_transient( 'gitium_remote_tracking_branch', $remote_branch );
      
      
      Severity: Minor
      Found in gitium/functions.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 $is_status_working is not named in camelCase.
      Open

      function gitium_update_is_status_working() {
          global $git;
          $is_status_working = $git->is_status_working();
          set_transient( 'gitium_is_status_working', $is_status_working );
          return $is_status_working;
      Severity: Minor
      Found in gitium/functions.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_version is not named in camelCase.
      Open

      function gitium_admin_init() {
          global $git;
      
          $git_version = get_transient( 'gitium_git_version' );
          if ( false === $git_version ) {
      Severity: Minor
      Found in gitium/functions.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_groups is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 $msg_append is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 $base_path is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 $current_user is not named in camelCase.
      Open

      function gitium_commit_and_push_gitignore_file( $path = '' ) {
          global $git;
      
          $current_user = wp_get_current_user();
          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.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 $lock_timeout_ms is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $merge_status is not named in camelCase.
      Open

      function gitium_merge_and_push( $commits ) {
          global $git;
      
          $lock = gitium_acquire_merge_lock()
              or trigger_error( 'Timeout when gitium lock was acquired', E_USER_WARNING );
      Severity: Minor
      Found in gitium/functions.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 $update_transient is not named in camelCase.
      Open

      function _gitium_is_status_working( $update_transient = false ) {
          if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
              return $is_status_working;
          } else {
              return gitium_update_is_status_working();
      Severity: Minor
      Found in gitium/functions.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 $is_status_working is not named in camelCase.
      Open

      function _gitium_is_status_working( $update_transient = false ) {
          if ( ! $update_transient && ( false !== ( $is_status_working = get_transient( 'gitium_is_status_working' ) ) ) ) {
              return $is_status_working;
          } else {
              return gitium_update_is_status_working();
      Severity: Minor
      Found in gitium/functions.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 _gitium_generate_keypair() {
          $rsa_key = openssl_pkey_new(
              array(
                  'private_key_bits' => 2048,
                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.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 $rsa_key is not named in camelCase.
      Open

      function _gitium_generate_keypair() {
          $rsa_key = openssl_pkey_new(
              array(
                  'private_key_bits' => 2048,
                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.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 $lock_retries is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $merge_status is not named in camelCase.
      Open

      function gitium_merge_and_push( $commits ) {
          global $git;
      
          $lock = gitium_acquire_merge_lock()
              or trigger_error( 'Timeout when gitium lock was acquired', E_USER_WARNING );
      Severity: Minor
      Found in gitium/functions.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 $is_status_working is not named in camelCase.
      Open

      function gitium_update_is_status_working() {
          global $git;
          $is_status_working = $git->is_status_working();
          set_transient( 'gitium_is_status_working', $is_status_working );
          return $is_status_working;
      Severity: Minor
      Found in gitium/functions.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_info is not named in camelCase.
      Open

      function _gitium_generate_keypair() {
          $rsa_key = openssl_pkey_new(
              array(
                  'private_key_bits' => 2048,
                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.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 $generate_new_webhook_key is not named in camelCase.
      Open

      function gitium_get_webhook_key( $generate_new_webhook_key = false ) {
          if ( $generate_new_webhook_key ) {
              $key = _gitium_generate_webhook_key();
              delete_option( 'gitium_webhook_key' );
              add_option( 'gitium_webhook_key', $key, '', false );
      Severity: Minor
      Found in gitium/functions.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 $split_path is not named in camelCase.
      Open

      function _gitium_module_by_path( $path ) {
          $versions = gitium_get_versions();
      
          // default values
          $module   = array(
      Severity: Minor
      Found in gitium/functions.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 $split_path is not named in camelCase.
      Open

      function _gitium_module_by_path( $path ) {
          $versions = gitium_get_versions();
      
          // default values
          $module   = array(
      Severity: Minor
      Found in gitium/functions.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 $lock_timeout_ms is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $gitium_lock_path is not named in camelCase.
      Open

          function gitium_release_merge_lock( $lock ) {
              list( $gitium_lock_path, $gitium_lock_handle ) = $lock;
              gitium_error_log( __FUNCTION__ );
              flock( $gitium_lock_handle, LOCK_UN );
              fclose( $gitium_lock_handle );
      Severity: Minor
      Found in gitium/functions.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_private_key is not named in camelCase.
      Open

      function _gitium_commit_changes( $message, $dir = '.' ) {
          global $git;
      
          list( , $git_private_key ) = gitium_get_keypair();
          if (!$git_private_key)
      Severity: Minor
      Found in gitium/functions.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 $update_transient is not named in camelCase.
      Open

      function _gitium_get_remote_tracking_branch( $update_transient = false ) {
          if ( ! $update_transient && ( false !== ( $remote_branch = get_transient( 'gitium_remote_tracking_branch' ) ) ) ) {
              return $remote_branch;
          } else {
              return gitium_update_remote_tracking_branch();
      Severity: Minor
      Found in gitium/functions.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 $current_user is not named in camelCase.
      Open

      function _gitium_commit_changes( $message, $dir = '.' ) {
          global $git;
      
          list( , $git_private_key ) = gitium_get_keypair();
          if (!$git_private_key)
      Severity: Minor
      Found in gitium/functions.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_message is not named in camelCase.
      Open

      function _gitium_format_message( $name, $version = false, $prefix = '' ) {
          $commit_message = "`$name`";
          if ( $version ) {
              $commit_message .= " version $version";
          }
      Severity: Minor
      Found in gitium/functions.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 $split_path is not named in camelCase.
      Open

      function _gitium_module_by_path( $path ) {
          $versions = gitium_get_versions();
      
          // default values
          $module   = array(
      Severity: Minor
      Found in gitium/functions.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 $split_path is not named in camelCase.
      Open

      function _gitium_module_by_path( $path ) {
          $versions = gitium_get_versions();
      
          // default values
          $module   = array(
      Severity: Minor
      Found in gitium/functions.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 $base_path is not named in camelCase.
      Open

      function gitium_group_commit_modified_plugins_and_themes( $msg_append = '' ) {
          global $git;
      
          $uncommited_changes = $git->get_local_changes();
          $commit_groups = array();
      Severity: Minor
      Found in gitium/functions.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 $current_user is not named in camelCase.
      Open

      function gitium_commit_and_push_gitignore_file( $path = '' ) {
          global $git;
      
          $current_user = wp_get_current_user();
          if ( ! empty( $path ) ) { $git->rm_cached( $path ); }
      Severity: Minor
      Found in gitium/functions.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 $lock_timeout is not named in camelCase.
      Open

          function gitium_acquire_merge_lock() {
              $gitium_lock_path   = apply_filters( 'gitium_lock_path', sys_get_temp_dir().'/.gitium-lock' );
              $gitium_lock_handle = fopen( $gitium_lock_path, 'w+' );
      
              $lock_timeout    = intval( ini_get( 'max_execution_time' ) ) > 10 ? intval( ini_get( 'max_execution_time' ) ) - 5 : 10;
      Severity: Minor
      Found in gitium/functions.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 $is_status_working is not named in camelCase.
      Open

      function gitium_update_is_status_working() {
          global $git;
          $is_status_working = $git->is_status_working();
          set_transient( 'gitium_is_status_working', $is_status_working );
          return $is_status_working;
      Severity: Minor
      Found in gitium/functions.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_info is not named in camelCase.
      Open

      function _gitium_generate_keypair() {
          $rsa_key = openssl_pkey_new(
              array(
                  'private_key_bits' => 2048,
                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.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_version is not named in camelCase.
      Open

      function gitium_admin_init() {
          global $git;
      
          $git_version = get_transient( 'gitium_git_version' );
          if ( false === $git_version ) {
      Severity: Minor
      Found in gitium/functions.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 _gitium_generate_keypair() {
          $rsa_key = openssl_pkey_new(
              array(
                  'private_key_bits' => 2048,
                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.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 $rsa_key is not named in camelCase.
      Open

      function _gitium_generate_keypair() {
          $rsa_key = openssl_pkey_new(
              array(
                  'private_key_bits' => 2048,
                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.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 $update_transient is not named in camelCase.
      Open

      function _gitium_status( $update_transient = false ) {
          global $git;
      
          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
              return $changes;
      Severity: Minor
      Found in gitium/functions.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 $public_key is not named in camelCase.
      Open

      function _gitium_generate_keypair() {
          $rsa_key = openssl_pkey_new(
              array(
                  'private_key_bits' => 2048,
                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.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 $generate_new_keypair is not named in camelCase.
      Open

      function gitium_get_keypair( $generate_new_keypair = false ) {
          if ( $generate_new_keypair ) {
              $keypair = _gitium_generate_keypair();
              delete_option( 'gitium_keypair' );
              add_option( 'gitium_keypair', $keypair, '', false );
      Severity: Minor
      Found in gitium/functions.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 $public_key is not named in camelCase.
      Open

      function _gitium_generate_keypair() {
          $rsa_key = openssl_pkey_new(
              array(
                  'private_key_bits' => 2048,
                  'private_key_type' => OPENSSL_KEYTYPE_RSA,
      Severity: Minor
      Found in gitium/functions.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_version is not named in camelCase.
      Open

      function _gitium_status( $update_transient = false ) {
          global $git;
      
          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
              return $changes;
      Severity: Minor
      Found in gitium/functions.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_version is not named in camelCase.
      Open

      function _gitium_status( $update_transient = false ) {
          global $git;
      
          if ( ! $update_transient && ( false !== ( $changes = get_transient( 'gitium_uncommited_changes' ) ) ) ) {
              return $changes;
      Severity: Minor
      Found in gitium/functions.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

      There are no issues that match your filters.

      Category
      Status