Skip to content

Commit 9c937d3

Browse files
committed
Inline condition
1 parent 2d05bac commit 9c937d3

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎src/Package_Command.php‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,7 @@ public function uninstall( $args, $assoc_args ) {
665665
*/
666666
public function is_installed( $args, $assoc_args ) {
667667
list( $package_name ) = $args;
668-
if ( $this->get_installed_package_by_name( $package_name ) ) {
669-
WP_CLI::halt( 0 );
670-
} else {
671-
WP_CLI::halt( 1 );
672-
}
668+
WP_CLI::halt( $this->get_installed_package_by_name( $package_name ) ? 0 : 1 );
673669
}
674670

675671
/**

0 commit comments

Comments
 (0)