Function is_git_version
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function is_git_version() {
$git_version = get_transient( 'gitium_git_version' );
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
global $git;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The method is_php_version uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return array( false, "The PHP version is `$php_version` and is not greater or equal to " . GITIUM_MIN_PHP_VER );
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method can_exec_ssh_git_file uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return array( false, "The `$filepath` file is not executable" );
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method is_proc_open uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return array( true, 'The function `proc_open` is enabled!' );
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method is_php_version uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$php_version = phpversion();
if ( GITIUM_MIN_PHP_VER <= substr( $php_version, 0, 3 ) ) {
return array( true, "The PHP version is `$php_version`." );
} else {
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Gitium_Requirements {
- Exclude checks
The class Gitium_Requirements is not named in CamelCase. Open
class Gitium_Requirements {
private $req = array();
private $msg = array();
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Method name "Gitium_Requirements::_check_req" is not in camel caps format Open
private function _check_req() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $this->req as $key => $value ) {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
class Gitium_Requirements {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $this->req as $key => $value ) {
- Exclude checks
Method name "Gitium_Requirements::is_proc_open" is not in camel caps format Open
private function is_proc_open() {
- Exclude checks
Method name "Gitium_Requirements::admin_notices" is not in camel caps format Open
public function admin_notices() {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $this->req as $key => $value ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $requirements as $req ) :
- Exclude checks
Method name "_check_req" should not be prefixed with an underscore to indicate visibility Open
private function _check_req() {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $requirements as $req ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $requirements as $req ) :
- Exclude checks
Method name "Gitium_Requirements::get_status" is not in camel caps format Open
public function get_status() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $git_version ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} else if ( is_executable( $filepath ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'is_executable' ) ) {
- Exclude checks
Method name "Gitium_Requirements::is_git_version" is not in camel caps format Open
private function is_git_version() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false === $value ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} else if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Method name "Gitium_Requirements::can_exec_ssh_git_file" is not in camel caps format Open
private function can_exec_ssh_git_file() {
- Exclude checks
Method name "Gitium_Requirements::is_php_version" is not in camel caps format Open
private function is_php_version() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'phpversion' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( false === $req ) :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'proc_open' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( GITIUM_MIN_PHP_VER <= substr( $php_version, 0, 3 ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private $msg = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list($this->req['is_git_version'], $this->msg['is_git_version'] ) = $this->is_git_version();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* PHP min version
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gitium requires:
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git_version = get_transient( 'gitium_git_version' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! function_exists( 'proc_open' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list($this->req['can_exec_ssh_git_file'],$this->msg['can_exec_ssh_git_file']) = $this->can_exec_ssh_git_file();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $requirements as $req ) :
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( false === $req ) :
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* git min version
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list($this->req['is_php_verion'], $this->msg['is_php_verion'] ) = $this->is_php_version();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( false === $value ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
global $git;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$requirements = $this->req;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function is_git_version() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$php_version = phpversion();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list($this->req['is_proc_open'], $this->msg['is_proc_open'] ) = $this->is_proc_open();
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
return array( false, "The git version is `$git_version` and must be greater than `" . GITIUM_MIN_GIT_VER . "`!" );
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
return array( false, "The PHP version is `$php_version` and is not greater or equal to " . GITIUM_MIN_PHP_VER );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* the function proc_open available
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_check_req();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_action( GITIUM_ADMIN_NOTICES_ACTION, array( $this, 'admin_notices' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function _check_req() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->req;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
endif;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( true, 'The function `proc_open` is enabled!' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$filepath = dirname( __FILE__ ) . '/ssh-git';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private $req = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $this->req as $key => $value ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function is_php_version() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( false, "The `$filepath` file is not executable" );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function __construct() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( false, "The PHP version is `$php_version` and is not greater or equal to " . GITIUM_MIN_PHP_VER );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( empty( $git_version ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( false, "The git version is `$git_version` and must be greater than `" . GITIUM_MIN_GIT_VER . "`!" );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( true, "The `$filepath` file can be executed!" );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* can exec the file inc/ssh-git
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
endforeach;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<div class='error-nag error'><p>Gitium Requirement: {$this->msg[$key]}</p></div>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
set_transient( 'gitium_git_version', $git_version );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( false, 'There is no git installed on this server.' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( true, "The git version is `$git_version`." );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( false, 'The function `proc_open` is disabled!' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( GITIUM_MIN_PHP_VER <= substr( $php_version, 0, 3 ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else if ( is_executable( $filepath ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$git_version = $git->get_version();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function can_exec_ssh_git_file() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function admin_notices() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! function_exists( 'is_executable' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function get_status() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function is_proc_open() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( ! function_exists( 'phpversion' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( false, 'The function `is_executable` is disabled!' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( false, 'The function `phpversion` is disabled!' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array( true, "The PHP version is `$php_version`." );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( GITIUM_ADMIN_NOTICES_ACTION, array( $this, 'admin_notices' ) );
- Exclude checks
Opening brace should be on a new line Open
public function admin_notices() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $this->req as $key => $value ) {
- Exclude checks
Usage of ELSE IF is discouraged; use ELSEIF instead Open
} else if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Class name "Gitium_Requirements" is not in camel caps format Open
class Gitium_Requirements {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
set_transient( 'gitium_git_version', $git_version );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} else if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! function_exists( 'proc_open' ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Opening brace should be on a new line Open
private function _check_req() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $requirements as $req ) :
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( GITIUM_MIN_PHP_VER <= substr( $php_version, 0, 3 ) ) {
- Exclude checks
Opening brace should be on a new line Open
public function __construct() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_action( GITIUM_ADMIN_NOTICES_ACTION, array( $this, 'admin_notices' ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( false === $value ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'phpversion' ) ) {
- Exclude checks
Usage of ELSE IF is discouraged; use ELSEIF instead Open
} else if ( is_executable( $filepath ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
set_transient( 'gitium_git_version', $git_version );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'proc_open' ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! function_exists( 'phpversion' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
} else if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! function_exists( 'phpversion' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( GITIUM_MIN_PHP_VER <= substr( $php_version, 0, 3 ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
- Exclude checks
Opening brace should be on a new line Open
public function get_status() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( empty( $git_version ) ) {
- Exclude checks
Opening brace should be on a new line Open
private function can_exec_ssh_git_file() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
} else if ( is_executable( $filepath ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$git_version = get_transient( 'gitium_git_version' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
} else if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ! function_exists( 'is_executable' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$filepath = dirname( __FILE__ ) . '/ssh-git';
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$git_version = get_transient( 'gitium_git_version' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! function_exists( 'proc_open' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} else if ( is_executable( $filepath ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( false === $req ) :
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( empty( $git_version ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( empty( $git_version ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( GITIUM_MIN_PHP_VER <= substr( $php_version, 0, 3 ) ) {
- Exclude checks
Opening brace should be on a new line Open
private function is_git_version() {
- Exclude checks
Opening brace should be on a new line Open
private function is_proc_open() {
- Exclude checks
Opening brace should be on a new line Open
private function is_php_version() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ! function_exists( 'is_executable' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$filepath = dirname( __FILE__ ) . '/ssh-git';
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( ! function_exists( 'is_executable' ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
} else if ( is_executable( $filepath ) ) {
- Exclude checks
The variable $git_version is not named in camelCase. Open
private function is_git_version() {
$git_version = get_transient( 'gitium_git_version' );
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
global $git;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $git_version is not named in camelCase. Open
private function is_git_version() {
$git_version = get_transient( 'gitium_git_version' );
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
global $git;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $php_version is not named in camelCase. Open
private function is_php_version() {
if ( ! function_exists( 'phpversion' ) ) {
return array( false, 'The function `phpversion` is disabled!' );
} else {
$php_version = phpversion();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $php_version is not named in camelCase. Open
private function is_php_version() {
if ( ! function_exists( 'phpversion' ) ) {
return array( false, 'The function `phpversion` is disabled!' );
} else {
$php_version = phpversion();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $git_version is not named in camelCase. Open
private function is_git_version() {
$git_version = get_transient( 'gitium_git_version' );
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
global $git;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $git_version is not named in camelCase. Open
private function is_git_version() {
$git_version = get_transient( 'gitium_git_version' );
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
global $git;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $git_version is not named in camelCase. Open
private function is_git_version() {
$git_version = get_transient( 'gitium_git_version' );
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
global $git;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $git_version is not named in camelCase. Open
private function is_git_version() {
$git_version = get_transient( 'gitium_git_version' );
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
global $git;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $git_version is not named in camelCase. Open
private function is_git_version() {
$git_version = get_transient( 'gitium_git_version' );
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
global $git;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $php_version is not named in camelCase. Open
private function is_php_version() {
if ( ! function_exists( 'phpversion' ) ) {
return array( false, 'The function `phpversion` is disabled!' );
} else {
$php_version = phpversion();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $git_version is not named in camelCase. Open
private function is_git_version() {
$git_version = get_transient( 'gitium_git_version' );
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
global $git;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $php_version is not named in camelCase. Open
private function is_php_version() {
if ( ! function_exists( 'phpversion' ) ) {
return array( false, 'The function `phpversion` is disabled!' );
} else {
$php_version = phpversion();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method is_proc_open is not named in camelCase. Open
private function is_proc_open() {
if ( ! function_exists( 'proc_open' ) ) {
return array( false, 'The function `proc_open` is disabled!' );
} else {
return array( true, 'The function `proc_open` is enabled!' );
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method is_git_version is not named in camelCase. Open
private function is_git_version() {
$git_version = get_transient( 'gitium_git_version' );
if ( GITIUM_MIN_GIT_VER > substr( $git_version, 0, 3 ) ) {
global $git;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method can_exec_ssh_git_file is not named in camelCase. Open
private function can_exec_ssh_git_file() {
$filepath = dirname( __FILE__ ) . '/ssh-git';
if ( ! function_exists( 'is_executable' ) ) {
return array( false, 'The function `is_executable` is disabled!' );
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method admin_notices is not named in camelCase. Open
public function admin_notices() {
if ( ! current_user_can( GITIUM_MANAGE_OPTIONS_CAPABILITY ) ) {
return;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_status is not named in camelCase. Open
public function get_status() {
$requirements = $this->req;
foreach ( $requirements as $req ) :
if ( false === $req ) :
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method is_php_version is not named in camelCase. Open
private function is_php_version() {
if ( ! function_exists( 'phpversion' ) ) {
return array( false, 'The function `phpversion` is disabled!' );
} else {
$php_version = phpversion();
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _check_req is not named in camelCase. Open
private function _check_req() {
list($this->req['is_git_version'], $this->msg['is_git_version'] ) = $this->is_git_version();
list($this->req['is_proc_open'], $this->msg['is_proc_open'] ) = $this->is_proc_open();
list($this->req['is_php_verion'], $this->msg['is_php_verion'] ) = $this->is_php_version();
list($this->req['can_exec_ssh_git_file'],$this->msg['can_exec_ssh_git_file']) = $this->can_exec_ssh_git_file();
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}