A REPL for PHP
This report summarizes scanner evidence for bobthecow/psysh, a PHP project with 9,830 GitHub stars. SynthScan examined 114,774 lines of code across 703 source files, recording 1602 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 14.2 (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? 1599 finding(s).
Are imports declared and package/API names verified? 2 finding(s).
Are wrappers, guards, and repeated structures necessary? 1586 finding(s).
Which changes need focused human review? 1602 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 1602 distinct pattern matches across 8 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 | test/ShellRuntimeConfigTest.php | 35 | public function testApplyRuntimeConfigChangeUpdatesOutputStateImmediately() | CODE |
| LOW | test/ShellRuntimeConfigTest.php | 57 | public function testApplyRuntimeConfigChangePersistsVerbosityForNextPrompt() | CODE |
| LOW | test/ShellRuntimeConfigTest.php | 99 | public function testApplyRuntimeConfigChangeSwapsPagerImmediately() | CODE |
| LOW | test/ShellRuntimeConfigTest.php | 115 | public function testApplyRuntimeConfigChangeRefreshesInteractiveReadline() | CODE |
| LOW | test/ShellRuntimeConfigTest.php | 154 | public function testUseUnicodeIsReadFromConfigWithoutRestart() | CODE |
| LOW⚡ | test/CodeCleanerResolveClassNameTest.php | 25 | public function testResolveFullyQualifiedName() | CODE |
| LOW⚡ | test/CodeCleanerResolveClassNameTest.php | 31 | public function testResolveWithExplicitUse() | CODE |
| LOW⚡ | test/CodeCleanerResolveClassNameTest.php | 38 | public function testResolveWithImplicitUse() | CODE |
| LOW | test/CodeCleanerResolveClassNameTest.php | 84 | public function testResolveClassNameWhenFunctionImportUsesSameAlias() | CODE |
| LOW | test/ProjectTrustTest.php | 73 | public function testSetModeFromEnvInvalid() | CODE |
| LOW | test/ProjectTrustTest.php | 82 | public function testForceTrustClearsForceUntrust() | CODE |
| LOW | test/ProjectTrustTest.php | 93 | public function testForceUntrustClearsForceTrust() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 104 | public function testGetProjectTrustStatusForceUntrust() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 111 | public function testGetProjectTrustStatusNeverMode() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 118 | public function testGetProjectTrustStatusForceTrust() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 125 | public function testGetProjectTrustStatusAlwaysMode() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 132 | public function testGetProjectTrustStatusPromptReturnsNull() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 138 | public function testIsProjectTrustedWithAlwaysMode() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 145 | public function testIsProjectTrustedWithNeverMode() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 152 | public function testIsProjectTrustedWithForceTrust() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 159 | public function testIsProjectTrustedWithForceUntrust() | CODE |
| LOW | test/ProjectTrustTest.php | 199 | public function testHasComposerAutoloadFiles() | CODE |
| LOW | test/ProjectTrustTest.php | 214 | public function testGetLocalPsyshProjectRoot() | CODE |
| LOW | test/ProjectTrustTest.php | 230 | public function testTrustPersistenceAndRetrieval() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 265 | public function testShouldPromptForLocalPsyshBinaryDefaultsFalse() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 274 | public function testShouldPromptForLocalPsyshBinaryUsesServerVar() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 284 | public function testShouldPromptForLocalPsyshBinaryUsesEnvironmentVar() | CODE |
| LOW⚡ | test/ProjectTrustTest.php | 294 | public function testGetLocalPsyshProjectRootFallsBackToEnvironmentVar() | CODE |
| LOW | test/SystemEnvTest.php | 18 | public function testGetReturnsServerValueWhenSet() | CODE |
| LOW | test/SystemEnvTest.php | 35 | public function testGetReturnsEnvValueWhenServerNotSet() | CODE |
| LOW | test/SystemEnvTest.php | 51 | public function testGetReturnsNullWhenNotSet() | CODE |
| LOW | test/SystemEnvTest.php | 62 | public function testGetPrefersServerOverEnv() | CODE |
| LOW | test/SystemEnvTest.php | 78 | public function testGetIgnoresEmptyServerValue() | CODE |
| LOW | test/ShellTest.php | 85 | public function testUnknownScopeVariablesThrowExceptions() | CODE |
| LOW | test/ShellTest.php | 96 | public function testIncludesWithScopeVariables() | CODE |
| LOW | test/ShellTest.php | 127 | public function testExecuteLoadsIncludesOnlyOnceAcrossNestedExecutions() | CODE |
| LOW | test/ShellTest.php | 152 | public function testRunDoesNotReloadIncludesForNestedCommands() | CODE |
| LOW | test/ShellTest.php | 181 | public function testIncludesLoadOnlyOnceWhenEvaluatedCodeReentersRun() | CODE |
| LOW | test/ShellTest.php | 210 | public function testIncludesContinueAfterThrowable() | CODE |
| LOW | test/ShellTest.php | 261 | public function testIncludesRestoreErrorHandlerAfterFailure() | CODE |
| LOW | test/ShellTest.php | 378 | public function testNonInteractiveDoesNotUpdateContext() | CODE |
| LOW | test/ShellTest.php | 397 | public function testNonInteractiveRawOutput() | CODE |
| LOW | test/ShellTest.php | 467 | public function testAddMatchersViaConfigAfterShell() | CODE |
| LOW | test/ShellTest.php | 479 | public function testReattachingConfigDoesNotReregisterMatchers() | CODE |
| LOW | test/ShellTest.php | 494 | public function testCompletionSourcesViaConfigQueueUntilCompletionEngineInitialization() | CODE |
| LOW | test/ShellTest.php | 646 | public function testLegacyReadlineUsesCompletionEngineThroughAutoCompleter() | CODE |
| LOW | test/ShellTest.php | 736 | public function testDeprecatedDefaultMatchersExtensionPointIsStillAdapted() | CODE |
| LOW | test/ShellTest.php | 789 | public function testBootConfiguresInteractiveReadline() | CODE |
| LOW | test/ShellTest.php | 948 | public function testBootWrapsLegacyReadlineInLegacyShim() | CODE |
| LOW | test/ShellTest.php | 1054 | public function testFormatExceptionStripsExecutionClosurePathsWithDotsInPath() | CODE |
| LOW | test/ShellTest.php | 1071 | public function testGetInputMarksOutputWrittenForCommandOutput() | CODE |
| LOW | test/ShellTest.php | 1098 | public function testGetInputLeavesOutputWrittenFalseWhenCommandDoesNotWriteOutput() | CODE |
| LOW | test/ShellTest.php | 1123 | public function testLegacyReadlineAddsSpacerAfterInputBeforeReturnValueInNonCompactMode() | CODE |
| LOW | test/ShellTest.php | 1143 | public function testLegacyReadlineAddsSpacerAroundCommandOutputInNonCompactMode() | CODE |
| LOW | test/ShellTest.php | 1173 | public function testLegacyReadlineDoesNotAddExtraSpacerBeforeReturnValueInCompactMode() | CODE |
| LOW | test/ShellTest.php | 1193 | public function testGetInputMarksOutputWrittenForShellOutputEvenWhenStreamPositionDoesNotAdvance() | CODE |
| LOW | test/ShellTest.php | 1214 | public function testGetInputMarksOutputWrittenForShellOutputErrorStreamWrites() | CODE |
| LOW | test/ShellTest.php | 1239 | public function testGetInputIgnoresSuppressedShellOutputWrites() | CODE |
| LOW | test/ShellTest.php | 1260 | public function testGetInputMarksOutputWrittenForDirectShellOutputStreamWrites() | CODE |
| LOW | test/ShellTest.php | 1285 | public function testShellOutputTracksVisibleWrites() | CODE |
| 1525 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/smoketest-pty.sh | 3 | # This file is part of Psy Shell. | COMMENT |
| MEDIUM | test/test-env.sh | 3 | # This file is part of Psy Shell. | COMMENT |
| MEDIUM | test/smoketest.sh | 3 | # This file is part of Psy Shell. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .phan/config.php | 21 | 'vendor/symfony/var-dumper/', | COMMENT |
| LOW | .phan/baseline-current-issues.php | 21 | // PhanDeprecatedFunction : 5 occurrences | COMMENT |
| LOW | test/smoketest-pty.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | test/smoketest.sh | 1 | #!/bin/bash | COMMENT |
| LOW | test/smoketest.sh | 21 | # test/smoketest.sh path/to/psysh.phar # Test a specific PHAR | COMMENT |
| LOW | …xtures/autoload-warmer-vendor/composer/ClassLoader.php | 21 | COMMENT | |
| LOW | src/Output/OutputPager.php | 21 | { | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/smoketest-pty.sh | 18 | # Usage: | COMMENT |
| LOW | test/smoketest.sh | 17 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/Fixtures/Completion/Address.php | 16 | public string $street = '123 Main St'; | CODE |
| LOW | test/Fixtures/Completion/User.php | 30 | return 'John Doe'; | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/smoketest.sh | 383 | # Check if the target exists (resolve relative paths first) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/CodeCleaner/PassableByReferencePass.php | 69 | // Named arguments were added in php-parser 4.1, so we need to check if the property exists | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/tools/vis.py | 44 | __all__ = [ | CODE |