A helper method that check in payload if phone number was set
@param array $postedParam
@return boolean
177379
public static function isPhoneNoValid($postedParam)
	{
		$isValid = false;

		if(isset($postedParam['phoneNumber'])) {

			$isPhoneEmpty = CheckoutApi_Lib_Validator::isEmpty($postedParam['phoneNumber']);

			if(!$isPhoneEmpty &&  CheckoutApi_Lib_Validator::isString($postedParam['phoneNumber']) ){
				$isValid = true;
			}
		}

		return $isValid;

	}
1280847
protected function _postnet($value)
    {
        $checksum = substr($value, -1, 1);
        $values   = str_split(substr($value, 0, -1));

        $check = 0;
        foreach($values as $row) {
            $check += $row;
        }

        $check %= 10;
        $check = 10 - $check;
        if ($check == $checksum) {
            return true;
        }

        return false;
    }
71831
function call ($phone_number, $message, $message_type, array $other = []) {
    return $this->post(self::VOICE_RESOURCE, array_merge($other, [
      "phone_number" => $phone_number,
      "message" => $message,
      "message_type" => $message_type
    ]));
  }
485253
public function getOobConfirmationCode(Google_Service_IdentityToolkit_Relyingparty $postBody, $optParams = array())
  {
    $params = array('postBody' => $postBody);
    $params = array_merge($params, $optParams);
    return $this->call('getOobConfirmationCode', array($params), "Google_Service_IdentityToolkit_GetOobConfirmationCodeResponse");
  }
596424
public function setPostFields($value) {
        if (is_array($value)) {
            return $this->setOption(CURLOPT_POSTFIELDS, http_build_query($value));
        } else {
            return $this->setOption(CURLOPT_POSTFIELDS, $value);
        }
    }
44818
public function getConfirmBoxMsg($param) {
        $param_arr = json_decode($param, true);
        $msg_array = array();
        foreach ($this->xmlContent as $msg) {
            if (($msg->getAttribute('uicomponent') == 'confirm' || $msg->getAttribute('uicomponent') == 'alert') &&
                    $msg->getAttribute('targetcontroller') == $param_arr['targetcontroller'] &&
                    $msg->getAttribute('targetaction') == $param_arr['targetaction'] &&
                    in_array($msg->getAttribute('operation'), $param_arr['operation'])
            ) {
                array_push($msg_array, array('confirmmsg' => array('value' => $msg->getAttribute('value'), 'operation' => $msg->getAttribute('operation'))));
            }
        }

        return $msg_array;
    }
683169
public static function isValueValid($postedParam)
	{
		$isValid = false;

		if(isset($postedParam['value'])) {

			$amount = $postedParam['value'];

			$isAmountEmpty = CheckoutApi_Lib_Validator::isEmpty($amount);

			
			if(!$isAmountEmpty  ) {
				$isValid = true;

			} 
	
		} 

		return $isValid;
	}
1371409
public function __isset(string $param): bool
    {
        return isset(self::$data[self::$method][$param]);
    }
1229644
public static function isCardToken($param)
	{
		$isValid = false;

		if(isset($param['cardToken'])){
			$isTokenEmpty = CheckoutApi_Lib_Validator::isEmpty($param['cardToken']);

			if(!$isTokenEmpty) {
				$isValid = true;
			}
		}

		return $isValid;
	}
275865
public function postCallTracking(CallTrackingPostMessage $message): CallTracking
    {
        $path = sprintf('sites/%d/call_trackings', $message->getSiteId());
        $data = ['api_call_tracking' => $message->build()];

        $response = $this->getClient()->sendRequest('POST', $path, $data);

        /** @var CallTracking $model */
        $model = $this->getModelFactory()->create(CallTracking::class, $response);

        return $model;
    }
466007
private function validateAndSetBotParamsSpecial(array $params)
    {
        // Special case, where secret MUST be defined if we have a webhook.
        if (($params['webhook']['url'] ?? null) && !($params['secret'] ?? null)) {
            // This does not apply when using CLI, but make sure it gets tested for!
            if ('cli' !== PHP_SAPI || BotManager::inTest()) {
                throw new InvalidParamsException('Some vital info is missing: secret');
            }
        }
    }
1275882
public function getParam($param = null)
    {
        if (null === $param) {
            return $this->params;
        }

        return isset($this->params[$param]) ? $this->params[$param] : null;
    }
568611
private void addPostParams(final Request request) {
        if (phoneNumber != null) {
            request.addPostParam("PhoneNumber", phoneNumber.toString());
        }

        if (smsCapability != null) {
            request.addPostParam("SmsCapability", smsCapability.toString());
        }

        if (accountSid != null) {
            request.addPostParam("AccountSid", accountSid);
        }

        if (friendlyName != null) {
            request.addPostParam("FriendlyName", friendlyName);
        }

        if (uniqueName != null) {
            request.addPostParam("UniqueName", uniqueName);
        }

        if (ccEmails != null) {
            for (String prop : ccEmails) {
                request.addPostParam("CcEmails", prop);
            }
        }

        if (smsUrl != null) {
            request.addPostParam("SmsUrl", smsUrl.toString());
        }

        if (smsMethod != null) {
            request.addPostParam("SmsMethod", smsMethod.toString());
        }

        if (smsFallbackUrl != null) {
            request.addPostParam("SmsFallbackUrl", smsFallbackUrl.toString());
        }

        if (smsFallbackMethod != null) {
            request.addPostParam("SmsFallbackMethod", smsFallbackMethod.toString());
        }

        if (statusCallbackUrl != null) {
            request.addPostParam("StatusCallbackUrl", statusCallbackUrl.toString());
        }

        if (statusCallbackMethod != null) {
            request.addPostParam("StatusCallbackMethod", statusCallbackMethod.toString());
        }

        if (smsApplicationSid != null) {
            request.addPostParam("SmsApplicationSid", smsApplicationSid);
        }

        if (addressSid != null) {
            request.addPostParam("AddressSid", addressSid);
        }

        if (email != null) {
            request.addPostParam("Email", email);
        }

        if (verificationType != null) {
            request.addPostParam("VerificationType", verificationType.toString());
        }

        if (verificationDocumentSid != null) {
            request.addPostParam("VerificationDocumentSid", verificationDocumentSid);
        }
    }
1254839
public static function isCustomerPlanIdValid($postedParam)
	{
		$isCustomerPlanIdEmpty = true;
		$isValidCustomerPlanId = false;

		if(isset($postedParam['customerPlanId'])) {
			$isCustomerPlanIdEmpty = CheckoutApi_Lib_Validator::isEmpty($postedParam['customerPlanId']);
		}

		if(!$isCustomerPlanIdEmpty) {

			$isValidCustomerPlanId = CheckoutApi_Lib_Validator::isString($postedParam['customerPlanId']);
		}

		return !$isCustomerPlanIdEmpty && $isValidCustomerPlanId;
	}
373019
public function validate_input( $post_array = null ) {
		! isset( $post_array ) and $post_array = $this->app->input->post();
		$errors = [];
		foreach ( $this->get_data_field_settings() as $k => $v ) {
			$param    = $this->get_post_field( $k, null, $post_array, $v );
			$param    = $this->sanitize_input( $param, $v['type'] );
			$validate = $this->validate( $param, $v );
			if ( $validate instanceof \WP_Error ) {
				$errors[ $k ][] = $validate->get_error_message();
			}
		}

		if ( $this->validate_post_title() && in_array( 'title', $this->get_post_type_supports() ) ) {
			if ( ! isset( $post_array['post_title'] ) || '' === trim( $post_array['post_title'] ) ) {
				$errors['post_title'][] = $this->app->translate( 'Value is required.' );
			}
		}

		return $this->filter_validate_input( $errors, $post_array );
	}
1168538
public function setPostParameters(array $postParameters)
    {
        foreach ($postParameters as $k => $v) {
            $this->_postParams[$k] = $v;
        }
    }
1321908
def receive_update_post(self, post_params):
        

        if isinstance(post_params, dict):
            required_params = ['action', 'email', 'sig']
            if not self.check_for_valid_postback_actions(required_params, post_params):
                return False
        else:
            return False

        if post_params['action'] != 'update':
            return False

        signature = post_params['sig']
        post_params = post_params.copy()
        del post_params['sig']

        if signature != get_signature_hash(post_params, self.secret):
            return False

        return True