Skip to content

Commit a33563b

Browse files
phpstan-botclaude
authored andcommitted
Require explicit $prependedToComposer argument on AutoloadFunctionsSourceLocator
Callers now pass the boolean explicitly instead of relying on a default, making the prepended/appended intent visible at each construction site. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 07d27cc commit a33563b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/Reflection/BetterReflection/BetterReflectionSourceLocatorFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ public function create(): SourceLocator
203203
$astLocator,
204204
$this->reflectionSourceStubber,
205205
),
206+
false,
206207
);
207208

208209
$locators[] = new AutoloadSourceLocator($this->fileNodesFetcher, true);

src/Reflection/BetterReflection/SourceLocator/AutoloadFunctionsSourceLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class AutoloadFunctionsSourceLocator implements SourceLocator
2525
public function __construct(
2626
private AutoloadSourceLocator $autoloadSourceLocator,
2727
private ReflectionClassSourceLocator $reflectionClassSourceLocator,
28-
private bool $prependedToComposer = false,
28+
private bool $prependedToComposer,
2929
)
3030
{
3131
}

0 commit comments

Comments
 (0)