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

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