[CodeFactor] Apply fixes

[ci skip] [skip ci]
This commit is contained in:
codefactor-io 2020-06-04 09:34:33 +00:00
parent 08cac1ebc5
commit d44071b9f4
2 changed files with 405 additions and 404 deletions

View file

@ -8,6 +8,7 @@ namespace MainWP\Child;
/** /**
* Class MainWP_Child_Server_Information_Base * Class MainWP_Child_Server_Information_Base
*
* @package MainWP\Child * @package MainWP\Child
*/ */
class MainWP_Child_Server_Information_Base { class MainWP_Child_Server_Information_Base {
@ -141,7 +142,7 @@ class MainWP_Child_Server_Information_Base {
* relationship is the one specified by the operator, FALSE otherwise. Returns -1 if the first version * relationship is the one specified by the operator, FALSE otherwise. Returns -1 if the first version
* is lower than the second, 0 if they are equal, and 1 if the second is lower. * is lower than the second, 0 if they are equal, and 1 if the second is lower.
*/ */
protected static function filesize_compare($value1, $value2, $operator = null ) { protected static function filesize_compare( $value1, $value2, $operator = null ) {
if ( false !== strpos( $value1, 'G' ) ) { if ( false !== strpos( $value1, 'G' ) ) {
$value1 = preg_replace( '/[A-Za-z]/', '', $value1 ); $value1 = preg_replace( '/[A-Za-z]/', '', $value1 );
$value1 = intval( $value1 ) * 1024; $value1 = intval( $value1 ) * 1024;
@ -198,7 +199,7 @@ class MainWP_Child_Server_Information_Base {
* relationship is the one specified by the operator, FALSE otherwise. Returns -1 if the first version * relationship is the one specified by the operator, FALSE otherwise. Returns -1 if the first version
* is lower than the second, 0 if they are equal, and 1 if the second is lower. * is lower than the second, 0 if they are equal, and 1 if the second is lower.
*/ */
protected static function curlssl_compare($value, $operator = null ) { protected static function curlssl_compare( $value, $operator = null ) {
if ( isset( $value['version_number'] ) && defined( 'OPENSSL_VERSION_NUMBER' ) ) { if ( isset( $value['version_number'] ) && defined( 'OPENSSL_VERSION_NUMBER' ) ) {
return version_compare( OPENSSL_VERSION_NUMBER, $value['version_number'], $operator ); return version_compare( OPENSSL_VERSION_NUMBER, $value['version_number'], $operator );
} }
@ -802,7 +803,7 @@ class MainWP_Child_Server_Information_Base {
* @param string $b Time 2 * @param string $b Time 2
* @return int Return 0 if $a is equal to $b ELSE or time. * @return int Return 0 if $a is equal to $b ELSE or time.
*/ */
protected static function time_compare($a, $b ) { protected static function time_compare( $a, $b ) {
if ( $a === $b ) { if ( $a === $b ) {
return 0; return 0;
} }