The most awesome validation engine ever created for PHP
This report summarizes scanner evidence for Respect/Validation, a PHP project with 6,031 GitHub stars. SynthScan examined 73,005 lines of code across 1252 source files, recording 481 pattern matches distributed across 3 syntactic categories. The legacy adjusted pattern signal is 7.4 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 395 finding(s).
Are imports declared and package/API names verified? 86 finding(s).
Are wrappers, guards, and repeated structures necessary? 393 finding(s).
Which changes need focused human review? 481 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 481 distinct pattern matches across 3 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| 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 |
| 333 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 | 88 | 'John Doe', | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 95 | 'Only required' => [new WithAttributes('Jane Doe', '2017-11-30', 'janedoe@yahoo.com')], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 103 | [new WithAttributes('Jane Doe', '2017-11-30')], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 106 | [new WithAttributes('John Doe', '1912-06-23', 'not an email', '+1234567890')], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 107 | [new WithAttributes('John Doe', 'not a date', 'john.doe@gmail.com', '+1234567890')], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 108 | [new WithAttributes('John Doe', '1912-06-23', 'john.doe@gmail.com', 'not a phone number')], | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 115 | $validAddress = new NestedAddress('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 116 | $input = new WithNestedAttributes('John Doe', $validAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 125 | $input = new WithNestedAttributes('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 133 | $invalidAddress = new NestedAddress('123 Main St', ''); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 134 | $input = new WithNestedAttributes('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 143 | $input = new WithNestedWithoutAttributes('John Doe', $nested); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 151 | $input = new WithNullableNestedAttributes('John Doe', null); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 159 | $validAddress = new NestedAddress('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 160 | $input = new WithNullableNestedAttributes('John Doe', $validAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 169 | $input = new WithNullableNestedAttributes('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 180 | $input = new WithDeeplyNestedAttributes('John Doe', $top); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 191 | $input = new WithDeeplyNestedAttributes('John Doe', $top); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 199 | $input = new WithUnionTypeNested('John Doe', '123 Main St'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 199 | $input = new WithUnionTypeNested('John Doe', '123 Main St'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 207 | $validAddress = new NestedAddress('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 208 | $input = new WithUnionTypeNested('John Doe', $validAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 217 | $input = new WithUnionTypeNested('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 225 | $input = new WithDnfUnionTypeNested(new NestedAddress('123 Main St', 'Springfield')); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 267 | $validAddress = new NestedWithAttributes('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 268 | $input = new WithIntersectionTypeNested('John Doe', $validAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 277 | $input = new WithIntersectionTypeNested('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 285 | $validAddress = new NestedAddress('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 286 | $input = new WithExplicitAttributesOnNested('John Doe', $validAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 295 | $input = new WithExplicitAttributesOnNested('John Doe', $invalidAddress); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 303 | $input = new WithAttributesNotLastOnNested(new NestedAddress('123 Main St', 'Springfield')); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 311 | $input = new WithWrappedAttributesOnNested(new NestedAddress('123 Main St', 'Springfield')); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 347 | $input = new WithOverlappingUnionTypeNested(new NestedWithAttributes('123 Main St', 'Springfield')); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 355 | $address = new NestedAddress('123 Main St', 'Springfield'); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 364 | $input = new WithNestedAttributes('John Doe', new NestedAddress('123 Main St', 'Springfield')); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 364 | $input = new WithNestedAttributes('John Doe', new NestedAddress('123 Main St', 'Springfield')); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 387 | $input = new WithCyclicAttributes('John Doe', $node); | CODE |
| LOW⚡ | tests/unit/Validators/AttributesTest.php | 400 | $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 | 31 | fn() => v::attributes()->assert(new WithAttributes('John Doe', '2024-06-23', 'john.doe@gmail.com', '+1234567890')), | CODE |
| LOW | tests/feature/Validators/AttributesTest.php | 47 | 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 | 81 | fn() => v::attributes()->assert(new WithAttributes('John Doe', '2024-06-23')), | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 85 | - `Respect\Validation\Test\Stubs\WithAttributes { +$name="John Doe" +$birthdate="2024-06-23" #$phone=null +$addr | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 91 | '__root__' => '`Respect\Validation\Test\Stubs\WithAttributes { +$name="John Doe" +$birthdate="2024-06-23 | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 99 | fn() => v::attributes()->assert(new WithAttributes('John Doe', '22 years ago', 'john.doe@gmail.com')), | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 107 | fn() => v::attributes()->assert(new WithNestedAttributes('John Doe', new NestedAddress('', 'Springfield'))), | CODE |
| LOW⚡ | tests/feature/Validators/AttributesTest.php | 115 | fn() => v::attributes()->assert(new WithUnionTypeNested('John Doe', new NestedAddress('', 'Springfield'))), | CODE |
| LOW | tests/feature/Validators/AttributesTest.php | 131 | fn() => v::attributes()->assert(new WithIntersectionTypeNested('John Doe', new NestedWithAttributes('', 'Springfield | CODE |
| LOW | tests/feature/Validators/AttributesTest.php | 142 | 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 |
| 26 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 |