public static function isStringInList(array $list, ?string $key = null): bool
    {
        $stringInList = false;
        if (count($list) === 0) {
            return $stringInList;
        }
        foreach ($list as $item) {
            if ($key !== null && isset($item[$key])) {
                $value = $item[$key];
            } else {
                $value = $item;
            }
            if (!is_numeric($value)) {
                $stringInList = true;
            }
        }
        return $stringInList;
    }
public static function isStringInList(array $list, ?string $key = null): bool
    {
        $stringInList = false;
        if (count($list) === 0) {
            return $stringInList;
        }
        foreach ($list as $item) {
            if ($key !== null && isset($item[$key])) {
                $value = $item[$key];
            } else {
                $value = $item;
            }
            if (!is_numeric($value)) {
                $stringInList = true;
            }
        }
        return $stringInList;
    }
public static function isStringInList ( array $ list , ? string $ key = null ) : bool { $ stringInList = false ; if ( count ( $ list ) === 0 ) { return $ stringInList ; } foreach ( $ list as $ item ) { if ( $ key !== null && isset ( $ item [ $ key ] ) ) { $ value = $ item [ $ key ] ; } else { $ value = $ item ; } if ( ! is_numeric ( $ value ) ) { $ stringInList = true ; } } return $ stringInList ; }
Is string in list.

@param string[] $list
@param string $key Default null.
@return bool
Is string in list .