Skip to content

Commit

Permalink
Update phpstan-param annotation in Feature Manager
Browse files Browse the repository at this point in the history
The phpstan-param annotation in the add_features method of the wp-404-caching plugin's Feature Manager was updated. This modification improves code clarity by specifying 'string' as the key type of the first-level array in the parameter, ensuring clearer type hinting for developers and better code comprehension.
  • Loading branch information
attackant committed Mar 11, 2024
1 parent ad6c2f9 commit 90a3a93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/class-feature-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Feature_Manager {
*
* @param array $features_to_create Array of feature classnames and arguments.
*
* @phpstan-param array{string: array{string?: mixed}}|array{} $features_to_create
* @phpstan-param array<string, array{string?: mixed}>|array{} $features_to_create
*/
public static function add_features( array $features_to_create = [] ): void {
foreach ( $features_to_create as $feature_class => $args ) {
Expand Down

0 comments on commit 90a3a93

Please sign in to comment.