Skip to content

Commit af8374a

Browse files
gziolowestonruter
andauthored
Apply suggestions from code review
Co-authored-by: Weston Ruter <westonruter@gmail.com>
1 parent fdb380b commit af8374a

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/wp-includes/class-wp-connector-registry.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ final class WP_Connector_Registry {
6161
* @type string $method Required. The authentication method: 'api_key' or 'none'.
6262
* @type string|null $credentials_url Optional. URL where users can obtain API credentials.
6363
* }
64-
* @type array $plugin Optional. Plugin data for install/activate UI.
65-
* @type string $slug The WordPress.org plugin slug.
64+
* @type array $plugin {
65+
* Optional. Plugin data for install/activate UI.
66+
*
67+
* @type string $slug The WordPress.org plugin slug.
6668
* }
6769
* }
6870
* @return array|null The registered connector data on success, null on failure.

tests/phpunit/tests/connectors/wpConnectorRegistry.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@
55
* @covers WP_Connector_Registry
66
*
77
* @group connectors
8+
*
9+
* @phpstan-import-type Connector from WP_Connector_Registry
810
*/
911
class Tests_Connectors_WpConnectorRegistry extends WP_UnitTestCase {
1012

1113
/**
1214
* Connector registry instance.
13-
*
14-
* @var WP_Connector_Registry
1515
*/
16-
private $registry = null;
16+
private WP_Connector_Registry $registry;
1717

1818
/**
1919
* Default valid connector args for testing.
2020
*
21-
* @var array
21+
* @var array<string, mixed>
22+
* @phpstan-var Connector
2223
*/
23-
private static $default_args = array();
24+
private static array $default_args;
2425

2526
/**
2627
* Set up each test method.

0 commit comments

Comments
 (0)