Repository Analysis

PHP-CS-Fixer/PHP-CS-Fixer

A tool to automatically fix PHP Coding Standards issues

4.2 Likely human-written View on GitHub

Analysis Overview

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

4.2
Adjusted Score
4.2
Raw Score
100%
Time Factor
2026-07-13
Last Push
13.5K
Stars
PHP
Language
319.5K
Lines of Code
1.5K
Files
1.4K
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 1353

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

Hyper-Verbose Identifiers1311 hits · 1289 pts
SeverityFileLineSnippetContext
LOWtests/ToolInfoTest.php43 public function testIsInstalledByComposer(): voidCODE
LOWtests/ToolInfoTest.php49 public function testGetComposerVersionThrowsExceptionIfOutsideComposerScope(): voidCODE
LOWtests/FixerFactoryTest.php100 public function testRegisterBuiltInFixers(): voidCODE
LOWtests/FixerFactoryTest.php156 public function testThatCanRegisterAndGetFixers(): voidCODE
LOWtests/FixerFactoryTest.php175 public function testRegisterFixerWithOccupiedName(): voidCODE
LOWtests/FixerFactoryTest.php213 public function testUseRuleSetWithNonExistingRule(): voidCODE
LOWtests/FixerFactoryTest.php229 public function testUseRuleSetWithInvalidConfigForRule(): voidCODE
LOWtests/FixerFactoryTest.php294 public function testHasRuleWithChangedRuleSet(): voidCODE
LOWtests/FixerFactoryTest.php328 public static function provideConflictingFixersCases(): iterableCODE
LOWtests/FixerFactoryTest.php335 public function testNoDoubleConflictReporting(): voidCODE
LOWtests/FixerFactoryTest.php412 public function testRegisterFixerInvalidName(): voidCODE
LOWtests/FixerFactoryTest.php424 public function testConfigureNonConfigurableFixer(): voidCODE
LOWtests/FixerFactoryTest.php446 public function testConfigureFixerWithNonArray($value): voidCODE
LOWtests/FixerFactoryTest.php456 public function getConfigurationDefinition(): FixerConfigurationResolverInterfaceCODE
LOWtests/FixerFactoryTest.php513 public static function provideConfigureFixerWithNonArrayCases(): iterableCODE
LOWtests/FixerFactoryTest.php524 public function testConfigurableFixerIsConfigured(): voidCODE
LOWtests/FixerFactoryTest.php532 public function getConfigurationDefinition(): FixerConfigurationResolverInterfaceCODE
LOWtests/FileRemovalTest.php57 public function testCleanRemovesObservedFiles(): voidCODE
LOWtests/FileRemovalTest.php73 public function testDestructRemovesObservedFiles(): voidCODE
LOWtests/FileRemovalTest.php104 public function testDeleteNonObservedFile(): voidCODE
LOWtests/FileRemovalTest.php145 public function testShutdownRemovesObservedFilesSetup(): voidCODE
LOWtests/FileRemovalTest.php164 public function testShutdownRemovesObservedFiles(): voidCODE
LOWtests/FutureTest.php56 public function testTriggerDeprecationWhenFutureModeIsOff(): voidCODE
LOWtests/FutureTest.php69 public function testTriggerDeprecationWhenFutureModeIsOn(): voidCODE
LOWtests/AbstractDoctrineAnnotationFixerTestCase.php40 public function testConfigureWithInvalidConfiguration(array $configuration): voidCODE
LOWtests/AbstractDoctrineAnnotationFixerTestCase.php50 public static function provideConfigureWithInvalidConfigurationCases(): iterableCODE
LOWtests/UtilsTest.php48 public function testCamelCaseToUnderscore(string $expected, ?string $input = null): voidCODE
LOWtests/UtilsTest.php60 public static function provideCamelCaseToUnderscoreCases(): iterableCODE
LOWtests/UtilsTest.php133 public function testCalculateTrailingWhitespaceIndent(string $spaces, $input): voidCODE
LOWtests/UtilsTest.php143 public static function provideCalculateTrailingWhitespaceIndentCases(): iterableCODE
LOWtests/UtilsTest.php158 public function testCalculateTrailingWhitespaceIndentFail(): voidCODE
LOWtests/UtilsTest.php248 public function testNaturalLanguageJoinThrowsInvalidArgumentExceptionForEmptyArray(): voidCODE
LOWtests/UtilsTest.php256 public function testNaturalLanguageJoinThrowsInvalidArgumentExceptionForMoreThanOneCharWrapper(): voidCODE
LOWtests/UtilsTest.php278 public static function provideNaturalLanguageJoinCases(): iterableCODE
LOWtests/UtilsTest.php371 public function testNaturalLanguageJoinWithBackticksThrowsInvalidArgumentExceptionForEmptyArray(): voidCODE
LOWtests/UtilsTest.php384 public function testNaturalLanguageJoinWithBackticks(string $joined, array $names, ?string $lastJoin = null): voidCODE
LOWtests/UtilsTest.php392 public static function provideNaturalLanguageJoinWithBackticksCases(): iterableCODE
LOWtests/AbstractFunctionReferenceFixerTest.php39 public function testAbstractFunctionReferenceFixer(CODE
LOWtests/AbstractFunctionReferenceFixerTest.php68 public static function provideAbstractFunctionReferenceFixerCases(): iterableCODE
LOWtests/AbstractFunctionReferenceFixerTest.php135 private function createAbstractFunctionReferenceFixerDouble(): AbstractFunctionReferenceFixerCODE
LOWtests/TextDiffTest.php44 public function testDiffReportingDecorated(string $expected, string $format, bool $isDecorated): voidCODE
LOWtests/TextDiffTest.php79 public static function provideDiffReportingDecoratedCases(): iterableCODE
LOWtests/PregTest.php145 public static function providePatternValidationCases(): iterableCODE
LOWtests/PregTest.php209 public function testReplaceCallbackFailing(): voidCODE
LOWtests/FileReaderTest.php74 public function testThrowsExceptionOnFail(): voidCODE
LOWtests/AbstractFixerTest.php42 public function testSetWhitespacesConfigUnconfigurable(): voidCODE
LOWtests/AbstractFixerTest.php52 public function testGetWhitespacesFixerConfig(): voidCODE
LOWtests/AbstractFixerTest.php71 private function createWhitespacesAwareFixerDouble(): WhitespacesAwareFixerInterfaceCODE
LOWtests/AbstractFixerTest.php91 private function createUnconfigurableFixerDouble(): AbstractFixerCODE
LOWtests/FinderTest.php31 public function testThatDefaultFinderDoesNotSpecifyAnyDirectory(): voidCODE
LOWtests/FinderTest.php40 public function testThatFinderFindsDotFilesWhenConfigured(): voidCODE
LOWtests/AbstractProxyFixerTest.php95 public function testPriorityMultipleFixersNotSet(): voidCODE
LOWtests/AbstractProxyFixerTest.php128 public function testApplyFixInPriorityOrder(): voidCODE
LOWtests/AbstractProxyFixerTest.php204 private function createWhitespacesAwareFixerDouble(): WhitespacesAwareFixerInterfaceCODE
LOWtests/PharCheckerTest.php36 public function testPharCheckerInvalidFile(): voidCODE
LOWtests/TestCase.php60 final public function testNotDefiningConstructor(): voidCODE
LOWtests/TestCase.php96 final protected static function createSerializedStringOfClassName(string $className): stringCODE
LOWtests/IntegrationTest.php49 protected static function createIntegrationCaseFactory(): IntegrationCaseFactoryInterfaceCODE
LOWtests/IntegrationTest.php54 protected static function assertRevertedOrderFixing(IntegrationCase $case, string $fixedInputCode, string $fixedInpuCODE
LOWtests/ConfigTest.php59 public function testConfigRulesUsingSeparateMethod(): voidCODE
1251 more matches not shown…
Fake / Example Data22 hits · 38 pts
SeverityFileLineSnippetContext
LOWtests/Fixer/FunctionNotation/ImplodeCallFixerTest.php75 '<?php implode("Lorem ipsum dolor sit amet", $foo);',CODE
LOWtests/Fixer/FunctionNotation/ImplodeCallFixerTest.php75 '<?php implode("Lorem ipsum dolor sit amet", $foo);',CODE
LOWtests/Fixer/FunctionNotation/ImplodeCallFixerTest.php76 '<?php implode($foo, "Lorem ipsum dolor sit amet");',CODE
LOWtests/Fixer/FunctionNotation/ImplodeCallFixerTest.php76 '<?php implode($foo, "Lorem ipsum dolor sit amet");',CODE
LOWtests/Fixer/Phpdoc/PhpdocAlignFixerTest.php360 * @param bool $param2 lorem ipsumCOMMENT
LOWtests/Fixer/Phpdoc/PhpdocAlignFixerTest.php361 * @param string $param3 lorem ipsumCOMMENT
LOWtests/Fixer/Phpdoc/PhpdocAlignFixerTest.php362 * @return int lorem ipsumCOMMENT
LOWtests/Fixer/Phpdoc/PhpdocAlignFixerTest.php369 * @param bool $param2 lorem ipsumCOMMENT
LOWtests/Fixer/Phpdoc/PhpdocAlignFixerTest.php370 * @param string $param3 lorem ipsumCOMMENT
LOWtests/Fixer/Phpdoc/PhpdocAlignFixerTest.php371 * @return int lorem ipsumCOMMENT
LOWtests/Fixer/Phpdoc/PhpdocAlignFixerTest.php1502 * @property string $bar Foo-Bar lorem ipsumCOMMENT
LOWtests/Fixer/Phpdoc/PhpdocAlignFixerTest.php1521 * @property string $bar Foo-Bar lorem ipsumCOMMENT
LOWtests/Fixer/Operator/OperatorLinebreakFixerTest.php127return $foo/* Lorem ipsum */CODE
LOWtests/Fixer/Operator/OperatorLinebreakFixerTest.php131return $foo ?/* Lorem ipsum */:CODE
LOWtests/Fixer/Operator/OperatorLinebreakFixerTest.php139 /* Lorem ipsum */$bar;COMMENT
LOWtests/Fixer/Operator/OperatorLinebreakFixerTest.php143 ?/* Lorem ipsum */: $bar;CODE
LOWtests/Documentation/RstUtilsTest.php35 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmodCODE
LOWtests/Documentation/RstUtilsTest.php35 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmodCODE
LOWtests/Documentation/RstUtilsTest.php41 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et CODE
LOWtests/Documentation/RstUtilsTest.php41 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et CODE
LOWtests/Tokenizer/Analyzer/CommentsAnalyzerTest.php503 * @deprecated Lorem ipsumCOMMENT
LOWsrc/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php58 "<?php if (\$condition): ?>\nLorem ipsum.\n<?php endif; ?>\n",CODE
Over-Commented Block16 hits · 16 pts
SeverityFileLineSnippetContext
LOWtests/Fixer/Comment/NoEmptyCommentFixerTest.php201 //COMMENT
LOW…sts/Fixer/ReturnNotation/ReturnAssignmentFixerTest.php261 ];COMMENT
LOW…Fixer/AttributeNotation/OrderedAttributesFixerTest.php121 #[BarAlias(3)]COMMENT
LOW…Fixer/AttributeNotation/OrderedAttributesFixerTest.php141 }COMMENT
LOW…Fixer/AttributeNotation/OrderedAttributesFixerTest.php181 #[BarAlias(3)]COMMENT
LOW…Fixer/AttributeNotation/OrderedAttributesFixerTest.php201 #[Corge]COMMENT
LOW…Fixer/AttributeNotation/OrderedAttributesFixerTest.php441 #[ AB\Baz (prop: \'baz\') ]COMMENT
LOW…tributeNotation/AttributeEmptyParenthesesFixerTest.php81 #[\Bar ]COMMENT
LOW…tributeNotation/AttributeEmptyParenthesesFixerTest.php101 #[A\B\Qux(prop1: [1, 2, 4], prop2: true, prop3: \'foo bar\')]COMMENT
LOW…tributeNotation/AttributeEmptyParenthesesFixerTest.php201 #[Baz]COMMENT
LOW…tributeNotation/AttributeEmptyParenthesesFixerTest.php321 #[\A\B\Foo()]COMMENT
LOW…tributeNotation/AttributeEmptyParenthesesFixerTest.php341 #[\Bar(), Baz()]COMMENT
LOW…tributeNotation/AttributeEmptyParenthesesFixerTest.php381 #[A\B\Qux(prop1: [1, 2, 4], prop2: true, prop3: \'foo bar\')]COMMENT
LOW…tributeNotation/AttributeEmptyParenthesesFixerTest.php441 #[\A\B\Foo()]COMMENT
LOW…er/Transformer/ConstructorPromotionTransformerTest.php101COMMENT
LOWdev-tools/install.sh1#!/bin/shCOMMENT
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/Fixer/Whitespace/StatementIndentationFixer.php490 // ^^ we need to check if there is a control group afterwards, and in that case don'COMMENT
LOWsrc/Runner/Runner.php690 // We need to check if content was changed and then applied changes.COMMENT
LOWsrc/Runner/Runner.php693 // Therefore we need to check if code hashes changed.COMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…sts/Fixer/ReturnNotation/ReturnAssignmentFixerTest.php1274 # Print the result anywayCOMMENT