adjust typing

This commit is contained in:
Leon Stafford 2023-01-04 13:50:11 +11:00
parent 5165009967
commit 1e25ec8caa
2 changed files with 10 additions and 1 deletions

View file

@ -50,4 +50,10 @@ parameters:
- message: "#^Cannot access property \\S+ on mixed\\.$#"
path: src/Controller.php
count: 6
- message: "#^Cannot access property \\S+ on mixed\\.$#"
path: src/CLI.php
count: 9
- message: "#^Cannot access property \\S+ on mixed\\.$#"
path: src/Addons.php
count: 1
- '/^Parameter #2 \$callable of static method WP_CLI::add_command\(\) expects callable\(\): mixed, \S+ given\.$/'

View file

@ -66,11 +66,14 @@ class CLI {
[ 'key', 'value' ]
);

$active_plugins = get_option( 'active_plugins' );
$active_plugins = (array) get_option( 'active_plugins' );

WP_CLI::line( PHP_EOL . 'Active plugins:' . PHP_EOL );

foreach ( $active_plugins as $active_plugin ) {
/**
* @var string $active_plugin
*/
WP_CLI::line( $active_plugin );
}