Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
This report presents the forensic synthetic code analysis of rectorphp/rector, a PHP project with 10,363 GitHub stars. SynthScan v2.0 examined 128,284 lines of code across 1420 source files, recording 699 pattern matches distributed across 2 syntactic categories. The overall adjusted score of 5.5 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).
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 699 distinct pattern matches across 2 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 | bin/rector.php | 34 | public function includeDependencyOrRepositoryVendorAutoloadIfExists(): void | CODE |
| LOW | bin/rector.php | 47 | public function autoloadProjectAutoloaderFile(): void | CODE |
| LOW | bin/rector.php | 54 | public function autoloadRectorInstalledAsGlobalDependency(): void | CODE |
| LOW | bin/rector.php | 83 | public function loadIfExistsAndNotLoadedYet(string $filePath): void | CODE |
| LOW | …r/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php | 106 | private function createDimFetchAssignWithFuncCall(Expr $assignVariable, Expr $eachedVariable, $dimValue, string $fun | CODE |
| LOW | rules/Php72/NodeFactory/AnonymousFunctionFactory.php | 94 | public function createAnonymousFunctionFromExpr(Expr $expr): ?Closure | CODE |
| LOW | rules/Php72/NodeFactory/AnonymousFunctionFactory.php | 139 | private function createUseVariablesFromParams(array $nodes, array $params): array | CODE |
| LOW | rules/Php81/Rector/Property/ReadOnlyPropertyRector.php | 270 | private function isPropertyChangedInByRefForeach(Class_ $class, string $propertyName): bool | CODE |
| LOW | rules/Php81/Rector/Property/ReadOnlyPropertyRector.php | 285 | private function isPromotedPropertyAssigned(Class_ $class, Param $param): bool | CODE |
| LOW | …Rector/New_/MyCLabsConstructorCallToEnumFromRector.php | 69 | private function refactorConstructorCallToStaticFromCall(New_ $new): ?StaticCall | CODE |
| LOW | …hp81/Rector/Array_/ArrayToFirstClassCallableRector.php | 158 | private function isReferenceToNonPublicMethodOutsideOwningScope(MethodCall $methodCall, string $methodName): bool | CODE |
| LOW | …r/MethodCall/SpatieEnumMethodCallToEnumConstRector.php | 85 | private function refactorGetterToMethodCall(MethodCall $methodCall, string $property): ?PropertyFetch | CODE |
| LOW | …ctor/MethodCall/MyCLabsMethodCallToEnumConstRector.php | 118 | private function refactorGetValueMethodCall(MethodCall $methodCall): ?PropertyFetch | CODE |
| LOW | …ctor/MethodCall/MyCLabsMethodCallToEnumConstRector.php | 216 | private function getPropertyFetchOrVariable($expr) | CODE |
| LOW | rules/Php81/NodeFactory/EnumFactory.php | 116 | private function createEnumCaseFromDocComment(PhpDocTagNode $phpDocTagNode, Class_ $class, array $mapping = [], bool | CODE |
| LOW | rules/Php81/NodeFactory/EnumFactory.php | 174 | private function getIdentifierTypeFromMappings(array $mapping): string | CODE |
| LOW | …p81/NodeManipulator/NullToStrictStringIntConverter.php | 148 | private function isPropertyFetchOnClassWithMagicGet(Expr $expr): bool | CODE |
| LOW | …p81/NodeManipulator/NullToStrictStringIntConverter.php | 218 | private function isPossibleArrayVariableName(Type $passedType, Type $reflectionParamType, Expr $expr): bool | CODE |
| LOW | …p81/NodeManipulator/NullToStrictStringIntConverter.php | 234 | private function isStringCastedTernaryOfMixedTypes(Expr $expr, Scope $scope): bool | CODE |
| LOW | …74/Rector/FuncCall/MoneyFormatToNumberFormatRector.php | 81 | private function warpInNumberFormatFuncCall(FuncCall $funcCall, Expr $expr): FuncCall | CODE |
| LOW | …es/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php | 74 | private function shouldSkipForUseVariableUsedByCompact(Closure $closure): bool | CODE |
| LOW | …es/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php | 98 | private function shouldSkipMoreSpecificTypeWithVarDoc(Return_ $return): bool | CODE |
| LOW | …es/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php | 107 | private function shouldSkipForUsedReferencedValue(Closure $closure): bool | CODE |
| LOW | …es/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php | 140 | private function resolveReferencedUseVariablesFromClosure(Closure $closure): array | CODE |
| LOW | …80/ValueObject/DoctrineTagAndAnnotationToAttribute.php | 22 | public function getDoctrineAnnotationTagValueNode(): DoctrineAnnotationTagValueNode | CODE |
| LOW | rules/Php80/ValueObject/NestedAnnotationToAttribute.php | 46 | public function getAnnotationPropertiesToAttributeClasses(): array | CODE |
| LOW | rules/Php80/ValueObject/PropertyPromotionCandidate.php | 58 | public function getConstructorAssignStmtPosition(): int | CODE |
| LOW | rules/Php80/ValueObject/AnnotationToAttribute.php | 61 | public function getUseValueAsAttributeArgument(): bool | CODE |
| LOW | …ueObject/NestedDoctrineTagAndAnnotationToAttribute.php | 22 | public function getDoctrineAnnotationTagValueNode(): DoctrineAnnotationTagValueNode | CODE |
| LOW | …ueObject/NestedDoctrineTagAndAnnotationToAttribute.php | 26 | public function getNestedAnnotationToAttribute(): \Rector\Php80\ValueObject\NestedAnnotationToAttribute | CODE |
| LOW | rules/Php80/Rector/Ternary/GetDebugTypeRector.php | 108 | private function shouldSkipClassConstFetch(ClassConstFetch $classConstFetch): bool | CODE |
| LOW | …ClassMethod/AddParamBasedOnParentClassMethodRector.php | 163 | private function processAddNullDefaultParam(array $currentClassMethodParams, array $parentClassMethodParams): bool | CODE |
| LOW | …ClassMethod/AddParamBasedOnParentClassMethodRector.php | 185 | private function processReplaceClassMethodParams(ClassMethod $node, ClassMethod $parentClassMethod, array $currentCl | CODE |
| LOW | …/Rector/Property/NestedAnnotationToAttributeRector.php | 143 | private function transformDoctrineAnnotationClassesToAttributeGroups(PhpDocInfo $phpDocInfo, array $uses): array | CODE |
| LOW | …/Rector/Property/NestedAnnotationToAttributeRector.php | 166 | private function matchAnnotationToAttribute(DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode): ?\Recto | CODE |
| LOW | rules/Php80/Rector/Identical/StrEndsWithRector.php | 180 | private function isUnaryMinusStrlenFuncCallArgValue(Expr $substrOffset, Expr $needle): bool | CODE |
| LOW | rules/Php80/Rector/Identical/StrEndsWithRector.php | 200 | private function isHardCodedLNumberAndString(Expr $substrOffset, Expr $needle): bool | CODE |
| LOW | …es/Php80/Rector/Class_/AnnotationToAttributeRector.php | 193 | private function resolveWithChangedAttributesClass(array $configuration): array | CODE |
| LOW | …es/Php80/Rector/Class_/AnnotationToAttributeRector.php | 248 | private function processDoctrineAnnotationClasses(PhpDocInfo $phpDocInfo, array $uses): array | CODE |
| LOW | …es/Php80/Rector/Class_/AnnotationToAttributeRector.php | 348 | private function matchAnnotationToAttribute(DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode): ?\Recto | CODE |
| LOW | …s_/ClassPropertyAssignToConstructorPromotionRector.php | 332 | private function shouldSkipPropertyOrParam(Property $property, Param $param): bool | CODE |
| LOW | …s_/ClassPropertyAssignToConstructorPromotionRector.php | 349 | private function shouldSkipNarrowingVarDoc(Property $property, Param $param, PhpDocInfo $constructorPhpDocInfo, stri | CODE |
| LOW | …s_/ClassPropertyAssignToConstructorPromotionRector.php | 375 | private function shouldRemoveNullFromForPromotedParamType(Property $property, Param $param): bool | CODE |
| LOW | …s_/ClassPropertyAssignToConstructorPromotionRector.php | 392 | private function shouldUsePropertyTypeForPromotedParam(Property $property, Param $param): bool | CODE |
| LOW | …p80/NodeAnalyzer/PromotedPropertyCandidateResolver.php | 97 | private function matchPropertyPromotionCandidate(Property $property, ClassMethod $constructClassMethod, int $propert | CODE |
| LOW | …p80/NodeAnalyzer/PromotedPropertyCandidateResolver.php | 161 | private function matchClassMethodParamByAssignedVariable(ClassMethod $classMethod, Variable $variable): ?Param | CODE |
| LOW | …p80/NodeAnalyzer/PromotedPropertyCandidateResolver.php | 188 | private function isParamReadAfterPropertyMutation(ClassMethod $constructClassMethod, int $assignStmtPosition, string | CODE |
| LOW | rules/Php80/NodeAnalyzer/MatchSwitchAnalyzer.php | 89 | public function haveCondAndExprsMatchPotential(array $condAndExprs): bool | CODE |
| LOW | rules/Php80/NodeAnalyzer/MatchSwitchAnalyzer.php | 113 | public function hasCondsAndExprDefaultValue(array $condAndExprs): bool | CODE |
| LOW | rules/Php80/NodeAnalyzer/MatchSwitchAnalyzer.php | 140 | private function resolveUniqueKindsWithoutThrows(array $condAndExprs): array | CODE |
| LOW | rules/Php80/NodeAnalyzer/PhpAttributeAnalyzer.php | 76 | private function hasArgWithRemoveArrayValue(array $args): bool | CODE |
| LOW | …les/Php80/DocBlock/PropertyPromotionDocBlockMerger.php | 55 | public function mergePropertyAndParamDocBlocks(Property $property, Param $param, ?ParamTagValueNode $paramTagValueNo | CODE |
| LOW | …les/Php80/DocBlock/PropertyPromotionDocBlockMerger.php | 72 | public function decorateParamWithPropertyPhpDocInfo(ClassMethod $classMethod, Property $property, Param $param, stri | CODE |
| LOW | …rStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php | 95 | private function isHardcodedStringWithLNumberLength(StrStartsWith $strStartsWith): bool | CODE |
| LOW | …StartsWithMatchAndRefactor/StrncmpMatchAndRefactor.php | 98 | private function isHardcodedStringWithLNumberLength(StrStartsWith $strStartsWith): bool | CODE |
| LOW | rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php | 184 | private function hasInternalPointerChangeNext(Node $stmtsAware, int $nextKey, int $totalKeys, FuncCall $funcCall): b | CODE |
| LOW | rules/Php73/Rector/FuncCall/JsonThrowOnErrorRector.php | 155 | private function isFirstValueStringOrArray(FuncCall $funcCall): bool | CODE |
| LOW | rules/Renaming/Rector/MethodCall/RenameMethodRector.php | 126 | private function shouldKeepForParentInterface(MethodCallRenameInterface $methodCallRename, ?ClassReflection $classRe | CODE |
| LOW | rules/Renaming/Rector/MethodCall/RenameMethodRector.php | 187 | private function refactorMethodCallAndStaticCall($call) | CODE |
| LOW | rules/Renaming/Rector/Name/RenameClassRector.php | 118 | private function shouldSkipClassConstFetchForMissingConstantName(FullyQualified $fullyQualified, array $oldToNewClas | CODE |
| 636 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …nalyzer/ReturnTypeAnalyzer/StrictReturnNewAnalyzer.php | 58 | // in case of more returns, we need to check if they all return the same variable | COMMENT |
| LOW | rules/Arguments/ArgumentDefaultValueReplacer.php | 123 | // before any named argument, we need to check if it is in the list of named arguments | COMMENT |
| LOW | …ents/Rector/MethodCall/RemoveMethodCallParamRector.php | 92 | // before any named argument, we need to check if it is in the list of named arguments | COMMENT |