diff --git a/class-diagram.md b/class-diagram.md new file mode 100644 index 00000000..c46f6acc --- /dev/null +++ b/class-diagram.md @@ -0,0 +1,131 @@ +```mermaid +classDiagram + class Renderable { + <> + } + class DeclarationBlock { + } + class RuleSet { + <> + } + class AtRuleSet { + } + class KeyframeSelector { + } + class AtRule { + <> + } + class Charset { + } + class Import { + } + class Selector { + } + class CSSNamespace { + } + class Settings { + } + class Rule { + } + class Parser { + } + class OutputFormatter { + } + class OutputFormat { + } + class OutputException { + } + class UnexpectedEOFException { + } + class SourceException { + } + class UnexpectedTokenException { + } + class ParserState { + } + class Anchor { + } + class CSSBlockList { + <> + } + class Document { + } + class CSSList { + <> + } + class KeyFrame { + } + class AtRuleBlockList { + } + class Color { + } + class URL { + } + class CalcRuleValueList { + } + class ValueList { + <> + } + class CalcFunction { + } + class LineName { + } + class Value { + <> + } + class Size { + } + class CSSString { + } + class PrimitiveValue { + <> + } + class CSSFunction { + } + class RuleValueList { + } + class Commentable { + <> + } + class Comment { + } + + RuleSet <|-- DeclarationBlock: inheritance + Renderable <|.. RuleSet: realization + Commentable <|.. RuleSet: realization + RuleSet <|-- AtRuleSet: inheritance + AtRule <|.. AtRuleSet: realization + Selector <|-- KeyframeSelector: inheritance + Renderable <|-- AtRule: inheritance + Commentable <|-- AtRule: inheritance + AtRule <|.. Charset: realization + AtRule <|.. Import: realization + AtRule <|.. CSSNamespace: realization + Renderable <|.. Rule: realization + Commentable <|.. Rule: realization + SourceException <|-- OutputException: inheritance + UnexpectedTokenException <|-- UnexpectedEOFException: inheritance + Exception <|-- SourceException: inheritance + SourceException <|-- UnexpectedTokenException: inheritance + CSSList <|-- CSSBlockList: inheritance + CSSBlockList <|-- Document: inheritance + Renderable <|.. CSSList: realization + Commentable <|.. CSSList: realization + CSSList <|-- KeyFrame: inheritance + AtRule <|.. KeyFrame: realization + CSSBlockList <|-- AtRuleBlockList: inheritance + AtRule <|.. AtRuleBlockList: realization + CSSFunction <|-- Color: inheritance + PrimitiveValue <|-- URL: inheritance + RuleValueList <|-- CalcRuleValueList: inheritance + Value <|-- ValueList: inheritance + CSSFunction <|-- CalcFunction: inheritance + ValueList <|-- LineName: inheritance + Renderable <|.. Value: realization + PrimitiveValue <|-- Size: inheritance + PrimitiveValue <|-- CSSString: inheritance + Value <|-- PrimitiveValue: inheritance + ValueList <|-- CSSFunction: inheritance + ValueList <|-- RuleValueList: inheritance + Renderable <|.. Comment: realization +``` diff --git a/composer.json b/composer.json index ddc7eb13..4662b79a 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,8 @@ "phpstan/phpstan": "^1.11.11", "phpstan/phpstan-phpunit": "^1.4.0", "phpunit/phpunit": "^8.5.38", - "rector/rector": "^1.2.4" + "rector/rector": "^1.2.4", + "tasuku43/mermaid-class-diagram": "^0.1.0" }, "suggest": { "ext-mbstring": "for parsing UTF-8 CSS"