public static function factory($type = null, $text = null, $length = null, $value = null)
    {
        $token = new static();
        if (null !== $type) {
            $token->setType($type);
        }
        if (null !== $text) {
            $token->setText($text);
        }
        if (null !== $length) {
            $token->setLength($length);
        }
        if (null !== $value) {
            $token->setValue($value);
        }
        return $token;
    }
public static function factory($type = null, $text = null, $length = null, $value = null)
    {
        $token = new static();
        if (null !== $type) {
            $token->setType($type);
        }
        if (null !== $text) {
            $token->setText($text);
        }
        if (null !== $length) {
            $token->setLength($length);
        }
        if (null !== $value) {
            $token->setValue($value);
        }
        return $token;
    }
public static function factory ( $ type = null , $ text = null , $ length = null , $ value = null ) { $ token = new static ( ) ; if ( null !== $ type ) { $ token -> setType ( $ type ) ; } if ( null !== $ text ) { $ token -> setText ( $ text ) ; } if ( null !== $ length ) { $ token -> setLength ( $ length ) ; } if ( null !== $ value ) { $ token -> setValue ( $ value ) ; } return $ token ; }
Creates object instance.

@param int|null $type
@param string|null $text
@param int|null $length
@param string|null $value
@return static
Creates object instance .