{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "core/aggregators/catalog.aggregator.ts",
          "name": "tallyBy",
          "source": {
            "href": "https://banes-lab.com/anatomy/quality#file-quality-core-aggregators-catalog-aggregator-ts",
            "json": "https://banes-lab.com/json/source/quality/core/aggregators/catalog.aggregator.ts",
            "label": "core/aggregators/catalog.aggregator.ts",
            "markdown": "https://banes-lab.com/source/quality/core/aggregators/catalog.aggregator.ts.md",
            "ref": "anatomy:file-quality-core-aggregators-catalog-aggregator-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 35,
      "name": "produce",
      "signature": "const produce = async function produce(): Promise<CatalogProduct[]> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 8,
      "name": "TOOL",
      "signature": "const TOOL = \"phpcs\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 9,
      "name": "STANDARDS",
      "signature": "const STANDARDS = \"PEAR,PSR1,PSR2,PSR12,Squiz,Zend,Generic\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 10,
      "name": "MIN_SEGS",
      "signature": "const MIN_SEGS = 3;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 11,
      "name": "SKIP_MARKERS",
      "signature": "const SKIP_MARKERS = [\"(\", \"---\", \"contains\"];"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 13,
      "name": "ruleOf",
      "signature": "const ruleOf = function ruleOf(line: string, version: string): CatalogRule[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 14,
      "name": "text",
      "signature": "const text = line.trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 15,
      "name": "segs",
      "signature": "const segs = text.split(\".\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 36,
      "name": "version",
      "signature": "const version = commandVersion(TOOL, [\"--version\"]);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 37,
      "name": "lines",
      "signature": "const lines = commandOutput(TOOL, [\"-e\", `--standard=${STANDARDS}`]).split(\"\\n\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 38,
      "name": "rules",
      "signature": "const rules = distinctRules(lines.flatMap((line) => ruleOf(line, version))).toSorted(byRuleId);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-phpcs-producer-ts",
  "language": "typescript",
  "layer": "application",
  "name": "tool.phpcs.producer.ts",
  "path": "core/producers/tool.phpcs.producer.ts",
  "ref": "anatomy:file-quality-core-producers-tool-phpcs-producer-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#folder-quality-core-producers",
          "json": "https://banes-lab.com/json/anatomy/quality/folder-quality-core-producers",
          "label": "core/producers",
          "markdown": "https://banes-lab.com/anatomy/quality/folder-quality-core-producers.md",
          "ref": "chapter:/anatomy/quality#folder-quality-core-producers"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#file-quality-core-aggregators-catalog-aggregator-ts",
          "json": "https://banes-lab.com/json/source/quality/core/aggregators/catalog.aggregator.ts",
          "label": "core/aggregators/catalog.aggregator.ts",
          "markdown": "https://banes-lab.com/source/quality/core/aggregators/catalog.aggregator.ts.md",
          "ref": "anatomy:file-quality-core-aggregators-catalog-aggregator-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#folder-quality-core-aggregators",
          "json": "https://banes-lab.com/json/anatomy/quality/folder-quality-core-aggregators",
          "label": "core/aggregators",
          "markdown": "https://banes-lab.com/anatomy/quality/folder-quality-core-aggregators.md",
          "ref": "chapter:/anatomy/quality#folder-quality-core-aggregators"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "producer",
    "subject": "tool",
    "variant": "phpcs"
  },
  "stats": {
    "bytes": 1766,
    "callable": 2,
    "definitions": 11,
    "edges": 1,
    "exported": 0,
    "files": 1,
    "findings": {},
    "flows": {
      "entry": 1,
      "isolated": 10
    },
    "lines": {
      "blank": 4,
      "code": 44,
      "total": 48
    }
  },
  "summary": "44 lines of code and 11 definitions.",
  "text": "https://banes-lab.com/source/quality/core/producers/tool.phpcs.producer.ts.txt",
  "tree": "quality",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-phpmd-producer-ts",
      "json": "https://banes-lab.com/json/source/quality/core/producers/tool.phpmd.producer.ts",
      "label": "core/producers/tool.phpmd.producer.ts",
      "markdown": "https://banes-lab.com/source/quality/core/producers/tool.phpmd.producer.ts.md",
      "ref": "anatomy:file-quality-core-producers-tool-phpmd-producer-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-oxlint-producer-ts",
      "json": "https://banes-lab.com/json/source/quality/core/producers/tool.oxlint.producer.ts",
      "label": "core/producers/tool.oxlint.producer.ts",
      "markdown": "https://banes-lab.com/source/quality/core/producers/tool.oxlint.producer.ts.md",
      "ref": "anatomy:file-quality-core-producers-tool-oxlint-producer-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/quality/core/producers",
    "label": "core/producers",
    "markdown": "https://banes-lab.com/api/source/quality/core/producers.md",
    "ref": "api:source/quality/core/producers"
  }
}
