Skip to content

Commit

Permalink
Switch out ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Dec 17, 2024
1 parent fc031a9 commit bf7d587
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/class-wp-plugin-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,37 +261,37 @@ public function filter_plugin_action_links( $actions, $plugin_file ): array {
/**
* Filters the list of active plugins to include the ones we loaded via code.
*
* @param array<int, string>|mixed $value The existing list of active plugins.
* @param array<int, string> $value The existing list of active plugins.
* @return array<int, string>
*/
public function filter_option_active_plugins( $value ): array {
if ( ! is_array( $value ) ) {
if ( ! is_array( $value ) ) { // @phpstan-ignore-line to true
$value = [];
}

$value = array_unique( array_merge( $value, $this->loaded_plugins ) );

sort( $value );

return $value; // @phpstan-ignore-line should return
return $value;
}

/**
* Exclude code-active plugins from the database option.
*
* @param array<int, string>|mixed $value The saved list of active plugins.
* @param array<int, string> $value The saved list of active plugins.
* @return array<int, string>
*/
public function filter_pre_update_option_active_plugins( $value ) {
if ( ! is_array( $value ) ) {
if ( ! is_array( $value ) ) { // @phpstan-ignore-line to true
$value = [];
}

$value = array_diff( $value, $this->loaded_plugins );

sort( $value );

return $value; // @phpstan-ignore-line should return
return $value;
}

/**
Expand Down

0 comments on commit bf7d587

Please sign in to comment.