Skip to content

Commit 1e25ec8

Browse files
committed
adjust typing
1 parent 5165009 commit 1e25ec8

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

phpstan.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,10 @@ parameters:
5050
- message: "#^Cannot access property \\S+ on mixed\\.$#"
5151
path: src/Controller.php
5252
count: 6
53+
- message: "#^Cannot access property \\S+ on mixed\\.$#"
54+
path: src/CLI.php
55+
count: 9
56+
- message: "#^Cannot access property \\S+ on mixed\\.$#"
57+
path: src/Addons.php
58+
count: 1
5359
- '/^Parameter #2 \$callable of static method WP_CLI::add_command\(\) expects callable\(\): mixed, \S+ given\.$/'

src/CLI.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,14 @@ public function diagnostics() : void {
6666
[ 'key', 'value' ]
6767
);
6868

69-
$active_plugins = get_option( 'active_plugins' );
69+
$active_plugins = (array) get_option( 'active_plugins' );
7070

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

7373
foreach ( $active_plugins as $active_plugin ) {
74+
/**
75+
* @var string $active_plugin
76+
*/
7477
WP_CLI::line( $active_plugin );
7578
}
7679

0 commit comments

Comments
 (0)