public function setSlots($first, $last, $connection)
    {
        if (!static::isValidRange($first, $last)) {
            throw new \OutOfBoundsException("Invalid slot range $first-$last for `$connection`");
        }

        $this->slots += array_fill($first, $last - $first + 1, (string) $connection);
    }
public function setSlots($first, $last, $connection)
    {
        if (!static::isValidRange($first, $last)) {
            throw new \OutOfBoundsException("Invalid slot range $first-$last for `$connection`");
        }

        $this->slots += array_fill($first, $last - $first + 1, (string) $connection);
    }
public function setSlots ( $ first , $ last , $ connection ) { if ( ! static :: isValidRange ( $ first , $ last ) ) { throw new \ OutOfBoundsException ( "Invalid slot range $first-$last for `$connection`" ) ; } $ this -> slots += array_fill ( $ first , $ last - $ first + 1 , ( string ) $ connection ) ; }
Assigns the specified slot range to a node.

@param int                            $first      Initial slot of the range.
@param int                            $last       Last slot of the range.
@param NodeConnectionInterface|string $connection ID or connection instance.

@throws \OutOfBoundsException
Assigns the specified slot range to a node .