Throw an exception if <i>$value</i> is not a double or null.

@param mixed $value
@throws MWrongTypeException
180459
public static function mustBeNullableDouble($value)
    {
        if (is_double($value) === false && $value != null) {
            throw new MWrongTypeException('\$value', 'double|null', gettype($value));
        }
    }
256473
private function isNotNumber($value)
    {
        return is_array($value)
        || (is_object($value) && !method_exists($value, '__toString'))
        || (!is_object($value) && !is_scalar($value) && $value !== null);
    }
37326
public static function IsNativeType( $value ) : bool
   {

      return (
            \is_bool(   $value ) ||
            \is_int(    $value ) ||
            \is_string( $value ) ||
            \is_double( $value ) ||
            \is_float(  $value ) ||
            \is_array(  $value )
      );

   }
1182870
public function checkType($value)
    {
        if (isset($this->name) && null !== $this->name) {
            $fn = 'is_'.$this->name;

            return $fn($value);
        }

        throw new \Exception('Invalid name or name not defined for primitive type.');
    }
174450
public function removeOne($value): bool
    {
        if ($this->isValidType($value) === false) {
            throw new MWrongTypeException("\$value", $this->getType(), $value);
        }

        $result = array_search($value, $this->list);

        if ($result === false) {
            throw new \OutOfBoundsException();
        }

        unset($this->list[$result]);

        return true;
    }
841441
public static function parseString($value) {
        try {
            return FloatHelper::parseString($value);
        } catch (FloatArgumentException $ex) {
            throw new DoubleArgumentException($value, $ex);
        }
    }
757941
public function setRawValue( $value )
	{
		if ( is_null( $value ) )
			$this->_value = CoreFuncs::$False;
		else
			$this->_value = $value;

		$this->_xmlType = null;
	}
862629
public static function isNullOrCallable($value, $message = null)
    {
        if (!is_null($value) && !is_callable($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected null or callable, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
234711
function checkType($value)
    {
        if( $this->type !== null ) {
            // check type constraints
            if( $this->isTypeInteger() ) {
                if( ! is_numeric($value) )
                    throw new NonNumericException;
                $value = (int) $value;
            }
        }
        return $value;
    }
28214
public function append($value)
    {
        if ($this->isValidType($value) === false) {
            throw new MWrongTypeException("\$value", $this->getType(), $value);
        }

        $this->list[] = $value;
    }
60488
public function marshal($value)
    {
        if ($value === null || $value === '') {
            return null;
        }
        if (is_numeric($value)) {
            return (int)$value;
        }

        return null;
    }
595466
public static function isNullOrInteger($value, $message = null)
    {
        if (!is_null($value) && !is_int($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected null or integer, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
494810
public static function mustBeNullableFloat($value)
    {
        if (is_float($value) === false && $value != null) {
            throw new MWrongTypeException('\$value', 'float|null', gettype($value));
        }
    }
268560
public function transform($value)
    {
        if (null === $value) {
            return null;
        }

        if (!\is_string($value) || !is_numeric($value)) {
            throw new TransformationFailedException('Expected a numeric string.');
        }

        return (float) $value;
    }
686241
protected function _checkType( $value )
	{
		switch( $value )
		{
			case MShop_Order_Item_Abstract::TYPE_REPEAT:
			case MShop_Order_Item_Abstract::TYPE_WEB:
			case MShop_Order_Item_Abstract::TYPE_PHONE:
				break;
			default:
				throw new MShop_Order_Exception( sprintf( 'Order type "%1$s" not within allowed range', $value ) );
		}
	}
230647
public function setValue($value)
    {
        if ((\is_scalar($value) && \is_numeric($value))) {
            $this->value = (float) $value;
        } elseif (\is_object($value) && $value instanceof self) {
            $this->value = $value->getValue();
        }

        throw new \InvalidArgumentException('Expected double');
    }
1077330
public void writeDouble(double value) throws UnsupportedEncodingException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeDouble", new Double(value));
    getBodyList().add(new Double(value));
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "writeDouble");
  }