Skip to content

Commit 021f0f8

Browse files
committed
PHPStan fix
1 parent c537a7f commit 021f0f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Font_Collection_Command.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
* +-------+------------------+
3030
*
3131
* @package wp-cli
32+
*
33+
* @phpstan-type FontFamily array{font_family_settings: array{name: string, slug: string, fontFamily: string, preview: string}}
34+
* @phpstan-type FontCollectionData array{name: string, font_families: FontFamily[], description: string, categories: string[]}
3235
*/
3336
class Font_Collection_Command extends WP_CLI_Command {
3437

@@ -305,6 +308,10 @@ public function list_families( $args, $assoc_args ) {
305308
WP_CLI::error( $collection_data );
306309
}
307310

311+
/**
312+
* @var FontCollectionData $collection_data
313+
*/
314+
308315
$font_families = $collection_data['font_families'] ?? [];
309316

310317
if ( empty( $font_families ) || ! is_array( $font_families ) ) {

0 commit comments

Comments
 (0)