public function is($type)
    {
        if (null !== $this->type) {
            throw new LogicException('Already typed');
        }

        $this->type = $type;

        return $this;
    }
public function is($type)
    {
        if (null !== $this->type) {
            throw new LogicException('Already typed');
        }

        $this->type = $type;

        return $this;
    }
public function is ( $ type ) { if ( null !== $ this -> type ) { throw new LogicException ( 'Already typed' ) ; } $ this -> type = $ type ; return $ this ; }
Define the type.

@param string $type

@return static
Define the type .