mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Fix Psalm
This commit is contained in:
parent
ded41850ff
commit
6c60ee1e86
1 changed files with 5 additions and 5 deletions
|
@ -66,7 +66,7 @@ class ConfigFactory {
|
||||||
* layout: string,
|
* layout: string,
|
||||||
* color: string,
|
* color: string,
|
||||||
* ratio: string,
|
* ratio: string,
|
||||||
* status: string,
|
* status: "disabled"|"enabled",
|
||||||
* placement: string
|
* placement: string
|
||||||
* } The configurator config map.
|
* } The configurator config map.
|
||||||
*/
|
*/
|
||||||
|
@ -85,7 +85,7 @@ class ConfigFactory {
|
||||||
*
|
*
|
||||||
* @param array $selected_locations The list of selected locations.
|
* @param array $selected_locations The list of selected locations.
|
||||||
* @return array{
|
* @return array{
|
||||||
* status: string,
|
* status: "disabled"|"enabled",
|
||||||
* message_reference: string
|
* message_reference: string
|
||||||
* } The configurator config map.
|
* } The configurator config map.
|
||||||
*/
|
*/
|
||||||
|
@ -108,7 +108,7 @@ class ConfigFactory {
|
||||||
* logo-type: string,
|
* logo-type: string,
|
||||||
* text-color: string,
|
* text-color: string,
|
||||||
* text-size: string,
|
* text-size: string,
|
||||||
* status: string,
|
* status: "disabled"|"enabled",
|
||||||
* placement: string
|
* placement: string
|
||||||
* } The configurator config map.
|
* } The configurator config map.
|
||||||
*/
|
*/
|
||||||
|
@ -131,9 +131,9 @@ class ConfigFactory {
|
||||||
* @param string $key The key.
|
* @param string $key The key.
|
||||||
* @param mixed $default The default value.
|
* @param mixed $default The default value.
|
||||||
* @param array|null $allowed_values The list of allowed values, or null if all values are allowed.
|
* @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 ) ) {
|
if ( $settings->has( $key ) ) {
|
||||||
$value = $settings->get( $key );
|
$value = $settings->get( $key );
|
||||||
if ( ! $allowed_values || in_array( $value, $allowed_values, true ) ) {
|
if ( ! $allowed_values || in_array( $value, $allowed_values, true ) ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue