UNPKG

@rightcapital/phpdoc-parser

Version:

TypeScript version of PHPDoc parser with support for intersection types and generics

25 lines (24 loc) 984 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AssertTagMethodValueNode = void 0; const php_doc_tag_value_node_1 = require("./php-doc-tag-value-node"); class AssertTagMethodValueNode extends php_doc_tag_value_node_1.PhpDocTagValueNode { constructor(type, parameter, method, isNegated, description, isEquality = false) { super(); this.type = type; this.parameter = parameter; this.method = method; this.isNegated = isNegated; this.description = description; this.isEquality = isEquality; } toString() { const isNegated = this.isNegated ? '!' : ''; const isEquality = this.isEquality ? '=' : ''; return `${isNegated}${isEquality}${this.type.toString()} ${this.parameter}->${this.method}() ${this.description}`.trim(); } getNodeType() { return 'AssertTagMethodValueNode'; } } exports.AssertTagMethodValueNode = AssertTagMethodValueNode;