Skip to content

Commit

Permalink
Move to elseif
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Dec 13, 2024
1 parent c6ca68b commit 713f7bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Plugin_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,9 @@ protected function install_from_repo( $slug, $assoc_args ) {
return $api;
}

if ( isset( $assoc_args['version'] ) || Utils\get_flag_value( $assoc_args, 'ignore-requirements' ) ) {
if ( isset( $assoc_args['version'] ) ) {
self::alter_api_response( $api, $assoc_args['version'] );
} else {
} elseif ( ! Utils\get_flag_value( $assoc_args, 'ignore-requirements', false ) ) {
$requires_php = isset( $api->requires_php ) ? $api->requires_php : null;
$requires_wp = isset( $api->requires ) ? $api->requires : null;

Expand Down
4 changes: 2 additions & 2 deletions src/Theme_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ protected function install_from_repo( $slug, $assoc_args ) {
return $api;
}

if ( isset( $assoc_args['version'] ) || Utils\get_flag_value( $assoc_args, 'ignore-requirements' ) ) {
if ( isset( $assoc_args['version'] ) ) {
self::alter_api_response( $api, $assoc_args['version'] );
} else {
} elseif ( ! Utils\get_flag_value( $assoc_args, 'ignore-requirements', false ) ) {
$requires_php = isset( $api->requires_php ) ? $api->requires_php : null;
$requires_wp = isset( $api->requires ) ? $api->requires : null;

Expand Down

0 comments on commit 713f7bb

Please sign in to comment.