Doctrine Object Relational Mapper (ORM)
This report presents the forensic synthetic code analysis of doctrine/orm, a PHP project with 10,170 GitHub stars. SynthScan v2.0 examined 176,215 lines of code across 1581 source files, recording 2363 pattern matches distributed across 4 syntactic categories. The overall adjusted score of 13.3 places this repository in the Low AI signal 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 2363 distinct pattern matches across 4 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 | tests/Tests/TestUtil.php | 168 | private static function getPrivilegedConnectionParameters(): array | CODE |
| LOW | tests/Tests/TestUtil.php | 181 | private static function getTestConnectionParameters(): array | CODE |
| LOW⚡ | tests/Tests/OrmTestCase.php | 79 | protected function createTestEntityManagerWithConnection(Connection $connection): EntityManagerMock | CODE |
| LOW⚡ | tests/Tests/OrmTestCase.php | 84 | protected function createTestEntityManagerWithPlatform(AbstractPlatform $platform): EntityManagerMock | CODE |
| LOW⚡ | tests/Tests/OrmTestCase.php | 91 | private function buildTestEntityManagerWithPlatform(Connection $connection): EntityManagerMock | CODE |
| LOW | tests/Tests/OrmTestCase.php | 125 | private static function getSharedMetadataCacheImpl(): CacheItemPoolInterface | CODE |
| LOW | tests/Tests/OrmTestCase.php | 137 | protected function getSharedSecondLevelCache(): CacheItemPoolInterface | CODE |
| LOW | tests/Tests/OrmFunctionalTestCase.php | 503 | final protected function getUpdateSchemaSqlForModels(string ...$models): array | CODE |
| LOW | tests/Tests/Mocks/ArrayResultFactory.php | 20 | public static function createDriverResultFromArray(array $resultSet): ArrayResult | CODE |
| LOW | tests/Tests/Mocks/ArrayResultFactory.php | 35 | public static function createWrapperResultFromArray(array $resultSet, Connection|null $connection = null): Result | CODE |
| LOW | tests/Tests/Mocks/EntityPersisterMock.php | 107 | public function countOfExecuteInsertCalls(): int | CODE |
| LOW | tests/Tests/DbalTypes/UpperCaseStringType.php | 22 | public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform): string | CODE |
| LOW | tests/Tests/DbalTypes/NegativeToPositiveType.php | 30 | public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform): string | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 66 | public function setUpPersistentCollection(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 74 | public function testCanBePutInLazyLoadingMode(): void | CODE |
| LOW⚡ | tests/Tests/ORM/PersistentCollectionTest.php | 85 | public function testCurrentInitializesCollection(): void | CODE |
| LOW⚡ | tests/Tests/ORM/PersistentCollectionTest.php | 94 | public function testKeyInitializesCollection(): void | CODE |
| LOW⚡ | tests/Tests/ORM/PersistentCollectionTest.php | 103 | public function testNextInitializesCollection(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 130 | public function testRemovingElementsAlsoRemovesKeys(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 142 | public function testClearWillAlsoClearKeys(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 150 | public function testClearWillAlsoResetKeyPositions(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 164 | public function testWillKeepNewItemsInDirtyCollectionAfterInitialization(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 197 | public function testWillDeDuplicateNewItemsThatWerePreviouslyPersistedInDirtyCollectionAfterInitialization(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 239 | public function testWillNotMarkCollectionAsDirtyAfterInitializationIfNoElementsWereAdded(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 276 | public function testModifyUOWForDeferredImplicitOwnerOnClear(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 285 | public function testItCanBeSerializedAndUnserializedBack(): void | CODE |
| LOW | tests/Tests/ORM/AbstractQueryTest.php | 17 | public function testItMakesHydrationCacheProfilesAwareOfTheResultCache(): void | CODE |
| LOW | tests/Tests/ORM/AbstractQueryTest.php | 32 | public function testItMakesResultCacheProfilesAwareOfTheResultCache(): void | CODE |
| LOW | tests/Tests/ORM/AbstractQueryTest.php | 46 | public function testSettingTheResultCacheIsPossibleWithoutCallingDeprecatedMethods(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 76 | public function testDeleteWithLimitNotSupported(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 86 | public function testUpdateWithLimitNotSupported(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 131 | public function testSimpleSelectWithFromIndexBy(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 140 | public function testSimpleSelectWithIndexBy(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 182 | public function testComplexInnerJoinWithComparisonCondition(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 196 | public function testComplexInnerJoinWithCompositeCondition(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 213 | public function testComplexInnerJoinWithFuncCondition(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 230 | public function testComplexInnerJoinWithIndexBy(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 273 | public function testMultipleFromWithIndexBy(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 295 | public function testMultipleFromWithMultipleJoin(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 318 | public function testWhereWithUnexpectedNamedArguments(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 363 | public function testComplexAndWhereOrWhereNesting(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 478 | public function testOrderByWithExpression(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 499 | public function testAddOrderByWithExpression(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 525 | public function testAddMultipleSameCriteriaWhere(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 544 | public function testAddCriteriaWhereWithMultipleParametersWithSameField(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 561 | public function testAddCriteriaWhereWithMultipleParametersWithDifferentFields(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 578 | public function testAddCriteriaWhereWithMultipleParametersWithSubpathsAndDifferentProperties(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 595 | public function testAddCriteriaWhereWithMultipleParametersWithSubpathsAndSameProperty(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 627 | public function testAddCriteriaOrderOnJoinAlias(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 659 | public function testAddCriteriaUndefinedLimit(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 791 | public function testWhereInWithStringLiterals(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 805 | public function testWhereInWithObjectLiterals(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 847 | public function testMultipleIsolatedQueryConstruction(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 879 | public function testSelectWithFuncExpression(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 951 | public function testAddCriteriaWhereWithJoinAlias(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 969 | public function testAddCriteriaWhereWithDefaultAndJoinAlias(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 987 | public function testAddCriteriaWhereOnJoinAliasWithDuplicateFields(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 1048 | public function testGetSeveralRootAliases(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 1060 | public function testBCAddJoinWithoutRootAlias(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 1139 | public function testSecondLevelCacheQueryBuilderOptions(): void | CODE |
| 2246 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 24 | $reflection->setValue($author, 'John Doe'); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 26 | self::assertSame('John Doe', $wrappedReflection->getValue($author)); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 27 | self::assertSame('John Doe', $reflection->getValue($author)); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 29 | $reflection->setValue($author, 'John Doe'); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 31 | self::assertSame('John Doe', $wrappedReflection->getValue($author)); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 32 | self::assertSame('John Doe', $reflection->getValue($author)); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 42 | $reflection->setValue($author, 'John Doe'); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 46 | $reflection->setValue($author, 'Jane Doe'); | CODE |
| LOW⚡ | …ORM/Tools/Pagination/LimitSubqueryOutputWalkerTest.php | 21 | $query->setHint('dummy-hint', 'dummy-value'); | CODE |
| LOW⚡ | …ORM/Tools/Pagination/LimitSubqueryOutputWalkerTest.php | 28 | self::assertSame('dummy-value', $walker->getQuery()->getHint('dummy-hint')); | CODE |
| LOW | …s/Tests/ORM/Functional/StandardEntityPersisterTest.php | 34 | $customer->setName('John Doe'); | CODE |
| LOW | tests/Tests/ORM/Functional/QueryParameterTest.php | 26 | $user->name = 'John Doe'; | CODE |
| LOW | tests/Tests/ORM/Functional/QueryParameterTest.php | 29 | $user2->name = 'Jane Doe'; | CODE |
| LOW | tests/Tests/ORM/Functional/QueryParameterTest.php | 55 | self::assertSame([['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/QueryParameterTest.php | 68 | self::assertSame([['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/QueryParameterTest.php | 81 | self::assertSame([['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/QueryParameterTest.php | 94 | self::assertSame([['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/QueryParameterTest.php | 108 | self::assertSame([['name' => 'Jane Doe'], ['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/QueryParameterTest.php | 108 | self::assertSame([['name' => 'Jane Doe'], ['name' => 'John Doe']], $result); | CODE |
| LOW | tests/Tests/ORM/Functional/QueryParameterTest.php | 122 | self::assertSame([['name' => 'Jane Doe'], ['name' => 'John Doe']], $result); | CODE |
| LOW | tests/Tests/ORM/Functional/QueryParameterTest.php | 122 | self::assertSame([['name' => 'Jane Doe'], ['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/BasicFunctionalTest.php | 667 | self::assertEquals('Lorem ipsum dolor sunt.', $articleNew->text); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/BasicFunctionalTest.php | 671 | $articleNew->text = 'Lorem ipsum dolor sunt. And stuff!'; | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/BasicFunctionalTest.php | 677 | self::assertEquals('Lorem ipsum dolor sunt. And stuff!', $articleNew->text); | CODE |
| LOW | tests/Tests/ORM/Functional/BasicFunctionalTest.php | 654 | $article->text = 'Lorem ipsum dolor sunt.'; | CODE |
| LOW | tests/Tests/ORM/Functional/BasicFunctionalTest.php | 697 | $article->text = 'Lorem ipsum dolor sunt.'; | CODE |
| LOW | tests/Tests/ORM/Functional/PropertyHooksTest.php | 37 | $user->fullName = 'John Doe'; | CODE |
| LOW | tests/Tests/ORM/Functional/PropertyHooksTest.php | 48 | self::assertEquals('John Doe', $user->fullName); | CODE |
| LOW⚡ | …RM/Functional/OneToOneBidirectionalAssociationTest.php | 28 | $this->customer->setName('John Doe'); | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/GH5762Test.php | 83 | $driver = new GH5762Driver(1, 'John Doe'); | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/DDC211Test.php | 32 | $user->setName('John Doe'); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 32 | $manager->phoneNumber = '555-5555'; | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 42 | self::assertSame('555-5555', $persistedManager->phoneNumber); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 50 | $manager->phoneNumber = '555-5555'; | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 65 | self::assertSame('555-5555', $persistedManager->phoneNumber); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 73 | $manager->phoneNumber = '555-5555'; | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 88 | self::assertSame('555-5555', $persistedManager->phoneNumber); | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/GH7012Test.php | 32 | $user->name = 'John Doe'; | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/DDC3303Test.php | 36 | 'John Doe', | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/DDC3303Test.php | 45 | self::assertEquals($employee, $this->_em->find(DDC3303Employee::class, 'John Doe')); | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/DDC1884Test.php | 96 | $john->setName('John Doe'); | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/DDC1884Test.php | 120 | ->setParameter(1, 'John Doe') | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/DDC1884Test.php | 142 | ->setParameter(1, 'John Doe') | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/DDC1884Test.php | 162 | ->setParameter(1, 'John Doe') | CODE |
| LOW⚡ | …ts/Tests/ORM/Functional/Ticket/GH11386/GH11386Test.php | 27 | $customer->setName('John Doe') | CODE |
| LOW⚡ | …ts/Tests/ORM/Functional/Ticket/GH11386/GH11386Test.php | 37 | self::assertEquals('John Doe', $customer->getName()); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/Tests/Models/Cache/Attraction.php | 21 | #[Table('cache_attraction')] | COMMENT |
| LOW | tests/Tests/Models/DDC117/DDC117Editor.php | 21 | { | COMMENT |
| LOW | tests/Tests/Models/Company/CompanyContract.php | 21 | #[ORM\InheritanceType('SINGLE_TABLE')] | COMMENT |
| LOW | tests/Tests/ORM/Mapping/MappingDriverTestCase.php | 961 | } | COMMENT |
| LOW | tests/Tests/ORM/Functional/Ticket/GH10531Test.php | 121 | #[ORM\Table(name: 'gh10531_a')] | COMMENT |
| LOW | …ts/ORM/Functional/Ticket/GH12225/AbstractDirectory.php | 21 | COMMENT | |
| LOW | src/UnitOfWork.php | 1241 | } | COMMENT |
| LOW | src/Persisters/Entity/BasicEntityPersister.php | 641 | if ($newVal !== null) { | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/Mapping/Driver/DatabaseDriver.php | 503 | // Here we need to check if $fkColumns are the same as $primaryKeys | COMMENT |
| LOW | src/Query/Parser.php | 1433 | // We need to check if we are in a IdentificationVariable or SingleValuedPathExpression | COMMENT |
| LOW | src/Query/Parser.php | 3236 | // We need to check if we are in a IdentificationVariable or SingleValuedPathExpression | COMMENT |