public function setX($x)
    {
        if (is_int($x)) {
            $this->x = $x;
        } else {
            $msg = "The X argument must be an integer value, '" . gettype($x) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setX($x)
    {
        if (is_int($x)) {
            $this->x = $x;
        } else {
            $msg = "The X argument must be an integer value, '" . gettype($x) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setX ( $ x ) { if ( is_int ( $ x ) ) { $ this -> x = $ x ; } else { $ msg = "The X argument must be an integer value, '" . gettype ( $ x ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the position on the x-axis.

@param int $x A position on the x-axis.
@throws \InvalidArgumentException If $x is nto an integer value.
Set the position on the x - axis .