Skip to content

Commit

Permalink
Fix PHPCS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
BlairCooper committed Feb 4, 2024
1 parent a1a0339 commit 260dcc5
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Option_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,12 +619,12 @@ function ( $key ) {
array_slice( $args, 1 )
);

if (function_exists( 'maybe_unserialize' )) {
$value = maybe_unserialize( $value );
if ( function_exists( 'maybe_unserialize' ) ) {
$value = maybe_unserialize( $value );
}

if (Utils\is_json( $value )) {
$value = json_decode( $value );
if ( Utils\is_json( $value ) ) {
$value = json_decode( $value );
}

$traverser = new RecursiveDataStructureTraverser( $value );
Expand All @@ -635,10 +635,10 @@ function ( $key ) {
die( 1 );
}

if (function_exists( 'is_serialized' ) &&
function_exists( 'maybe_serialize' ) &&
!is_serialized( $value ) ) {
$value = maybe_serialize( $value );
if ( function_exists( 'is_serialized' ) &&
function_exists( 'maybe_serialize' ) &&
! is_serialized( $value ) ) {
$value = maybe_serialize( $value );
}

WP_CLI::print_value( $value, $assoc_args );
Expand Down Expand Up @@ -759,12 +759,12 @@ function ( $key ) {
$old_value = clone $current_value;
}

if (function_exists('maybe_unserialize')) {
$current_value = maybe_unserialize($current_value);
if ( function_exists( 'maybe_unserialize' ) ) {
$current_value = maybe_unserialize( $current_value );
}

if (Utils\is_json($current_value)) {
$current_value = json_decode($current_value);
if ( Utils\is_json( $current_value ) ) {
$current_value = json_decode( $current_value );
}

$traverser = new RecursiveDataStructureTraverser( $current_value );
Expand Down

0 comments on commit 260dcc5

Please sign in to comment.