A tool to automatically fix PHP Coding Standards issues
This report presents the forensic synthetic code analysis of PHP-CS-Fixer/PHP-CS-Fixer, a PHP project with 13,543 GitHub stars. SynthScan v2.0 examined 319,507 lines of code across 1501 source files, recording 1353 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 4.2 places this repository in the Likely human-written 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 1353 distinct pattern matches across 5 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/ToolInfoTest.php | 43 | public function testIsInstalledByComposer(): void | CODE |
| LOW | tests/ToolInfoTest.php | 49 | public function testGetComposerVersionThrowsExceptionIfOutsideComposerScope(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 100 | public function testRegisterBuiltInFixers(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 156 | public function testThatCanRegisterAndGetFixers(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 175 | public function testRegisterFixerWithOccupiedName(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 213 | public function testUseRuleSetWithNonExistingRule(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 229 | public function testUseRuleSetWithInvalidConfigForRule(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 294 | public function testHasRuleWithChangedRuleSet(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 328 | public static function provideConflictingFixersCases(): iterable | CODE |
| LOW | tests/FixerFactoryTest.php | 335 | public function testNoDoubleConflictReporting(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 412 | public function testRegisterFixerInvalidName(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 424 | public function testConfigureNonConfigurableFixer(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 446 | public function testConfigureFixerWithNonArray($value): void | CODE |
| LOW | tests/FixerFactoryTest.php | 456 | public function getConfigurationDefinition(): FixerConfigurationResolverInterface | CODE |
| LOW | tests/FixerFactoryTest.php | 513 | public static function provideConfigureFixerWithNonArrayCases(): iterable | CODE |
| LOW | tests/FixerFactoryTest.php | 524 | public function testConfigurableFixerIsConfigured(): void | CODE |
| LOW | tests/FixerFactoryTest.php | 532 | public function getConfigurationDefinition(): FixerConfigurationResolverInterface | CODE |
| LOW | tests/FileRemovalTest.php | 57 | public function testCleanRemovesObservedFiles(): void | CODE |
| LOW | tests/FileRemovalTest.php | 73 | public function testDestructRemovesObservedFiles(): void | CODE |
| LOW | tests/FileRemovalTest.php | 104 | public function testDeleteNonObservedFile(): void | CODE |
| LOW | tests/FileRemovalTest.php | 145 | public function testShutdownRemovesObservedFilesSetup(): void | CODE |
| LOW | tests/FileRemovalTest.php | 164 | public function testShutdownRemovesObservedFiles(): void | CODE |
| LOW | tests/FutureTest.php | 56 | public function testTriggerDeprecationWhenFutureModeIsOff(): void | CODE |
| LOW | tests/FutureTest.php | 69 | public function testTriggerDeprecationWhenFutureModeIsOn(): void | CODE |
| LOW | tests/AbstractDoctrineAnnotationFixerTestCase.php | 40 | public function testConfigureWithInvalidConfiguration(array $configuration): void | CODE |
| LOW | tests/AbstractDoctrineAnnotationFixerTestCase.php | 50 | public static function provideConfigureWithInvalidConfigurationCases(): iterable | CODE |
| LOW | tests/UtilsTest.php | 48 | public function testCamelCaseToUnderscore(string $expected, ?string $input = null): void | CODE |
| LOW | tests/UtilsTest.php | 60 | public static function provideCamelCaseToUnderscoreCases(): iterable | CODE |
| LOW | tests/UtilsTest.php | 133 | public function testCalculateTrailingWhitespaceIndent(string $spaces, $input): void | CODE |
| LOW | tests/UtilsTest.php | 143 | public static function provideCalculateTrailingWhitespaceIndentCases(): iterable | CODE |
| LOW | tests/UtilsTest.php | 158 | public function testCalculateTrailingWhitespaceIndentFail(): void | CODE |
| LOW | tests/UtilsTest.php | 248 | public function testNaturalLanguageJoinThrowsInvalidArgumentExceptionForEmptyArray(): void | CODE |
| LOW | tests/UtilsTest.php | 256 | public function testNaturalLanguageJoinThrowsInvalidArgumentExceptionForMoreThanOneCharWrapper(): void | CODE |
| LOW | tests/UtilsTest.php | 278 | public static function provideNaturalLanguageJoinCases(): iterable | CODE |
| LOW | tests/UtilsTest.php | 371 | public function testNaturalLanguageJoinWithBackticksThrowsInvalidArgumentExceptionForEmptyArray(): void | CODE |
| LOW | tests/UtilsTest.php | 384 | public function testNaturalLanguageJoinWithBackticks(string $joined, array $names, ?string $lastJoin = null): void | CODE |
| LOW | tests/UtilsTest.php | 392 | public static function provideNaturalLanguageJoinWithBackticksCases(): iterable | CODE |
| LOW | tests/AbstractFunctionReferenceFixerTest.php | 39 | public function testAbstractFunctionReferenceFixer( | CODE |
| LOW | tests/AbstractFunctionReferenceFixerTest.php | 68 | public static function provideAbstractFunctionReferenceFixerCases(): iterable | CODE |
| LOW | tests/AbstractFunctionReferenceFixerTest.php | 135 | private function createAbstractFunctionReferenceFixerDouble(): AbstractFunctionReferenceFixer | CODE |
| LOW | tests/TextDiffTest.php | 44 | public function testDiffReportingDecorated(string $expected, string $format, bool $isDecorated): void | CODE |
| LOW | tests/TextDiffTest.php | 79 | public static function provideDiffReportingDecoratedCases(): iterable | CODE |
| LOW | tests/PregTest.php | 145 | public static function providePatternValidationCases(): iterable | CODE |
| LOW | tests/PregTest.php | 209 | public function testReplaceCallbackFailing(): void | CODE |
| LOW | tests/FileReaderTest.php | 74 | public function testThrowsExceptionOnFail(): void | CODE |
| LOW | tests/AbstractFixerTest.php | 42 | public function testSetWhitespacesConfigUnconfigurable(): void | CODE |
| LOW | tests/AbstractFixerTest.php | 52 | public function testGetWhitespacesFixerConfig(): void | CODE |
| LOW | tests/AbstractFixerTest.php | 71 | private function createWhitespacesAwareFixerDouble(): WhitespacesAwareFixerInterface | CODE |
| LOW | tests/AbstractFixerTest.php | 91 | private function createUnconfigurableFixerDouble(): AbstractFixer | CODE |
| LOW | tests/FinderTest.php | 31 | public function testThatDefaultFinderDoesNotSpecifyAnyDirectory(): void | CODE |
| LOW | tests/FinderTest.php | 40 | public function testThatFinderFindsDotFilesWhenConfigured(): void | CODE |
| LOW | tests/AbstractProxyFixerTest.php | 95 | public function testPriorityMultipleFixersNotSet(): void | CODE |
| LOW | tests/AbstractProxyFixerTest.php | 128 | public function testApplyFixInPriorityOrder(): void | CODE |
| LOW | tests/AbstractProxyFixerTest.php | 204 | private function createWhitespacesAwareFixerDouble(): WhitespacesAwareFixerInterface | CODE |
| LOW | tests/PharCheckerTest.php | 36 | public function testPharCheckerInvalidFile(): void | CODE |
| LOW | tests/TestCase.php | 60 | final public function testNotDefiningConstructor(): void | CODE |
| LOW | tests/TestCase.php | 96 | final protected static function createSerializedStringOfClassName(string $className): string | CODE |
| LOW | tests/IntegrationTest.php | 49 | protected static function createIntegrationCaseFactory(): IntegrationCaseFactoryInterface | CODE |
| LOW | tests/IntegrationTest.php | 54 | protected static function assertRevertedOrderFixing(IntegrationCase $case, string $fixedInputCode, string $fixedInpu | CODE |
| LOW | tests/ConfigTest.php | 59 | public function testConfigRulesUsingSeparateMethod(): void | CODE |
| 1251 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/Fixer/FunctionNotation/ImplodeCallFixerTest.php | 75 | '<?php implode("Lorem ipsum dolor sit amet", $foo);', | CODE |
| LOW⚡ | tests/Fixer/FunctionNotation/ImplodeCallFixerTest.php | 75 | '<?php implode("Lorem ipsum dolor sit amet", $foo);', | CODE |
| LOW⚡ | tests/Fixer/FunctionNotation/ImplodeCallFixerTest.php | 76 | '<?php implode($foo, "Lorem ipsum dolor sit amet");', | CODE |
| LOW⚡ | tests/Fixer/FunctionNotation/ImplodeCallFixerTest.php | 76 | '<?php implode($foo, "Lorem ipsum dolor sit amet");', | CODE |
| LOW⚡ | tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php | 360 | * @param bool $param2 lorem ipsum | COMMENT |
| LOW⚡ | tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php | 361 | * @param string $param3 lorem ipsum | COMMENT |
| LOW⚡ | tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php | 362 | * @return int lorem ipsum | COMMENT |
| LOW⚡ | tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php | 369 | * @param bool $param2 lorem ipsum | COMMENT |
| LOW⚡ | tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php | 370 | * @param string $param3 lorem ipsum | COMMENT |
| LOW⚡ | tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php | 371 | * @return int lorem ipsum | COMMENT |
| LOW | tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php | 1502 | * @property string $bar Foo-Bar lorem ipsum | COMMENT |
| LOW | tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php | 1521 | * @property string $bar Foo-Bar lorem ipsum | COMMENT |
| LOW⚡ | tests/Fixer/Operator/OperatorLinebreakFixerTest.php | 127 | return $foo/* Lorem ipsum */ | CODE |
| LOW⚡ | tests/Fixer/Operator/OperatorLinebreakFixerTest.php | 131 | return $foo ?/* Lorem ipsum */: | CODE |
| LOW⚡ | tests/Fixer/Operator/OperatorLinebreakFixerTest.php | 139 | /* Lorem ipsum */$bar; | COMMENT |
| LOW⚡ | tests/Fixer/Operator/OperatorLinebreakFixerTest.php | 143 | ?/* Lorem ipsum */: $bar; | CODE |
| LOW⚡ | tests/Documentation/RstUtilsTest.php | 35 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | CODE |
| LOW⚡ | tests/Documentation/RstUtilsTest.php | 35 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | CODE |
| LOW⚡ | tests/Documentation/RstUtilsTest.php | 41 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et | CODE |
| LOW⚡ | tests/Documentation/RstUtilsTest.php | 41 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et | CODE |
| LOW | tests/Tokenizer/Analyzer/CommentsAnalyzerTest.php | 503 | * @deprecated Lorem ipsum | COMMENT |
| LOW | src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php | 58 | "<?php if (\$condition): ?>\nLorem ipsum.\n<?php endif; ?>\n", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/Fixer/Comment/NoEmptyCommentFixerTest.php | 201 | // | COMMENT |
| LOW | …sts/Fixer/ReturnNotation/ReturnAssignmentFixerTest.php | 261 | ]; | COMMENT |
| LOW | …Fixer/AttributeNotation/OrderedAttributesFixerTest.php | 121 | #[BarAlias(3)] | COMMENT |
| LOW | …Fixer/AttributeNotation/OrderedAttributesFixerTest.php | 141 | } | COMMENT |
| LOW | …Fixer/AttributeNotation/OrderedAttributesFixerTest.php | 181 | #[BarAlias(3)] | COMMENT |
| LOW | …Fixer/AttributeNotation/OrderedAttributesFixerTest.php | 201 | #[Corge] | COMMENT |
| LOW | …Fixer/AttributeNotation/OrderedAttributesFixerTest.php | 441 | #[ AB\Baz (prop: \'baz\') ] | COMMENT |
| LOW | …tributeNotation/AttributeEmptyParenthesesFixerTest.php | 81 | #[\Bar ] | COMMENT |
| LOW | …tributeNotation/AttributeEmptyParenthesesFixerTest.php | 101 | #[A\B\Qux(prop1: [1, 2, 4], prop2: true, prop3: \'foo bar\')] | COMMENT |
| LOW | …tributeNotation/AttributeEmptyParenthesesFixerTest.php | 201 | #[Baz] | COMMENT |
| LOW | …tributeNotation/AttributeEmptyParenthesesFixerTest.php | 321 | #[\A\B\Foo()] | COMMENT |
| LOW | …tributeNotation/AttributeEmptyParenthesesFixerTest.php | 341 | #[\Bar(), Baz()] | COMMENT |
| LOW | …tributeNotation/AttributeEmptyParenthesesFixerTest.php | 381 | #[A\B\Qux(prop1: [1, 2, 4], prop2: true, prop3: \'foo bar\')] | COMMENT |
| LOW | …tributeNotation/AttributeEmptyParenthesesFixerTest.php | 441 | #[\A\B\Foo()] | COMMENT |
| LOW | …er/Transformer/ConstructorPromotionTransformerTest.php | 101 | COMMENT | |
| LOW | dev-tools/install.sh | 1 | #!/bin/sh | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/Fixer/Whitespace/StatementIndentationFixer.php | 490 | // ^^ we need to check if there is a control group afterwards, and in that case don' | COMMENT |
| LOW | src/Runner/Runner.php | 690 | // We need to check if content was changed and then applied changes. | COMMENT |
| LOW | src/Runner/Runner.php | 693 | // Therefore we need to check if code hashes changed. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …sts/Fixer/ReturnNotation/ReturnAssignmentFixerTest.php | 1274 | # Print the result anyway | COMMENT |