PHP Notice: A non well formed numeric (throw exception instead)

I am using PHP 7.0 and want to throw exceptions when invalid arguments are provided to methods. Using this method as an example:

public function setType(int ...$type)
    if(count($type) == 0)
        $this->type = null;

    $this->type = $type;

When I call this method like so:


I only get an Notice message back:

"PHP Notice:  A non well formed numeric value encountered in ...."

However, if I call it like so:


I get an exception (which is what I acually want to achieve):

PHP Fatal error:  Uncaught TypeError: Argument 4 passed to Network\Parser::setType() must be of the type integer, string given

How can I make this happen in the first case as well, and not only print out an Notice message as the arguments is not an integer?

Thanks for any help!