From 6c60ee1e86f19029a00f60d0272f59f895a5ac5c Mon Sep 17 00:00:00 2001 From: Narek Zakarian Date: Tue, 19 Mar 2024 18:35:49 +0400 Subject: [PATCH] Fix Psalm --- .../src/Factory/ConfigFactory.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ppcp-paylater-configurator/src/Factory/ConfigFactory.php b/modules/ppcp-paylater-configurator/src/Factory/ConfigFactory.php index 0fedbe44c..7c7b61e7c 100644 --- a/modules/ppcp-paylater-configurator/src/Factory/ConfigFactory.php +++ b/modules/ppcp-paylater-configurator/src/Factory/ConfigFactory.php @@ -66,7 +66,7 @@ class ConfigFactory { * layout: string, * color: string, * ratio: string, - * status: string, + * status: "disabled"|"enabled", * placement: string * } The configurator config map. */ @@ -85,7 +85,7 @@ class ConfigFactory { * * @param array $selected_locations The list of selected locations. * @return array{ - * status: string, + * status: "disabled"|"enabled", * message_reference: string * } The configurator config map. */ @@ -108,7 +108,7 @@ class ConfigFactory { * logo-type: string, * text-color: string, * text-size: string, - * status: string, + * status: "disabled"|"enabled", * placement: string * } The configurator config map. */ @@ -131,9 +131,9 @@ class ConfigFactory { * @param string $key The key. * @param mixed $default The default value. * @param array|null $allowed_values The list of allowed values, or null if all values are allowed. - * @return mixed + * @return string */ - private function get_or_default( Settings $settings, string $key, $default, ?array $allowed_values = null ) { + private function get_or_default( Settings $settings, string $key, $default, ?array $allowed_values = null ): string { if ( $settings->has( $key ) ) { $value = $settings->get( $key ); if ( ! $allowed_values || in_array( $value, $allowed_values, true ) ) {