add type hints to PHP methods

This commit is contained in:
2024-03-24 11:16:44 +01:00
parent ad245ebf43
commit 5f1e1a7879
8 changed files with 39 additions and 38 deletions

View File

@ -31,7 +31,7 @@ class Widget extends WP_Widget {
/**
* Register the widget.
*/
public static function register() {
public static function register(): void {
register_widget( __CLASS__ );
}
@ -164,7 +164,7 @@ class Widget extends WP_Widget {
*
* @return array Complete instance configuration.
*/
private static function fill_options_with_defaults( $instance ) {
private static function fill_options_with_defaults( array $instance ): array {
$default = array(
'title' => '',
'category' => '',