From 4977a733b6f614de868fc405b820d5c66e5bf9b7 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 8 May 2021 19:18:38 +0200 Subject: Auto fixup missing return types by Psalm --- includes/band.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'includes/band.php') diff --git a/includes/band.php b/includes/band.php index 14daa18..81b275a 100644 --- a/includes/band.php +++ b/includes/band.php @@ -46,7 +46,7 @@ if ( !class_exists('GiglogAdmin_Band') ) { return $band; } - static function find($name, $country) + static function find($name, $country): ?self { global $wpdb; @@ -83,6 +83,11 @@ if ( !class_exists('GiglogAdmin_Band') ) { return ($results); } + /** + * @return array|string + * + * @psalm-return array{0: mixed, 1: mixed}|string + */ static function get_band($bid) { global $wpdb; @@ -116,7 +121,7 @@ if ( !class_exists('GiglogAdmin_Band') ) { return ($wpdb->last_error); } - public function save() + public function save(): void { global $wpdb; -- cgit v1.2.3 From 30f12e61317d9b181efb46382a4db98d73f65954 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 8 May 2021 20:50:39 +0200 Subject: Autofixes by Psalm --- includes/band.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes/band.php') diff --git a/includes/band.php b/includes/band.php index 81b275a..3460acb 100644 --- a/includes/band.php +++ b/includes/band.php @@ -25,7 +25,7 @@ if ( !class_exists('GiglogAdmin_Band') ) { $this->country = isset($attrs->wpgband_country) ? $attrs->wpgband_country : 'NO'; } - static function create($bandname, $country = 'NO') + static function create($bandname, $country = 'NO'): self { $band = GiglogAdmin_Band::find($bandname, $country); -- cgit v1.2.3