Skip to content

Commit 9a4be37

Browse files
Copilotswissspidy
andcommitted
Fix code style issues: remove empty elseif and redundant is_array check
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent f1be4c5 commit 9a4be37

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Checksum_Plugin_Command.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,8 @@ private function detect_version_from_directory( $plugin_dir ) {
287287
}
288288
}
289289
}
290-
} elseif ( false === $files ) {
291-
// glob() failed - likely a permission issue, but we can continue
292-
// Version will just not be detected from PHP files
293290
}
291+
// If glob() failed (returns false), version will just not be detected from PHP files
294292

295293
return false;
296294
}
@@ -315,7 +313,7 @@ private function get_all_plugin_names() {
315313
$plugin_dir = WP_PLUGIN_DIR;
316314
if ( is_dir( $plugin_dir ) && is_readable( $plugin_dir ) ) {
317315
$dirs = @scandir( $plugin_dir ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
318-
if ( false !== $dirs && is_array( $dirs ) ) {
316+
if ( false !== $dirs ) {
319317
foreach ( $dirs as $dir ) {
320318
// Skip special directories and files
321319
if ( '.' === $dir || '..' === $dir ) {

0 commit comments

Comments
 (0)