Skip to content

Commit 0ed14ea

Browse files
Copilotswissspidy
andcommitted
Remove redundant empty checks for required plugin argument
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 729a94c commit 0ed14ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Plugin_Command.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,9 +1406,9 @@ public function is_active( $args, $assoc_args ) {
14061406
// Check if the input matches the plugin file in various ways
14071407
// This mirrors the logic in WP_CLI\Fetchers\Plugin::get()
14081408
if (
1409-
( ! empty( $input_name ) && "$input_name.php" === $plugin_file ) ||
1410-
( ! empty( $input_name ) && $plugin_file === $input_name ) ||
1411-
( ! empty( $input_name ) && dirname( $plugin_file ) === $input_name && '.' !== $input_name )
1409+
"$input_name.php" === $plugin_file ||
1410+
$plugin_file === $input_name ||
1411+
( dirname( $plugin_file ) === $input_name && '.' !== $input_name )
14121412
) {
14131413
$found_in_active = $plugin_file;
14141414
break;

0 commit comments

Comments
 (0)