Repository Analysis

Respect/Validation

The most awesome validation engine ever created for PHP

7.6 Low AI signal View on GitHub

Analysis Overview

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).

7.6
Adjusted Score
7.6
Raw Score
100%
Time Factor
2026-07-14
Last Push
6.0K
Stars
PHP
Language
68.5K
Lines of Code
1.2K
Files
452
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 0MEDIUM 0LOW 452

Directory Score Breakdown

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.

Pattern Findings

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.

Hyper-Verbose Identifiers370 hits · 423 pts
SeverityFileLineSnippetContext
LOWtests/Pest.php89function expectMessageAndDeprecation(Closure $callback, string $message, string $error): ClosureCODE
LOWtests/benchmark/CompositeValidatorsBench.php67 public function provideGroupedValidatorBuilder(): GeneratorCODE
LOWtests/benchmark/CompositeValidatorsBench.php81 public function provideArrayBasedValidatorBuilder(): GeneratorCODE
LOWtests/unit/AutowiringLookupTest.php39 public function itShouldCreateRuleByNameFromNamespace(): voidCODE
LOWtests/unit/AutowiringLookupTest.php45 public function itShouldPrependNamespaceWithWithNamespace(): voidCODE
LOWtests/unit/AutowiringLookupTest.php53 public function itShouldPassAllArgumentsToVariadicConstructors(): voidCODE
LOWtests/unit/AutowiringLookupTest.php64 public function itShouldAutowireConstructorDependenciesFromTheContainer(): voidCODE
LOWtests/unit/AutowiringLookupTest.php75 public function itShouldThrowWhenRuleNameCannotBeResolved(): voidCODE
LOWtests/unit/AutowiringLookupTest.php83 public function itShouldThrowWhenInstantiationFails(): voidCODE
LOWtests/unit/ResultTest.php26 public function itShouldUpdateInputWhenWithInputIsCalled(): voidCODE
LOWtests/unit/ResultTest.php41 public function itShouldUpdateAdjacentInputWhenWithInputIsCalled(): voidCODE
LOWtests/unit/ResultTest.php63 public function itShouldUpdateChildrenInputWhenWithInputIsCalledAndChildHasSameInputAndPath(): voidCODE
LOWtests/unit/ResultTest.php88 public function itShouldUpdateChildrenInputWhenWithInputIsCalledAndBothHaveNullPath(): voidCODE
LOWtests/unit/ResultTest.php109 public function itShouldNotUpdateChildrenInputWhenWithInputIsCalledAndChildHasDifferentInput(): voidCODE
LOWtests/unit/ResultTest.php133 public function itShouldUpdateOnlyMatchingChildrenInputWhenWithInputIsCalled(): voidCODE
LOWtests/unit/ResultTest.php164 public function itShouldNotUpdateChildrenInputWhenWithInputIsCalledAndChildHasDifferentPath(): voidCODE
LOWtests/unit/ResultTest.php187 public function itShouldUpdateInputAdjacentAndChildrenWithSameInputWhenWithInputIsCalled(): voidCODE
LOWtests/unit/ResultTest.php219 public function itShouldUpdateNestedChildrenInputWhenWithInputIsCalled(): voidCODE
LOWtests/unit/ResultTest.php250 public function itShouldNotUpdateNestedChildrenWhenWithInputIsCalledAndGrandchildHasDifferentPath(): voidCODE
LOWtests/unit/ResultTest.php281 public function itShouldUpdateNestedChildrenWhenWithInputIsCalledAndGrandchildHasSameInputAndPath(): voidCODE
LOWtests/unit/ResultTest.php311 public function shouldCreateIndeterminateResult(): voidCODE
LOWtests/unit/ResultQueryTest.php30 public function itShouldReturnTrueWhenResultHasPassed(): voidCODE
LOWtests/unit/ResultQueryTest.php40 public function itShouldReturnFalseWhenResultHasNotPassed(): voidCODE
LOWtests/unit/ResultQueryTest.php50 public function itShouldReturnEmptyMessageWhenResultHasPassed(): voidCODE
LOWtests/unit/ResultQueryTest.php60 public function itShouldReturnFormattedMessageWhenResultHasNotPassed(): voidCODE
LOWtests/unit/ResultQueryTest.php73 public function itShouldReturnEmptyFullMessageWhenResultHasPassed(): voidCODE
LOWtests/unit/ResultQueryTest.php83 public function itShouldReturnFormattedFullMessageWhenResultHasNotPassed(): voidCODE
LOWtests/unit/ResultQueryTest.php96 public function itShouldReturnEmptyArrayWhenResultHasPassed(): voidCODE
LOWtests/unit/ResultQueryTest.php106 public function itShouldReturnFormattedArrayWhenResultHasNotPassed(): voidCODE
LOWtests/unit/ResultQueryTest.php119 public function itShouldConvertToStringUsingMessage(): voidCODE
LOWtests/unit/ResultQueryTest.php132 public function itShouldConvertToEmptyStringWhenResultHasPassed(): voidCODE
LOWtests/unit/ResultQueryTest.php142 public function itShouldFindByIdWhenIdMatchesCurrentResult(): voidCODE
LOWtests/unit/ResultQueryTest.php162 public function itShouldFindByIdInDirectChildren(): voidCODE
LOWtests/unit/ResultQueryTest.php188 public function itShouldFindByIdInNestedChildren(): voidCODE
LOWtests/unit/ResultQueryTest.php220 public function itShouldReturnNullWhenIdNotFound(): voidCODE
LOWtests/unit/ResultQueryTest.php232 public function itShouldReturnNullWhenFindByIdOnResultWithNoChildren(): voidCODE
LOWtests/unit/ResultQueryTest.php244 public function itShouldFindByNameWhenNameMatchesCurrentResult(): voidCODE
LOWtests/unit/ResultQueryTest.php264 public function itShouldFindByNameInDirectChildren(): voidCODE
LOWtests/unit/ResultQueryTest.php290 public function itShouldFindByNameInNestedChildren(): voidCODE
LOWtests/unit/ResultQueryTest.php322 public function itShouldReturnNullWhenNameNotFound(): voidCODE
LOWtests/unit/ResultQueryTest.php334 public function itShouldReturnNullWhenFindByNameOnResultWithNoName(): voidCODE
LOWtests/unit/ResultQueryTest.php344 public function itShouldFindByPathWhenPathMatchesCurrentResult(): voidCODE
LOWtests/unit/ResultQueryTest.php364 public function itShouldFindByPathInDirectChildren(): voidCODE
LOWtests/unit/ResultQueryTest.php390 public function itShouldFindByDottedPathInNestedChildren(): voidCODE
LOWtests/unit/ResultQueryTest.php421 public function itShouldFindByIntegerPath(): voidCODE
LOWtests/unit/ResultQueryTest.php446 public function itShouldReturnNullWhenPathNotFound(): voidCODE
LOWtests/unit/ResultQueryTest.php458 public function itShouldReturnNullWhenFindByPathOnResultWithNoPath(): voidCODE
LOWtests/unit/ResultQueryTest.php468 public function itShouldReturnNullWhenDottedPathPartiallyMatches(): voidCODE
LOWtests/unit/ResultQueryTest.php487 public function itShouldReturnNullWhenChildPathDoesNotMatch(): voidCODE
LOWtests/unit/ResultQueryTest.php505 public function itShouldPreserveFormattingCapabilitiesAfterFindById(): voidCODE
LOWtests/unit/ResultQueryTest.php538 public function itShouldPreserveFormattingCapabilitiesAfterFindByName(): voidCODE
LOWtests/unit/ResultQueryTest.php568 public function itShouldPreserveFormattingCapabilitiesAfterFindByPath(): voidCODE
LOWtests/unit/ResultQueryTest.php593 public function itShouldFindByPathWithWildcard(): voidCODE
LOWtests/unit/ResultQueryTest.php620 public function itShouldFindByPathWithWildcardAtEnd(): voidCODE
LOWtests/unit/ResultQueryTest.php645 public function itShouldReturnNullWhenPathWithWildcardDoesNotMatch(): voidCODE
LOWtests/unit/ResultQueryTest.php662 public function itShouldReturnNullWhenPathLengthDoesNotMatch(): voidCODE
LOWtests/unit/ValidatorBuilderTest.php32 public function invalidRuleClassShouldThrowComponentException(): voidCODE
LOWtests/unit/ValidatorBuilderTest.php41 public function shouldReturnValidatorInstanceWhenTheNotRuleIsCalledWithArguments(): voidCODE
LOWtests/unit/ValidatorBuilderTest.php50 public function itShouldProxyResultWithTheIsValidMethod(): voidCODE
LOWtests/unit/ValidatorBuilderTest.php59 public function itShouldAssertAndNotThrowAnExceptionWhenValidatorPasses(): voidCODE
310 more matches not shown…
Fake / Example Data80 hits · 92 pts
SeverityFileLineSnippetContext
LOWtests/unit/Validators/ContainsAnyTest.php54 [new ContainsAny(['word', '@', '/']), 'lorem ipsum'],CODE
LOWtests/unit/Validators/EmailTest.php57 [$sut, 'test@test.com'],CODE
LOWtests/unit/Validators/PhoneTest.php101 ['555-5555'],CODE
LOWtests/unit/Validators/AttributesTest.php74 'John Doe',CODE
LOWtests/unit/Validators/AttributesTest.php81 'Only required' => [new WithAttributes('Jane Doe', '2017-11-30', 'janedoe@yahoo.com')],CODE
LOWtests/unit/Validators/AttributesTest.php89 [new WithAttributes('Jane Doe', '2017-11-30')],CODE
LOWtests/unit/Validators/AttributesTest.php92 [new WithAttributes('John Doe', '1912-06-23', 'not an email', '+1234567890')],CODE
LOWtests/unit/Validators/AttributesTest.php93 [new WithAttributes('John Doe', 'not a date', 'john.doe@gmail.com', '+1234567890')],CODE
LOWtests/unit/Validators/AttributesTest.php94 [new WithAttributes('John Doe', '1912-06-23', 'john.doe@gmail.com', 'not a phone number')],CODE
LOWtests/unit/Validators/AttributesTest.php101 $validAddress = new NestedAddress('123 Main St', 'Springfield');CODE
LOWtests/unit/Validators/AttributesTest.php102 $input = new WithNestedAttributes('John Doe', $validAddress);CODE
LOWtests/unit/Validators/AttributesTest.php111 $input = new WithNestedAttributes('John Doe', $invalidAddress);CODE
LOWtests/unit/Validators/AttributesTest.php119 $invalidAddress = new NestedAddress('123 Main St', '');CODE
LOWtests/unit/Validators/AttributesTest.php120 $input = new WithNestedAttributes('John Doe', $invalidAddress);CODE
LOWtests/unit/Validators/AttributesTest.php129 $input = new WithNestedWithoutAttributes('John Doe', $nested);CODE
LOWtests/unit/Validators/AttributesTest.php137 $input = new WithNullableNestedAttributes('John Doe', null);CODE
LOWtests/unit/Validators/AttributesTest.php145 $validAddress = new NestedAddress('123 Main St', 'Springfield');CODE
LOWtests/unit/Validators/AttributesTest.php146 $input = new WithNullableNestedAttributes('John Doe', $validAddress);CODE
LOWtests/unit/Validators/AttributesTest.php155 $input = new WithNullableNestedAttributes('John Doe', $invalidAddress);CODE
LOWtests/unit/Validators/AttributesTest.php166 $input = new WithDeeplyNestedAttributes('John Doe', $top);CODE
LOWtests/unit/Validators/AttributesTest.php177 $input = new WithDeeplyNestedAttributes('John Doe', $top);CODE
LOWtests/unit/Validators/AttributesTest.php185 $input = new WithUnionTypeNested('John Doe', '123 Main St');CODE
LOWtests/unit/Validators/AttributesTest.php185 $input = new WithUnionTypeNested('John Doe', '123 Main St');CODE
LOWtests/unit/Validators/AttributesTest.php193 $validAddress = new NestedAddress('123 Main St', 'Springfield');CODE
LOWtests/unit/Validators/AttributesTest.php194 $input = new WithUnionTypeNested('John Doe', $validAddress);CODE
LOWtests/unit/Validators/AttributesTest.php203 $input = new WithUnionTypeNested('John Doe', $invalidAddress);CODE
LOWtests/unit/Validators/AttributesTest.php211 $validAddress = new NestedWithAttributes('123 Main St', 'Springfield');CODE
LOWtests/unit/Validators/AttributesTest.php212 $input = new WithIntersectionTypeNested('John Doe', $validAddress);CODE
LOWtests/unit/Validators/AttributesTest.php221 $input = new WithIntersectionTypeNested('John Doe', $invalidAddress);CODE
LOWtests/unit/Validators/AttributesTest.php229 $validAddress = new NestedAddress('123 Main St', 'Springfield');CODE
LOWtests/unit/Validators/AttributesTest.php230 $input = new WithExplicitAttributesOnNested('John Doe', $validAddress);CODE
LOWtests/unit/Validators/AttributesTest.php239 $input = new WithExplicitAttributesOnNested('John Doe', $invalidAddress);CODE
LOWtests/unit/Validators/AttributesTest.php247 $input = new WithAttributesNotLastOnNested(new NestedAddress('123 Main St', 'Springfield'));CODE
LOWtests/unit/Validators/AttributesTest.php258 $input = new WithCyclicAttributes('John Doe', $node);CODE
LOWtests/unit/Validators/AttributesTest.php271 $input = new WithCyclicAttributes('John Doe', $nodeA);CODE
LOWtests/feature/Validators/StartsWithTest.php33 fn() => v::startsWith('Mr.', 'Dr.')->assert('John Doe'),CODE
LOWtests/feature/Validators/StartsWithTest.php34 fn(string $message) => expect($message)->toBe('"John Doe" must start with "Mr." or "Dr."'),CODE
LOWtests/feature/Validators/KeySetTest.php339 'name' => 'John Doe',CODE
LOWtests/feature/Validators/EndsWithTest.php35 fn() => v::endsWith('Mr.', 'Dr.')->assert('John Doe'),CODE
LOWtests/feature/Validators/EndsWithTest.php36 fn(string $message) => expect($message)->toBe('"John Doe" must end with "Mr." or "Dr."'),CODE
LOWtests/feature/Validators/AttributesTest.php30 fn() => v::attributes()->assert(new WithAttributes('John Doe', '2024-06-23', 'john.doe@gmail.com', '+1234567890')),CODE
LOWtests/feature/Validators/AttributesTest.php46 fn() => v::attributes()->assert(new WithAttributes('John Doe', '2024-06-23', 'john.doe@gmail.com', 'not a phone numbCODE
LOWtests/feature/Validators/AttributesTest.php80 fn() => v::attributes()->assert(new WithAttributes('John Doe', '2024-06-23')),CODE
LOWtests/feature/Validators/AttributesTest.php84 - `Respect\Validation\Test\Stubs\WithAttributes { +$name="John Doe" +$birthdate="2024-06-23" #$phone=null +$addrCODE
LOWtests/feature/Validators/AttributesTest.php90 '__root__' => '`Respect\Validation\Test\Stubs\WithAttributes { +$name="John Doe" +$birthdate="2024-06-23CODE
LOWtests/feature/Validators/AttributesTest.php98 fn() => v::attributes()->assert(new WithAttributes('John Doe', '22 years ago', 'john.doe@gmail.com')),CODE
LOWtests/feature/Validators/AttributesTest.php106 fn() => v::attributes()->assert(new WithNestedAttributes('John Doe', new NestedAddress('', 'Springfield'))),CODE
LOWtests/feature/Validators/AttributesTest.php114 fn() => v::attributes()->assert(new WithUnionTypeNested('John Doe', new NestedAddress('', 'Springfield'))),CODE
LOWtests/feature/Validators/AttributesTest.php122 fn() => v::attributes()->assert(new WithIntersectionTypeNested('John Doe', new NestedWithAttributes('', 'SpringfieldCODE
LOWtests/feature/Validators/AttributesTest.php133 v::attributes()->assert(new WithCyclicAttributes('John Doe', $node));CODE
LOWdocs/handling-results.md29$result = v::email()->validate('user@example.com');CODE
LOWdocs/migrating-from-v2-to-v3.md709v::keyExists('email')->assert(['email' => 'user@example.com']); // passesCODE
LOWdocs/migrating-from-v2-to-v3.md833v::nullOrEmail()->assert('user@example.com'); // passesCODE
LOWdocs/migrating-from-v2-to-v3.md844v::keyEmail('email')->assert(['email' => 'user@example.com']); // passesCODE
LOWdocs/validators.md72- [Attributes][] - `v::attributes()->assert(new Person('John Doe', '2020-06-23', 'john.doe@gmail.com'));`CODE
LOWdocs/validators.md86- [Contains][] - `v::contains('ipsum')->assert('lorem ipsum');`CODE
LOWdocs/validators.md87- [ContainsAny][] - `v::containsAny(['lorem', 'dolor'])->assert('lorem ipsum');`CODE
LOWdocs/validators.md88- [ContainsCount][] - `v::containsCount('ipsum', 2)->assert('ipsum lorem ipsum');`CODE
LOWdocs/validators.md106- [EndsWith][] - `v::endsWith('ipsum')->assert('lorem ipsum');`CODE
LOWdocs/validators.md133- [In][] - `v::in('lorem ipsum')->assert('ipsum');`CODE
20 more matches not shown…
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/benchmark/ValidatorBench.php21 /** @param array<Validator, mixed> $params */COMMENT
LOWdocs/validators/Attributes.md61v::attributes()->assert(new Person('John Doe', '2020-06-23'));COMMENT