A php swagger annotation and parsing library
This report presents the forensic synthetic code analysis of zircote/swagger-php, a PHP project with 5,301 GitHub stars. SynthScan v2.0 examined 63,814 lines of code across 855 source files, recording 142 pattern matches distributed across 2 syntactic categories. The overall adjusted score of 2.3 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 142 distinct pattern matches across 2 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/src/Docs/Reference/AttributeGenerator.php | 118 | protected function collectAnnotationsDetails(string $name, string $fqdn, string $filename): array | CODE |
| LOW | tests/SerializerTest.php | 168 | public function testDeserializeAllOfProperty(): void | CODE |
| LOW | tests/SerializerTest.php | 213 | public function testValidAnnotationsListComplete(string $annotation): void | CODE |
| LOW | tests/CompilerTest.php | 344 | public static function defaultAndExampleProvider(): iterable | CODE |
| LOW | tests/CompilerTest.php | 368 | public function testDefaultAndExampleEmitted(OA\Schema $schema, string $key, mixed $expected): void | CODE |
| LOW | tests/CompilerTest.php | 376 | public function testUndefinedDefaultNotEmitted(): void | CODE |
| LOW | tests/CompilerTest.php | 398 | public function testOperationsGroupedByPath(): void | CODE |
| LOW | tests/CompilerTest.php | 415 | public function testSecuritySchemeCompiled(): void | CODE |
| LOW | tests/CompilerTest.php | 522 | public function testDiscriminatorCompiled(): void | CODE |
| LOW | tests/CompilerTest.php | 542 | public function testSecurityWithRequirementDto(): void | CODE |
| LOW | tests/CompilerTest.php | 557 | public function testSecurityWithRawArrayBc(): void | CODE |
| LOW | tests/AnalysisTest.php | 33 | public function testGetAllAncestorClasses(): void | CODE |
| LOW | tests/AnalysisTest.php | 55 | public function testGetDirectAncestorClass(): void | CODE |
| LOW | tests/OpenApiTestCase.php | 130 | public function assertOpenApiLogEntryContains(string $needle, string $message = ''): void | CODE |
| LOW | tests/OpenApiTestCase.php | 265 | protected function annotationsFromDocBlockParser(string $docBlock, array $extraAliases = [], string $version = OA\Op | CODE |
| LOW | tests/AssemblerTest.php | 15 | public function testHierarchyPropertyAbsorbedBySchema(): void | CODE |
| LOW | tests/AssemblerTest.php | 27 | public function testHierarchyPromotedPropertyAbsorbedBySchema(): void | CODE |
| LOW | tests/AssemblerTest.php | 42 | public function testHierarchyMethodParametersAbsorbedByOperation(): void | CODE |
| LOW | tests/AssemblerTest.php | 55 | public function testClassWithoutRootAttributeSkipped(): void | CODE |
| LOW | tests/AssemblerTest.php | 64 | public function testClassConstantAbsorbedBySchema(): void | CODE |
| LOW | tests/AssemblerTest.php | 76 | public function testParameterOnClassWithoutPathItemThrows(): void | CODE |
| LOW | tests/AssemblerTest.php | 85 | public function testSecurityRequirementOnClassWithoutPathItemThrows(): void | CODE |
| LOW | tests/BuilderTest.php | 38 | public function testBuildMatchesGenerator(): void | CODE |
| LOW | tests/BuilderTest.php | 123 | public function testBuildCollectsWarnings(): void | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 51 | public static function prefixCompositionProvider(): \Generator | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 89 | public function testTagsClonedToOperations(array $classes, array $expectedTags): void | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 98 | public function testSecurityClonedToOperations(): void | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 112 | public function testExplicitTagsMergedAdditively(): void | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 140 | public function testPathItemWithSummaryGetsPath(): void | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 163 | public function testSharedResponsesCloned(): void | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 187 | public function testSharedParametersEmittedAtPathLevel(): void | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 201 | public function testSharedResponseNotOverriddenWhenCodeExists(): void | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 213 | public function testReusablePathItemNoPath(): void | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 227 | public function testRefPathItemGetsPathFromOperations(): void | CODE |
| LOW | tests/Augmenter/PathItemResolveTest.php | 239 | public function testPrefixOnlyPathItemNoPathSet(): void | CODE |
| LOW | tests/Augmenter/ExpandHierarchyTest.php | 19 | public function testAllSchemasMatchExpected(): void | CODE |
| LOW | tests/Augmenter/EnumsTest.php | 32 | public function testBackedEnumWithoutTypeUsesNames(): void | CODE |
| LOW | tests/Augmenter/EnumsTest.php | 44 | public function testBackedEnumWithMatchingTypeUsesValues(): void | CODE |
| LOW | tests/Augmenter/EnumsTest.php | 66 | public function testEnumNamesNotSetForNameMode(): void | CODE |
| LOW | tests/Augmenter/EnumsTest.php | 76 | public function testResolvesEnumInstancesInValues(): void | CODE |
| LOW | tests/Augmenter/EnumsTest.php | 90 | public function testResolvesBackedEnumInstancesInValues(): void | CODE |
| LOW | tests/Augmenter/EnumsTest.php | 104 | public function testResolvesEnumClassStringInValues(): void | CODE |
| LOW | tests/Augmenter/EnumsTest.php | 118 | public function testPreservesExplicitSchemaName(): void | CODE |
| LOW | tests/Augmenter/CleanUnusedTest.php | 16 | public function testRemovesUnreferencedSchema(): void | CODE |
| LOW | tests/Augmenter/CleanUnusedTest.php | 37 | public function testKeepsReferencedSchemaInProperty(): void | CODE |
| LOW | tests/Augmenter/CleanUnusedTest.php | 59 | public function testRemovesNestedDependencies(): void | CODE |
| LOW | tests/Augmenter/CleanUnusedTest.php | 94 | public function testKeepsSchemaReferencedViaAllOf(): void | CODE |
| LOW | tests/Augmenter/CleanUnusedTest.php | 116 | public function testRemovesUnusedResponse(): void | CODE |
| LOW | tests/Augmenter/CleanUnusedTest.php | 133 | public function testKeepsSecuritySchemeReferencedByOperation(): void | CODE |
| LOW | tests/Augmenter/CleanUnusedTest.php | 152 | public function testKeepsSecuritySchemeReferencedGlobally(): void | CODE |
| LOW | tests/Augmenter/CleanUnusedPerformanceTest.php | 49 | public function testCleanupRemovesExpectedSchemas(): void | CODE |
| LOW | tests/Augmenter/RefTest.php | 20 | public function testResolvesFqcnToComponentPath(): void | CODE |
| LOW | tests/Augmenter/RefTest.php | 33 | public function testLeavesAlreadyResolvedUntouched(): void | CODE |
| LOW | tests/Augmenter/RefTest.php | 52 | public function testResolvesDiscriminatorMapping(): void | CODE |
| LOW | tests/Augmenter/DocblockTest.php | 18 | public function testAugmentsOperationSummaryAndDescription(): void | CODE |
| LOW | tests/Augmenter/DocblockTest.php | 37 | public function testAugmentsSchemaDescription(): void | CODE |
| LOW | tests/Augmenter/DocblockTest.php | 47 | public function testAugmentsParameterDescription(): void | CODE |
| LOW | tests/Augmenter/TypeTest.php | 42 | public function testInfersParameterSchema(): void | CODE |
| LOW | tests/Augmenter/TypeTest.php | 76 | public function testResolvesRefFromObjectType(): void | CODE |
| LOW⚡ | tests/Augmenter/InferNamesTest.php | 20 | public function testInfersSchemaNameFromClass(): void | CODE |
| 79 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ors/schema-query-parameter/schema-query-parameter.yaml | 44 | example: 'Lorem ipsum' | CODE |
| LOW | …ors/schema-query-parameter/schema-query-parameter.yaml | 67 | example: 'Lorem ipsum' | CODE |
| LOW | …ples/processors/schema-query-parameter/app/Product.php | 25 | example: 'Lorem ipsum', | CODE |