The most awesome validation engine ever created for PHP
This report presents the forensic synthetic code analysis of Respect/Validation, a PHP project with 6,031 GitHub stars. SynthScan v2.0 examined 68,460 lines of code across 1234 source files, recording 452 pattern matches distributed across 3 syntactic categories. The overall adjusted score of 7.6 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 452 distinct pattern matches across 3 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/Pest.php | 89 | function expectMessageAndDeprecation(Closure $callback, string $message, string $error): Closure | CODE |
| LOW | tests/benchmark/CompositeValidatorsBench.php | 67 | public function provideGroupedValidatorBuilder(): Generator | CODE |
| LOW | tests/benchmark/CompositeValidatorsBench.php | 81 | public function provideArrayBasedValidatorBuilder(): Generator | CODE |
| LOW⚡ | tests/unit/AutowiringLookupTest.php | 39 | public function itShouldCreateRuleByNameFromNamespace(): void | CODE |
| LOW⚡ | tests/unit/AutowiringLookupTest.php | 45 | public function itShouldPrependNamespaceWithWithNamespace(): void | CODE |
| LOW⚡ | tests/unit/AutowiringLookupTest.php | 53 | public function itShouldPassAllArgumentsToVariadicConstructors(): void | CODE |
| LOW | tests/unit/AutowiringLookupTest.php | 64 | public function itShouldAutowireConstructorDependenciesFromTheContainer(): void | CODE |
| LOW | tests/unit/AutowiringLookupTest.php | 75 | public function itShouldThrowWhenRuleNameCannotBeResolved(): void | CODE |
| LOW | tests/unit/AutowiringLookupTest.php | 83 | public function itShouldThrowWhenInstantiationFails(): void | CODE |
| LOW | tests/unit/ResultTest.php | 26 | public function itShouldUpdateInputWhenWithInputIsCalled(): void | CODE |
| LOW | tests/unit/ResultTest.php | 41 | public function itShouldUpdateAdjacentInputWhenWithInputIsCalled(): void | CODE |
| LOW | tests/unit/ResultTest.php | 63 | public function itShouldUpdateChildrenInputWhenWithInputIsCalledAndChildHasSameInputAndPath(): void | CODE |
| LOW | tests/unit/ResultTest.php | 88 | public function itShouldUpdateChildrenInputWhenWithInputIsCalledAndBothHaveNullPath(): void | CODE |
| LOW | tests/unit/ResultTest.php | 109 | public function itShouldNotUpdateChildrenInputWhenWithInputIsCalledAndChildHasDifferentInput(): void | CODE |
| LOW | tests/unit/ResultTest.php | 133 | public function itShouldUpdateOnlyMatchingChildrenInputWhenWithInputIsCalled(): void | CODE |
| LOW | tests/unit/ResultTest.php | 164 | public function itShouldNotUpdateChildrenInputWhenWithInputIsCalledAndChildHasDifferentPath(): void | CODE |
| LOW | tests/unit/ResultTest.php | 187 | public function itShouldUpdateInputAdjacentAndChildrenWithSameInputWhenWithInputIsCalled(): void | CODE |
| LOW | tests/unit/ResultTest.php | 219 | public function itShouldUpdateNestedChildrenInputWhenWithInputIsCalled(): void | CODE |
| LOW | tests/unit/ResultTest.php | 250 | public function itShouldNotUpdateNestedChildrenWhenWithInputIsCalledAndGrandchildHasDifferentPath(): void | CODE |
| LOW | tests/unit/ResultTest.php | 281 | public function itShouldUpdateNestedChildrenWhenWithInputIsCalledAndGrandchildHasSameInputAndPath(): void | CODE |
| LOW | tests/unit/ResultTest.php | 311 | public function shouldCreateIndeterminateResult(): void | CODE |
| LOW⚡ | tests/unit/ResultQueryTest.php | 30 | public function itShouldReturnTrueWhenResultHasPassed(): void | CODE |
| LOW⚡ | tests/unit/ResultQueryTest.php | 40 | public function itShouldReturnFalseWhenResultHasNotPassed(): void | CODE |
| LOW⚡ | tests/unit/ResultQueryTest.php | 50 | public function itShouldReturnEmptyMessageWhenResultHasPassed(): void | CODE |
| LOW⚡ | tests/unit/ResultQueryTest.php | 60 | public function itShouldReturnFormattedMessageWhenResultHasNotPassed(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 73 | public function itShouldReturnEmptyFullMessageWhenResultHasPassed(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 83 | public function itShouldReturnFormattedFullMessageWhenResultHasNotPassed(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 96 | public function itShouldReturnEmptyArrayWhenResultHasPassed(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 106 | public function itShouldReturnFormattedArrayWhenResultHasNotPassed(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 119 | public function itShouldConvertToStringUsingMessage(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 132 | public function itShouldConvertToEmptyStringWhenResultHasPassed(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 142 | public function itShouldFindByIdWhenIdMatchesCurrentResult(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 162 | public function itShouldFindByIdInDirectChildren(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 188 | public function itShouldFindByIdInNestedChildren(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 220 | public function itShouldReturnNullWhenIdNotFound(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 232 | public function itShouldReturnNullWhenFindByIdOnResultWithNoChildren(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 244 | public function itShouldFindByNameWhenNameMatchesCurrentResult(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 264 | public function itShouldFindByNameInDirectChildren(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 290 | public function itShouldFindByNameInNestedChildren(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 322 | public function itShouldReturnNullWhenNameNotFound(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 334 | public function itShouldReturnNullWhenFindByNameOnResultWithNoName(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 344 | public function itShouldFindByPathWhenPathMatchesCurrentResult(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 364 | public function itShouldFindByPathInDirectChildren(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 390 | public function itShouldFindByDottedPathInNestedChildren(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 421 | public function itShouldFindByIntegerPath(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 446 | public function itShouldReturnNullWhenPathNotFound(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 458 | public function itShouldReturnNullWhenFindByPathOnResultWithNoPath(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 468 | public function itShouldReturnNullWhenDottedPathPartiallyMatches(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 487 | public function itShouldReturnNullWhenChildPathDoesNotMatch(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 505 | public function itShouldPreserveFormattingCapabilitiesAfterFindById(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 538 | public function itShouldPreserveFormattingCapabilitiesAfterFindByName(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 568 | public function itShouldPreserveFormattingCapabilitiesAfterFindByPath(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 593 | public function itShouldFindByPathWithWildcard(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 620 | public function itShouldFindByPathWithWildcardAtEnd(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 645 | public function itShouldReturnNullWhenPathWithWildcardDoesNotMatch(): void | CODE |
| LOW | tests/unit/ResultQueryTest.php | 662 | public function itShouldReturnNullWhenPathLengthDoesNotMatch(): void | CODE |
| LOW⚡ | tests/unit/ValidatorBuilderTest.php | 32 | public function invalidRuleClassShouldThrowComponentException(): void | CODE |
| LOW⚡ | tests/unit/ValidatorBuilderTest.php | 41 | public function shouldReturnValidatorInstanceWhenTheNotRuleIsCalledWithArguments(): void | CODE |
| LOW⚡ | tests/unit/ValidatorBuilderTest.php | 50 | public function itShouldProxyResultWithTheIsValidMethod(): void | CODE |
| LOW⚡ | tests/unit/ValidatorBuilderTest.php | 59 | public function itShouldAssertAndNotThrowAnExceptionWhenValidatorPasses(): void | CODE |
| 310 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/Validators/ContainsAnyTest.php | 54 | [new ContainsAny(['word', '@', '/']), 'lorem ipsum'], | CODE |
| LOW | tests/unit/Validators/EmailTest.php | 57 | [$sut, 'test@test.com'], | CODE |
| LOW | tests/unit/Validators/PhoneTest.php | 101 | ['555-5555'], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 74 | 'John Doe', | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 81 | 'Only required' => [new WithAttributes('Jane Doe', '2017-11-30', 'janedoe@yahoo.com')], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 89 | [new WithAttributes('Jane Doe', '2017-11-30')], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 92 | [new WithAttributes('John Doe', '1912-06-23', 'not an email', '+1234567890')], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 93 | [new WithAttributes('John Doe', 'not a date', 'john.doe@gmail.com', '+1234567890')], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 94 | [new WithAttributes('John Doe', '1912-06-23', 'john.doe@gmail.com', 'not a phone number')], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 101 | $validAddress = new NestedAddress('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 102 | $input = new WithNestedAttributes('John Doe', $validAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 111 | $input = new WithNestedAttributes('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 119 | $invalidAddress = new NestedAddress('123 Main St', ''); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 120 | $input = new WithNestedAttributes('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 129 | $input = new WithNestedWithoutAttributes('John Doe', $nested); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 137 | $input = new WithNullableNestedAttributes('John Doe', null); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 145 | $validAddress = new NestedAddress('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 146 | $input = new WithNullableNestedAttributes('John Doe', $validAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 155 | $input = new WithNullableNestedAttributes('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 166 | $input = new WithDeeplyNestedAttributes('John Doe', $top); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 177 | $input = new WithDeeplyNestedAttributes('John Doe', $top); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 185 | $input = new WithUnionTypeNested('John Doe', '123 Main St'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 185 | $input = new WithUnionTypeNested('John Doe', '123 Main St'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 193 | $validAddress = new NestedAddress('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 194 | $input = new WithUnionTypeNested('John Doe', $validAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 203 | $input = new WithUnionTypeNested('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 211 | $validAddress = new NestedWithAttributes('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 212 | $input = new WithIntersectionTypeNested('John Doe', $validAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 221 | $input = new WithIntersectionTypeNested('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 229 | $validAddress = new NestedAddress('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 230 | $input = new WithExplicitAttributesOnNested('John Doe', $validAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 239 | $input = new WithExplicitAttributesOnNested('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 247 | $input = new WithAttributesNotLastOnNested(new NestedAddress('123 Main St', 'Springfield')); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 258 | $input = new WithCyclicAttributes('John Doe', $node); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 271 | $input = new WithCyclicAttributes('John Doe', $nodeA); | CODE |
| LOW | tests/feature/Validators/StartsWithTest.php | 33 | fn() => v::startsWith('Mr.', 'Dr.')->assert('John Doe'), | CODE |
| LOW | tests/feature/Validators/StartsWithTest.php | 34 | fn(string $message) => expect($message)->toBe('"John Doe" must start with "Mr." or "Dr."'), | CODE |
| LOW | tests/feature/Validators/KeySetTest.php | 339 | 'name' => 'John Doe', | CODE |
| LOW | tests/feature/Validators/EndsWithTest.php | 35 | fn() => v::endsWith('Mr.', 'Dr.')->assert('John Doe'), | CODE |
| LOW | tests/feature/Validators/EndsWithTest.php | 36 | fn(string $message) => expect($message)->toBe('"John Doe" must end with "Mr." or "Dr."'), | CODE |
| LOW | tests/feature/Validators/AttributesTest.php | 30 | fn() => v::attributes()->assert(new WithAttributes('John Doe', '2024-06-23', 'john.doe@gmail.com', '+1234567890')), | CODE |
| LOW | tests/feature/Validators/AttributesTest.php | 46 | fn() => v::attributes()->assert(new WithAttributes('John Doe', '2024-06-23', 'john.doe@gmail.com', 'not a phone numb | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 80 | fn() => v::attributes()->assert(new WithAttributes('John Doe', '2024-06-23')), | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 84 | - `Respect\Validation\Test\Stubs\WithAttributes { +$name="John Doe" +$birthdate="2024-06-23" #$phone=null +$addr | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 90 | '__root__' => '`Respect\Validation\Test\Stubs\WithAttributes { +$name="John Doe" +$birthdate="2024-06-23 | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 98 | fn() => v::attributes()->assert(new WithAttributes('John Doe', '22 years ago', 'john.doe@gmail.com')), | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 106 | fn() => v::attributes()->assert(new WithNestedAttributes('John Doe', new NestedAddress('', 'Springfield'))), | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 114 | fn() => v::attributes()->assert(new WithUnionTypeNested('John Doe', new NestedAddress('', 'Springfield'))), | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 122 | fn() => v::attributes()->assert(new WithIntersectionTypeNested('John Doe', new NestedWithAttributes('', 'Springfield | CODE |
| LOW | tests/feature/Validators/AttributesTest.php | 133 | v::attributes()->assert(new WithCyclicAttributes('John Doe', $node)); | CODE |
| LOW | docs/handling-results.md | 29 | $result = v::email()->validate('user@example.com'); | CODE |
| LOW | docs/migrating-from-v2-to-v3.md | 709 | v::keyExists('email')->assert(['email' => 'user@example.com']); // passes | CODE |
| LOW | docs/migrating-from-v2-to-v3.md | 833 | v::nullOrEmail()->assert('user@example.com'); // passes | CODE |
| LOW | docs/migrating-from-v2-to-v3.md | 844 | v::keyEmail('email')->assert(['email' => 'user@example.com']); // passes | CODE |
| LOW | docs/validators.md | 72 | - [Attributes][] - `v::attributes()->assert(new Person('John Doe', '2020-06-23', 'john.doe@gmail.com'));` | CODE |
| LOW⚡ | docs/validators.md | 86 | - [Contains][] - `v::contains('ipsum')->assert('lorem ipsum');` | CODE |
| LOW⚡ | docs/validators.md | 87 | - [ContainsAny][] - `v::containsAny(['lorem', 'dolor'])->assert('lorem ipsum');` | CODE |
| LOW⚡ | docs/validators.md | 88 | - [ContainsCount][] - `v::containsCount('ipsum', 2)->assert('ipsum lorem ipsum');` | CODE |
| LOW | docs/validators.md | 106 | - [EndsWith][] - `v::endsWith('ipsum')->assert('lorem ipsum');` | CODE |
| LOW | docs/validators.md | 133 | - [In][] - `v::in('lorem ipsum')->assert('ipsum');` | CODE |
| 20 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/benchmark/ValidatorBench.php | 21 | /** @param array<Validator, mixed> $params */ | COMMENT |
| LOW | docs/validators/Attributes.md | 61 | v::attributes()->assert(new Person('John Doe', '2020-06-23')); | COMMENT |