public function setValue($value)
    {
        if (is_int($value) || is_float($value)) {
            $this->value = $value;
        } else {
            $msg = "The value of a Weight must be a valid integer or float value, '" . gettype($value) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setValue($value)
    {
        if (is_int($value) || is_float($value)) {
            $this->value = $value;
        } else {
            $msg = "The value of a Weight must be a valid integer or float value, '" . gettype($value) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setValue ( $ value ) { if ( is_int ( $ value ) || is_float ( $ value ) ) { $ this -> value = $ value ; } else { $ msg = "The value of a Weight must be a valid integer or float value, '" . gettype ( $ value ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the value of the Weight.

@param int|float $value A in integer/float value.
@throws \InvalidArgumentException If $value is not an integer nor a float.
Set the value of the Weight .