From 11abb6b4c9c8b29ee2730a3307ebae77b17fa94d Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Fri, 20 Dec 2024 20:27:15 +0100 Subject: [PATCH] [GENERATED] Renamed --- demo/basic-reflection/example1.php | 2 +- demo/basic-reflection/example2.php | 4 +- demo/basic-reflection/example3.php | 8 +-- demo/parsing-whole-directory/example1.php | 6 +- demo/parsing-whole-directory/example2.php | 10 ++-- src/BetterReflection.php | 44 +++++++-------- .../Exception/InvalidIdentifierName.php | 2 +- src/Identifier/Identifier.php | 8 +-- src/Identifier/IdentifierType.php | 8 +-- src/NodeCompiler/CompileNodeToValue.php | 12 ++-- src/NodeCompiler/CompiledValue.php | 2 +- src/NodeCompiler/CompilerContext.php | 32 +++++------ .../Exception/UnableToCompileNode.php | 8 +-- .../Adapter/Exception/NotImplemented.php | 2 +- ...mplementedBecauseItTriggersAutoloading.php | 2 +- .../Adapter/FakeReflectionAttribute.php | 4 +- .../Adapter/ReflectionAttribute.php | 4 +- .../Adapter/ReflectionAttributeFactory.php | 6 +- src/Reflection/Adapter/ReflectionClass.php | 20 +++---- .../Adapter/ReflectionClassConstant.php | 8 +-- src/Reflection/Adapter/ReflectionEnum.php | 18 +++--- .../Adapter/ReflectionEnumBackedCase.php | 6 +- .../Adapter/ReflectionEnumUnitCase.php | 6 +- src/Reflection/Adapter/ReflectionFunction.php | 12 ++-- .../Adapter/ReflectionIntersectionType.php | 6 +- src/Reflection/Adapter/ReflectionMethod.php | 18 +++--- .../Adapter/ReflectionNamedType.php | 8 +-- src/Reflection/Adapter/ReflectionObject.php | 18 +++--- .../Adapter/ReflectionParameter.php | 16 +++--- src/Reflection/Adapter/ReflectionProperty.php | 16 +++--- src/Reflection/Adapter/ReflectionType.php | 14 ++--- .../Adapter/ReflectionUnionType.php | 6 +- .../Annotation/AnnotationHelper.php | 2 +- .../Attribute/ReflectionAttributeHelper.php | 22 ++++---- .../Deprecated/DeprecatedHelper.php | 20 +++---- .../Exception/CircularReference.php | 2 +- .../Exception/ClassDoesNotExist.php | 4 +- .../Exception/CodeLocationMissing.php | 2 +- .../Exception/FunctionDoesNotExist.php | 2 +- .../InvalidArrowFunctionBodyNode.php | 4 +- .../Exception/InvalidConstantNode.php | 4 +- .../Exception/InvalidDefaultValueType.php | 2 +- .../Exception/MethodPrototypeNotFound.php | 2 +- src/Reflection/Exception/NoObjectProvided.php | 2 +- src/Reflection/Exception/NoParent.php | 2 +- src/Reflection/Exception/NotAnObject.php | 2 +- .../Exception/ObjectNotInstanceOfClass.php | 2 +- .../Exception/PropertyDoesNotExist.php | 2 +- .../Exception/PropertyIsNotStatic.php | 2 +- src/Reflection/Reflection.php | 2 +- src/Reflection/ReflectionAttribute.php | 16 +++--- src/Reflection/ReflectionClass.php | 56 +++++++++---------- src/Reflection/ReflectionClassConstant.php | 32 +++++------ src/Reflection/ReflectionConstant.php | 30 +++++----- src/Reflection/ReflectionEnum.php | 12 ++-- src/Reflection/ReflectionEnumCase.php | 22 ++++---- src/Reflection/ReflectionFunction.php | 22 ++++---- src/Reflection/ReflectionFunctionAbstract.php | 28 +++++----- src/Reflection/ReflectionIntersectionType.php | 8 +-- src/Reflection/ReflectionMethod.php | 26 ++++----- src/Reflection/ReflectionNamedType.php | 10 ++-- src/Reflection/ReflectionObject.php | 28 +++++----- src/Reflection/ReflectionParameter.php | 44 +++++++-------- src/Reflection/ReflectionProperty.php | 50 ++++++++--------- src/Reflection/ReflectionPropertyHookType.php | 2 +- src/Reflection/ReflectionType.php | 8 +-- src/Reflection/ReflectionUnionType.php | 8 +-- .../ReflectionAttributeStringCast.php | 4 +- .../ReflectionClassConstantStringCast.php | 4 +- .../StringCast/ReflectionClassStringCast.php | 18 +++--- .../ReflectionConstantStringCast.php | 4 +- .../ReflectionEnumCaseStringCast.php | 4 +- .../ReflectionFunctionStringCast.php | 6 +- .../StringCast/ReflectionMethodStringCast.php | 8 +-- .../ReflectionParameterStringCast.php | 4 +- .../ReflectionPropertyStringCast.php | 4 +- .../StringCast/ReflectionStringCastHelper.php | 10 ++-- .../StringCast/ReflectionTypeStringCast.php | 12 ++-- .../Support/AlreadyVisitedClasses.php | 4 +- src/Reflector/DefaultReflector.php | 18 +++--- .../Exception/IdentifierNotFound.php | 4 +- src/Reflector/Reflector.php | 10 ++-- .../Ast/Exception/ParseToAstFailure.php | 4 +- .../Ast/FindReflectionsInTree.php | 22 ++++---- src/SourceLocator/Ast/Locator.php | 16 +++--- .../Ast/Parser/MemoizingParser.php | 2 +- .../Ast/Strategy/AstConversionStrategy.php | 14 ++--- .../Ast/Strategy/NodeToReflection.php | 16 +++--- .../EvaledAnonymousClassCannotBeLocated.php | 2 +- .../EvaledClosureCannotBeLocated.php | 2 +- .../Exception/InvalidDirectory.php | 2 +- .../Exception/InvalidFileInfo.php | 2 +- .../Exception/InvalidFileLocation.php | 2 +- .../Exception/NoAnonymousClassOnLine.php | 2 +- .../Exception/NoClosureOnLine.php | 2 +- .../Exception/NotInternalClass.php | 2 +- .../TwoAnonymousClassesOnSameLine.php | 2 +- .../Exception/TwoClosuresOnSameLine.php | 2 +- src/SourceLocator/FileChecker.php | 4 +- .../Located/AliasLocatedSource.php | 2 +- .../Located/AnonymousLocatedSource.php | 2 +- .../Located/EvaledLocatedSource.php | 2 +- .../Located/InternalLocatedSource.php | 2 +- src/SourceLocator/Located/LocatedSource.php | 6 +- .../SourceStubber/AggregateSourceStubber.php | 10 ++-- .../Exception/CouldNotFindPhpStormStubs.php | 2 +- .../PhpStormStubsSourceStubber.php | 20 +++---- .../SourceStubber/ReflectionSourceStubber.php | 12 ++-- .../SourceStubber/SourceStubber.php | 8 +-- src/SourceLocator/SourceStubber/StubData.php | 2 +- .../Type/AbstractSourceLocator.php | 22 ++++---- .../Type/AggregateSourceLocator.php | 12 ++-- .../AnonymousClassObjectSourceLocator.php | 32 +++++------ .../Type/AutoloadSourceLocator.php | 26 ++++----- .../FileReadTrapStreamWrapper.php | 4 +- .../Type/ClosureSourceLocator.php | 32 +++++------ .../Composer/Factory/Exception/Exception.php | 2 +- .../Factory/Exception/FailedToParseJson.php | 2 +- .../Exception/InvalidProjectDirectory.php | 2 +- .../Factory/Exception/MissingComposerJson.php | 2 +- .../Exception/MissingInstalledJson.php | 2 +- .../Factory/MakeLocatorForComposerJson.php | 24 ++++---- ...LocatorForComposerJsonAndInstalledJson.php | 26 ++++----- .../Factory/MakeLocatorForInstalledJson.php | 26 ++++----- .../Type/Composer/Psr/Exception/Exception.php | 2 +- .../Psr/Exception/InvalidPrefixMapping.php | 2 +- .../Type/Composer/Psr/Psr0Mapping.php | 4 +- .../Type/Composer/Psr/Psr4Mapping.php | 4 +- .../Composer/Psr/PsrAutoloaderMapping.php | 4 +- .../Type/Composer/PsrAutoloaderLocator.php | 28 +++++----- .../Type/ComposerSourceLocator.php | 14 ++--- .../Type/DirectoriesSourceLocator.php | 18 +++--- .../Type/EvaledCodeSourceLocator.php | 18 +++--- .../Type/FileIteratorSourceLocator.php | 22 ++++---- .../Type/MemoizingSourceLocator.php | 12 ++-- .../Type/PhpInternalSourceLocator.php | 26 ++++----- .../Type/SingleFileSourceLocator.php | 14 ++--- src/SourceLocator/Type/SourceLocator.php | 12 ++-- .../Type/StringSourceLocator.php | 12 ++-- src/Util/CalculateReflectionColumn.php | 6 +- src/Util/ClassExistenceChecker.php | 2 +- src/Util/ConstantNodeChecker.php | 4 +- src/Util/Exception/InvalidNodePosition.php | 2 +- src/Util/Exception/NoNodePosition.php | 2 +- src/Util/FileHelper.php | 2 +- src/Util/FindReflectionOnLine.php | 32 +++++------ src/Util/GetLastDocComment.php | 2 +- test/benchmark/PhpUnitTestCaseBench.php | 8 +-- test/compat/ReflectInternalClassByName.phpt | 2 +- test/compat/ReflectOnClassInString.phpt | 6 +- test/compat/ReflectOnUnloadedClass.phpt | 6 +- test/compat/ReflectUserClassByName.phpt | 2 +- test/compat/ResolvePHP7Types.phpt | 8 +-- test/unit/BetterReflectionSingleton.php | 2 +- test/unit/BetterReflectionTest.php | 20 +++---- .../Exception/InvalidIdentifierNameTest.php | 2 +- test/unit/Identifier/IdentifierTest.php | 10 ++-- test/unit/Identifier/IdentifierTypeTest.php | 2 +- .../NodeCompiler/CompileNodeToValueTest.php | 26 ++++----- test/unit/NodeCompiler/CompiledValueTest.php | 2 +- .../unit/NodeCompiler/CompilerContextTest.php | 10 ++-- .../Exception/UnableToCompileNodeTest.php | 14 ++--- ...mentedBecauseItTriggersAutoloadingTest.php | 2 +- .../Adapter/ReflectionAttributeTest.php | 12 ++-- .../Adapter/ReflectionClassConstantTest.php | 16 +++--- .../Adapter/ReflectionClassTest.php | 30 +++++----- .../Adapter/ReflectionEnumBackedCaseTest.php | 16 +++--- .../Reflection/Adapter/ReflectionEnumTest.php | 38 ++++++------- .../Adapter/ReflectionEnumUnitCaseTest.php | 16 +++--- .../Adapter/ReflectionFunctionTest.php | 22 ++++---- .../ReflectionIntersectionTypeTest.php | 8 +-- .../Adapter/ReflectionMethodTest.php | 32 +++++------ .../Adapter/ReflectionNamedTypeTest.php | 8 +-- .../Adapter/ReflectionObjectTest.php | 30 +++++----- .../Adapter/ReflectionParameterTest.php | 30 +++++----- .../Adapter/ReflectionPropertyTest.php | 28 +++++----- .../Reflection/Adapter/ReflectionTypeTest.php | 18 +++--- .../Adapter/ReflectionUnionTypeTest.php | 8 +-- .../Annotation/AnnotationHelperTest.php | 2 +- .../ReflectionAttributeHelperTest.php | 8 +-- .../Deprecated/DeprecatedHelperTest.php | 8 +-- .../Exception/CircularReferenceTest.php | 2 +- .../Exception/ClassDoesNotExistTest.php | 4 +- .../Exception/CodeLocationMissingTest.php | 2 +- .../Exception/FunctionDoesNotExistTest.php | 2 +- .../InvalidArrowFunctionBodyNodeTest.php | 2 +- .../Exception/InvalidConstantNodeTest.php | 2 +- .../Exception/NoObjectProvidedTest.php | 2 +- .../Reflection/Exception/NotAnObjectTest.php | 2 +- .../ObjectNotInstanceOfClassTest.php | 2 +- .../Exception/PropertyDoesNotExistTest.php | 2 +- .../Exception/PropertyIsNotStaticTest.php | 2 +- .../Reflection/ReflectionAttributeTest.php | 14 ++--- .../ReflectionClassConstantTest.php | 20 +++---- test/unit/Reflection/ReflectionClassTest.php | 50 ++++++++--------- .../Reflection/ReflectionConstantTest.php | 24 ++++---- .../Reflection/ReflectionEnumCaseTest.php | 12 ++-- test/unit/Reflection/ReflectionEnumTest.php | 14 ++--- .../ReflectionFunctionAbstractTest.php | 28 +++++----- .../Reflection/ReflectionFunctionTest.php | 24 ++++---- .../ReflectionIntersectionTypeTest.php | 8 +-- test/unit/Reflection/ReflectionMethodTest.php | 38 ++++++------- .../Reflection/ReflectionNamedTypeTest.php | 14 ++--- test/unit/Reflection/ReflectionObjectTest.php | 10 ++-- .../Reflection/ReflectionParameterTest.php | 22 ++++---- .../Reflection/ReflectionPropertyTest.php | 38 ++++++------- test/unit/Reflection/ReflectionTypeTest.php | 12 ++-- .../Reflection/ReflectionUnionTypeTest.php | 8 +-- .../ReflectionAttributeStringCastTest.php | 8 +-- .../ReflectionClassConstantStringCastTest.php | 8 +-- .../ReflectionClassStringCastTest.php | 20 +++---- .../ReflectionConstantStringCastTest.php | 16 +++--- .../ReflectionEnumCaseStringCastTest.php | 10 ++-- .../ReflectionFunctionStringCastTest.php | 12 ++-- .../ReflectionMethodStringCastTest.php | 12 ++-- .../ReflectionParameterStringCastTest.php | 8 +-- .../ReflectionPropertyStringCastTest.php | 8 +-- .../ReflectionStringCastHelperTest.php | 8 +-- .../ReflectionTypeStringCastTest.php | 14 ++--- .../Support/AlreadyVisitedClassesTest.php | 4 +- test/unit/Reflector/DefaultReflectorTest.php | 18 +++--- .../Exception/IdentifierNotFoundTest.php | 6 +- .../Ast/Exception/ParseToAstFailureTest.php | 4 +- .../Ast/FindReflectionsInTreeTest.php | 20 +++---- test/unit/SourceLocator/Ast/LocatorTest.php | 22 ++++---- .../Ast/Parser/MemoizingParserTest.php | 2 +- .../Ast/Strategy/NodeToReflectionTest.php | 14 ++--- ...valedAnonymousClassCannotBeLocatedTest.php | 2 +- .../EvaledClosureCannotBeLocatedTest.php | 2 +- .../Exception/InvalidDirectoryTest.php | 2 +- .../Exception/InvalidFileInfoTest.php | 2 +- .../Exception/NoAnonymousClassOnLineTest.php | 2 +- .../Exception/NoClosureOnLineTest.php | 2 +- .../TwoAnonymousClassesOnSameLineTest.php | 2 +- .../Exception/TwoClosuresOnSameLineTest.php | 2 +- test/unit/SourceLocator/FileCheckerTest.php | 4 +- .../Located/AliasLocatedSourceTest.php | 4 +- .../Located/AnonymousLocatedSourceTest.php | 4 +- .../Located/EvaledLocatedSourceTest.php | 2 +- .../Located/InternalLocatedSourceTest.php | 2 +- .../Located/LocatedSourceTest.php | 4 +- .../AggregateSourceStubberTest.php | 6 +- .../CouldNotFindPhpStormStubsTest.php | 2 +- .../PhpStormStubsSourceStubberTest.php | 32 +++++------ .../ReflectionSourceStubberTest.php | 22 ++++---- .../SourceStubber/StubDataTest.php | 2 +- .../Type/AbstractSourceLocatorTest.php | 16 +++--- .../Type/AggregateSourceLocatorTest.php | 18 +++--- .../AnonymousClassObjectSourceLocatorTest.php | 22 ++++---- .../FileReadTrapStreamWrapperTest.php | 2 +- .../Type/AutoloadSourceLocatorTest.php | 22 ++++---- ...torWithoutLoadedParserDependenciesTest.php | 8 +-- .../Type/ClosureSourceLocatorTest.php | 22 ++++---- .../Exception/FailedToParseJsonTest.php | 2 +- .../Exception/InvalidProjectDirectoryTest.php | 2 +- .../Exception/MissingComposerJsonTest.php | 2 +- .../Exception/MissingInstalledJsonTest.php | 2 +- ...akeLocatorForComposerInstalledJsonTest.php | 22 ++++---- ...torForComposerJsonAndInstalledJsonTest.php | 22 ++++---- .../MakeLocatorForComposerJsonTest.php | 20 +++---- .../Psr/Excetion/InvalidPrefixMappingTest.php | 2 +- .../Type/Composer/Psr/Psr0MappingTest.php | 6 +- .../Type/Composer/Psr/Psr4MappingTest.php | 6 +- .../Composer/PsrAutoloaderLocatorTest.php | 16 +++--- .../Type/ComposerSourceLocatorTest.php | 12 ++-- .../Type/DirectoriesSourceLocatorTest.php | 12 ++-- .../Type/EvaledCodeSourceLocatorTest.php | 20 +++---- .../Type/FileIteratorSourceLocatorTest.php | 12 ++-- .../Type/MemoizingSourceLocatorTest.php | 20 +++---- .../Type/PhpInternalSourceLocatorTest.php | 22 ++++---- .../Type/SingleFileSourceLocatorTest.php | 14 ++--- .../Type/StringSourceLocatorTest.php | 12 ++-- .../Util/CalculateReflectionColumnTest.php | 2 +- test/unit/Util/ClassExistenceCheckerTest.php | 2 +- test/unit/Util/ConstantNodeCheckerTest.php | 4 +- .../Exception/InvalidNodePositionTest.php | 2 +- .../Util/Exception/NoNodePositionTest.php | 2 +- test/unit/Util/FileHelperTest.php | 2 +- test/unit/Util/FindReflectionOnLineTest.php | 10 ++-- test/unit/Util/GetLastDocCommentTest.php | 2 +- 280 files changed, 1522 insertions(+), 1522 deletions(-) diff --git a/demo/basic-reflection/example1.php b/demo/basic-reflection/example1.php index dceb9351e..1fafca4cc 100644 --- a/demo/basic-reflection/example1.php +++ b/demo/basic-reflection/example1.php @@ -4,7 +4,7 @@ require_once __DIR__ . '/../../vendor/autoload.php'; -use Roave\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\BetterReflection; $reflection = (new BetterReflection())->reflector()->reflectClass(\stdClass::class); diff --git a/demo/basic-reflection/example2.php b/demo/basic-reflection/example2.php index a74567b86..832121ba2 100644 --- a/demo/basic-reflection/example2.php +++ b/demo/basic-reflection/example2.php @@ -2,8 +2,8 @@ // Load an autoloadable class -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\Reflection\ReflectionClass; require_once __DIR__ . '/../../vendor/autoload.php'; diff --git a/demo/basic-reflection/example3.php b/demo/basic-reflection/example3.php index 747775896..1b3856dca 100644 --- a/demo/basic-reflection/example3.php +++ b/demo/basic-reflection/example3.php @@ -4,10 +4,10 @@ require_once __DIR__ . '/../../vendor/autoload.php'; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; $reflector = new DefaultReflector(new AggregateSourceLocator([ new SingleFileSourceLocator(__DIR__ . '/assets/MyClass.php', (new BetterReflection())->astLocator()), diff --git a/demo/parsing-whole-directory/example1.php b/demo/parsing-whole-directory/example1.php index ab9f687ba..78c5a4ced 100644 --- a/demo/parsing-whole-directory/example1.php +++ b/demo/parsing-whole-directory/example1.php @@ -4,9 +4,9 @@ require_once __DIR__ . '/../../vendor/autoload.php'; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; $directories = [__DIR__ . '/../../src']; diff --git a/demo/parsing-whole-directory/example2.php b/demo/parsing-whole-directory/example2.php index b7e514816..c554b3f30 100644 --- a/demo/parsing-whole-directory/example2.php +++ b/demo/parsing-whole-directory/example2.php @@ -4,11 +4,11 @@ require_once __DIR__ . '/../../vendor/autoload.php'; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; $directories = [__DIR__ . '/../../src']; diff --git a/src/BetterReflection.php b/src/BetterReflection.php index 8042d7b85..0339b7df6 100644 --- a/src/BetterReflection.php +++ b/src/BetterReflection.php @@ -2,25 +2,25 @@ declare(strict_types=1); -namespace Roave\BetterReflection; +namespace PHPStan\BetterReflection; use PhpParser\Parser; use PhpParser\ParserFactory; use PhpParser\PrettyPrinter\Standard; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator as AstLocator; -use Roave\BetterReflection\SourceLocator\SourceStubber\AggregateSourceStubber; -use Roave\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber; -use Roave\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\EvaledCodeSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\MemoizingSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; -use Roave\BetterReflection\Util\FindReflectionOnLine; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator as AstLocator; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\AggregateSourceStubber; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\EvaledCodeSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\Util\FindReflectionOnLine; use const PHP_VERSION_ID; @@ -29,22 +29,22 @@ final class BetterReflection public static int $phpVersion = PHP_VERSION_ID; /** - * @var \Roave\BetterReflection\SourceLocator\Type\SourceLocator|null + * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator|null */ private static $sharedSourceLocator = null; /** - * @var \Roave\BetterReflection\SourceLocator\Type\SourceLocator|null + * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator|null */ private $sourceLocator = null; /** - * @var \Roave\BetterReflection\Reflector\Reflector|null + * @var \PHPStan\BetterReflection\Reflector\Reflector|null */ private static $sharedReflector = null; /** - * @var \Roave\BetterReflection\Reflector\Reflector|null + * @var \PHPStan\BetterReflection\Reflector\Reflector|null */ private $reflector = null; @@ -64,17 +64,17 @@ final class BetterReflection private $astLocator = null; /** - * @var \Roave\BetterReflection\Util\FindReflectionOnLine|null + * @var \PHPStan\BetterReflection\Util\FindReflectionOnLine|null */ private $findReflectionOnLine = null; /** - * @var \Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber|null + * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber|null */ private $sourceStubber = null; /** - * @var \Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber|null + * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber|null */ private static $sharedSourceStubber = null; diff --git a/src/Identifier/Exception/InvalidIdentifierName.php b/src/Identifier/Exception/InvalidIdentifierName.php index 2f16f04d0..cf01b6233 100644 --- a/src/Identifier/Exception/InvalidIdentifierName.php +++ b/src/Identifier/Exception/InvalidIdentifierName.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Identifier\Exception; +namespace PHPStan\BetterReflection\Identifier\Exception; use InvalidArgumentException; diff --git a/src/Identifier/Identifier.php b/src/Identifier/Identifier.php index 8cf12a65f..937eef106 100644 --- a/src/Identifier/Identifier.php +++ b/src/Identifier/Identifier.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Identifier; +namespace PHPStan\BetterReflection\Identifier; -use Roave\BetterReflection\Identifier\Exception\InvalidIdentifierName; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Identifier\Exception\InvalidIdentifierName; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; use function ltrim; use function preg_match; diff --git a/src/Identifier/IdentifierType.php b/src/Identifier/IdentifierType.php index 640fc3b08..b9108d473 100644 --- a/src/Identifier/IdentifierType.php +++ b/src/Identifier/IdentifierType.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Identifier; +namespace PHPStan\BetterReflection\Identifier; use InvalidArgumentException; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; use function array_key_exists; use function sprintf; diff --git a/src/NodeCompiler/CompileNodeToValue.php b/src/NodeCompiler/CompileNodeToValue.php index c8a290d06..5d4630a55 100644 --- a/src/NodeCompiler/CompileNodeToValue.php +++ b/src/NodeCompiler/CompileNodeToValue.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace Roave\BetterReflection\NodeCompiler; +namespace PHPStan\BetterReflection\NodeCompiler; use PhpParser\ConstExprEvaluator; use PhpParser\Node; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; use function array_map; use function assert; diff --git a/src/NodeCompiler/CompiledValue.php b/src/NodeCompiler/CompiledValue.php index 93531ed72..078275793 100644 --- a/src/NodeCompiler/CompiledValue.php +++ b/src/NodeCompiler/CompiledValue.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\NodeCompiler; +namespace PHPStan\BetterReflection\NodeCompiler; /** @internal */ class CompiledValue diff --git a/src/NodeCompiler/CompilerContext.php b/src/NodeCompiler/CompilerContext.php index 6d184d2fc..4c7dd74f0 100644 --- a/src/NodeCompiler/CompilerContext.php +++ b/src/NodeCompiler/CompilerContext.php @@ -2,29 +2,29 @@ declare(strict_types=1); -namespace Roave\BetterReflection\NodeCompiler; - -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionEnumCase; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionProperty; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\Util\FileHelper; +namespace PHPStan\BetterReflection\NodeCompiler; + +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionProperty; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Util\FileHelper; /** @internal */ class CompilerContext { private Reflector $reflector; /** - * @var \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant|\Roave\BetterReflection\Reflection\ReflectionEnumCase|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionParameter|\Roave\BetterReflection\Reflection\ReflectionConstant + * @var \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionConstant */ private $contextReflection; /** - * @param \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant|\Roave\BetterReflection\Reflection\ReflectionEnumCase|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionParameter|\Roave\BetterReflection\Reflection\ReflectionConstant $contextReflection + * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionConstant $contextReflection */ public function __construct(Reflector $reflector, $contextReflection) { @@ -71,7 +71,7 @@ public function getNamespace(): ?string return (($nullsafeVariable3 = $this->getClass()) ? $nullsafeVariable3->getNamespaceName() : null) ?? (($nullsafeVariable4 = $this->getFunction()) ? $nullsafeVariable4->getNamespaceName() : null); } - public function getClass(): ?\Roave\BetterReflection\Reflection\ReflectionClass + public function getClass(): ?\PHPStan\BetterReflection\Reflection\ReflectionClass { if ($this->contextReflection instanceof ReflectionClass) { return $this->contextReflection; @@ -97,7 +97,7 @@ public function getClass(): ?\Roave\BetterReflection\Reflection\ReflectionClass } /** - * @return \Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|null */ public function getFunction() { diff --git a/src/NodeCompiler/Exception/UnableToCompileNode.php b/src/NodeCompiler/Exception/UnableToCompileNode.php index da0b0b838..4cf4eef3f 100644 --- a/src/NodeCompiler/Exception/UnableToCompileNode.php +++ b/src/NodeCompiler/Exception/UnableToCompileNode.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Roave\BetterReflection\NodeCompiler\Exception; +namespace PHPStan\BetterReflection\NodeCompiler\Exception; use LogicException; use PhpParser\Node; -use Roave\BetterReflection\NodeCompiler\CompilerContext; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\NodeCompiler\CompilerContext; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Util\FileHelper; use function assert; use function sprintf; diff --git a/src/Reflection/Adapter/Exception/NotImplemented.php b/src/Reflection/Adapter/Exception/NotImplemented.php index a71e8ddce..4488d8da3 100644 --- a/src/Reflection/Adapter/Exception/NotImplemented.php +++ b/src/Reflection/Adapter/Exception/NotImplemented.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter\Exception; +namespace PHPStan\BetterReflection\Reflection\Adapter\Exception; use LogicException; diff --git a/src/Reflection/Adapter/Exception/NotImplementedBecauseItTriggersAutoloading.php b/src/Reflection/Adapter/Exception/NotImplementedBecauseItTriggersAutoloading.php index 1f8c3de6e..f473d7e8e 100644 --- a/src/Reflection/Adapter/Exception/NotImplementedBecauseItTriggersAutoloading.php +++ b/src/Reflection/Adapter/Exception/NotImplementedBecauseItTriggersAutoloading.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter\Exception; +namespace PHPStan\BetterReflection\Reflection\Adapter\Exception; class NotImplementedBecauseItTriggersAutoloading extends NotImplemented { diff --git a/src/Reflection/Adapter/FakeReflectionAttribute.php b/src/Reflection/Adapter/FakeReflectionAttribute.php index eabca6468..d4161c692 100644 --- a/src/Reflection/Adapter/FakeReflectionAttribute.php +++ b/src/Reflection/Adapter/FakeReflectionAttribute.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use PhpParser\Node\Expr; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; final class FakeReflectionAttribute { diff --git a/src/Reflection/Adapter/ReflectionAttribute.php b/src/Reflection/Adapter/ReflectionAttribute.php index 2466e7dd7..7200f97be 100644 --- a/src/Reflection/Adapter/ReflectionAttribute.php +++ b/src/Reflection/Adapter/ReflectionAttribute.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use Attribute; use OutOfBoundsException; use PhpParser\Node\Expr; use ReflectionAttribute as CoreReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; use function sprintf; diff --git a/src/Reflection/Adapter/ReflectionAttributeFactory.php b/src/Reflection/Adapter/ReflectionAttributeFactory.php index 6663d4a25..85a7c982a 100644 --- a/src/Reflection/Adapter/ReflectionAttributeFactory.php +++ b/src/Reflection/Adapter/ReflectionAttributeFactory.php @@ -2,16 +2,16 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; use const PHP_VERSION_ID; final class ReflectionAttributeFactory { /** - * @return \Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute|\Roave\BetterReflection\Reflection\Adapter\FakeReflectionAttribute + * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute|\PHPStan\BetterReflection\Reflection\Adapter\FakeReflectionAttribute */ public static function create(BetterReflectionAttribute $betterReflectionAttribute) { diff --git a/src/Reflection/Adapter/ReflectionClass.php b/src/Reflection/Adapter/ReflectionClass.php index acbf1e5d4..b01af043d 100644 --- a/src/Reflection/Adapter/ReflectionClass.php +++ b/src/Reflection/Adapter/ReflectionClass.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use OutOfBoundsException; use ReflectionClass as CoreReflectionClass; @@ -10,15 +10,15 @@ use ReflectionExtension as CoreReflectionExtension; use ReflectionMethod as CoreReflectionMethod; use ReturnTypeWillChange; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; -use Roave\BetterReflection\Util\ClassExistenceChecker; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; +use PHPStan\BetterReflection\Util\ClassExistenceChecker; +use PHPStan\BetterReflection\Util\FileHelper; use ValueError; use function array_combine; diff --git a/src/Reflection/Adapter/ReflectionClassConstant.php b/src/Reflection/Adapter/ReflectionClassConstant.php index 2093bbfa6..b60ffd937 100644 --- a/src/Reflection/Adapter/ReflectionClassConstant.php +++ b/src/Reflection/Adapter/ReflectionClassConstant.php @@ -2,16 +2,16 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use OutOfBoundsException; use PhpParser\Node\Expr; use ReflectionClassConstant as CoreReflectionClassConstant; use ReflectionType as CoreReflectionType; use ReturnTypeWillChange; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; use ValueError; use function array_map; diff --git a/src/Reflection/Adapter/ReflectionEnum.php b/src/Reflection/Adapter/ReflectionEnum.php index 774452521..ab1a8f000 100644 --- a/src/Reflection/Adapter/ReflectionEnum.php +++ b/src/Reflection/Adapter/ReflectionEnum.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use OutOfBoundsException; use ReflectionClass as CoreReflectionClass; @@ -10,14 +10,14 @@ use ReflectionException as CoreReflectionException; use ReflectionExtension as CoreReflectionExtension; use ReflectionMethod as CoreReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; +use PHPStan\BetterReflection\Util\FileHelper; use ValueError; use function array_combine; diff --git a/src/Reflection/Adapter/ReflectionEnumBackedCase.php b/src/Reflection/Adapter/ReflectionEnumBackedCase.php index 33a92eecf..205310b54 100644 --- a/src/Reflection/Adapter/ReflectionEnumBackedCase.php +++ b/src/Reflection/Adapter/ReflectionEnumBackedCase.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use OutOfBoundsException; use PhpParser\Node\Expr; use ReflectionEnumBackedCase as CoreReflectionEnumBackedCase; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; use UnitEnum; use ValueError; diff --git a/src/Reflection/Adapter/ReflectionEnumUnitCase.php b/src/Reflection/Adapter/ReflectionEnumUnitCase.php index 46f5ef8db..99a97e19c 100644 --- a/src/Reflection/Adapter/ReflectionEnumUnitCase.php +++ b/src/Reflection/Adapter/ReflectionEnumUnitCase.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use OutOfBoundsException; use ReflectionEnumUnitCase as CoreReflectionEnumUnitCase; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; use UnitEnum; use ValueError; diff --git a/src/Reflection/Adapter/ReflectionFunction.php b/src/Reflection/Adapter/ReflectionFunction.php index 9a22a0373..2d333649d 100644 --- a/src/Reflection/Adapter/ReflectionFunction.php +++ b/src/Reflection/Adapter/ReflectionFunction.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use Closure; use OutOfBoundsException; @@ -12,11 +12,11 @@ use ReflectionFunction as CoreReflectionFunction; use ReflectionType as CoreReflectionType; use ReturnTypeWillChange; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplemented; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; +use PHPStan\BetterReflection\Util\FileHelper; use Throwable; use ValueError; diff --git a/src/Reflection/Adapter/ReflectionIntersectionType.php b/src/Reflection/Adapter/ReflectionIntersectionType.php index bad7a121c..88376b79d 100644 --- a/src/Reflection/Adapter/ReflectionIntersectionType.php +++ b/src/Reflection/Adapter/ReflectionIntersectionType.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use ReflectionIntersectionType as CoreReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; use function array_map; use function assert; diff --git a/src/Reflection/Adapter/ReflectionMethod.php b/src/Reflection/Adapter/ReflectionMethod.php index 3bfe0c08a..ba1b25644 100644 --- a/src/Reflection/Adapter/ReflectionMethod.php +++ b/src/Reflection/Adapter/ReflectionMethod.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use Closure; use OutOfBoundsException; @@ -12,14 +12,14 @@ use ReflectionMethod as CoreReflectionMethod; use ReflectionType as CoreReflectionType; use ReturnTypeWillChange; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplemented; -use Roave\BetterReflection\Reflection\Exception\CodeLocationMissing; -use Roave\BetterReflection\Reflection\Exception\MethodPrototypeNotFound; -use Roave\BetterReflection\Reflection\Exception\NoObjectProvided; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented; +use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing; +use PHPStan\BetterReflection\Reflection\Exception\MethodPrototypeNotFound; +use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; +use PHPStan\BetterReflection\Util\FileHelper; use Throwable; use ValueError; diff --git a/src/Reflection/Adapter/ReflectionNamedType.php b/src/Reflection/Adapter/ReflectionNamedType.php index 7426f0c00..afee477c5 100644 --- a/src/Reflection/Adapter/ReflectionNamedType.php +++ b/src/Reflection/Adapter/ReflectionNamedType.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use ReflectionNamedType as CoreReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; use function strtolower; @@ -13,7 +13,7 @@ final class ReflectionNamedType extends CoreReflectionNamedType { /** - * @var \Roave\BetterReflection\Reflection\ReflectionNamedType|non-empty-string + * @var \PHPStan\BetterReflection\Reflection\ReflectionNamedType|non-empty-string */ private $type; private bool $allowsNull = false; @@ -25,7 +25,7 @@ final class ReflectionNamedType extends CoreReflectionNamedType /** @var non-empty-string */ private string $toString; - /** @param \Roave\BetterReflection\Reflection\ReflectionNamedType|non-empty-string $type */ + /** @param \PHPStan\BetterReflection\Reflection\ReflectionNamedType|non-empty-string $type */ public function __construct($type, bool $allowsNull = false) { $this->type = $type; diff --git a/src/Reflection/Adapter/ReflectionObject.php b/src/Reflection/Adapter/ReflectionObject.php index e6aa082cf..ef5d1c618 100644 --- a/src/Reflection/Adapter/ReflectionObject.php +++ b/src/Reflection/Adapter/ReflectionObject.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use OutOfBoundsException; use ReflectionClass as CoreReflectionClass; @@ -10,13 +10,13 @@ use ReflectionExtension as CoreReflectionExtension; use ReflectionObject as CoreReflectionObject; use ReturnTypeWillChange; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionObject as BetterReflectionObject; -use Roave\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionObject as BetterReflectionObject; +use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; +use PHPStan\BetterReflection\Util\FileHelper; use ValueError; use function array_combine; @@ -113,7 +113,7 @@ public function getDocComment() return $this->betterReflectionObject->getDocComment() ?? false; } - public function getConstructor(): ?\Roave\BetterReflection\Reflection\Adapter\ReflectionMethod + public function getConstructor(): ?\PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod { $constructor = $this->betterReflectionObject->getConstructor(); diff --git a/src/Reflection/Adapter/ReflectionParameter.php b/src/Reflection/Adapter/ReflectionParameter.php index 935de4db3..fa1904cf0 100644 --- a/src/Reflection/Adapter/ReflectionParameter.php +++ b/src/Reflection/Adapter/ReflectionParameter.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use LogicException; use OutOfBoundsException; @@ -11,13 +11,13 @@ use ReflectionFunctionAbstract as CoreReflectionFunctionAbstract; use ReflectionParameter as CoreReflectionParameter; use ReturnTypeWillChange; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionType as BetterReflectionType; -use Roave\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionType as BetterReflectionType; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; use ValueError; use function array_map; diff --git a/src/Reflection/Adapter/ReflectionProperty.php b/src/Reflection/Adapter/ReflectionProperty.php index a990944fa..bf2bc1488 100644 --- a/src/Reflection/Adapter/ReflectionProperty.php +++ b/src/Reflection/Adapter/ReflectionProperty.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use ArgumentCountError; use OutOfBoundsException; @@ -13,12 +13,12 @@ use ReflectionProperty as CoreReflectionProperty; use ReflectionType as CoreReflectionType; use ReturnTypeWillChange; -use Roave\BetterReflection\Reflection\Exception\NoObjectProvided; -use Roave\BetterReflection\Reflection\Exception\NotAnObject; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; -use Roave\BetterReflection\Reflection\ReflectionPropertyHookType as BetterReflectionPropertyHookType; +use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided; +use PHPStan\BetterReflection\Reflection\Exception\NotAnObject; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; +use PHPStan\BetterReflection\Reflection\ReflectionPropertyHookType as BetterReflectionPropertyHookType; use Throwable; use TypeError; use ValueError; @@ -321,7 +321,7 @@ public function hasHook(PropertyHookType $hookType): bool } /** @psalm-suppress UndefinedClass */ - public function getHook(PropertyHookType $hookType): ?\Roave\BetterReflection\Reflection\Adapter\ReflectionMethod + public function getHook(PropertyHookType $hookType): ?\PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod { $hook = $this->betterReflectionProperty->getHook(BetterReflectionPropertyHookType::fromCoreReflectionPropertyHookType($hookType)); if ($hook === null) { diff --git a/src/Reflection/Adapter/ReflectionType.php b/src/Reflection/Adapter/ReflectionType.php index c398fe8e6..eff9ac35b 100644 --- a/src/Reflection/Adapter/ReflectionType.php +++ b/src/Reflection/Adapter/ReflectionType.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use ReflectionType as CoreReflectionType; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionType as BetterReflectionType; -use Roave\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionType as BetterReflectionType; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; use function array_filter; use function array_values; @@ -19,7 +19,7 @@ abstract class ReflectionType extends CoreReflectionType { /** @psalm-pure * @param BetterReflectionUnionType|BetterReflectionNamedType|BetterReflectionIntersectionType|null $betterReflectionType - * @return \Roave\BetterReflection\Reflection\Adapter\ReflectionUnionType|\Roave\BetterReflection\Reflection\Adapter\ReflectionNamedType|\Roave\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|null */ + * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|null */ public static function fromTypeOrNull($betterReflectionType) { return $betterReflectionType !== null ? self::fromType($betterReflectionType) : null; @@ -30,7 +30,7 @@ public static function fromTypeOrNull($betterReflectionType) * * @psalm-pure * @param BetterReflectionNamedType|BetterReflectionUnionType|BetterReflectionIntersectionType $betterReflectionType - * @return \Roave\BetterReflection\Reflection\Adapter\ReflectionUnionType|\Roave\BetterReflection\Reflection\Adapter\ReflectionNamedType|\Roave\BetterReflection\Reflection\Adapter\ReflectionIntersectionType + * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType */ public static function fromType($betterReflectionType) { diff --git a/src/Reflection/Adapter/ReflectionUnionType.php b/src/Reflection/Adapter/ReflectionUnionType.php index db7745106..63f104541 100644 --- a/src/Reflection/Adapter/ReflectionUnionType.php +++ b/src/Reflection/Adapter/ReflectionUnionType.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Adapter; +namespace PHPStan\BetterReflection\Reflection\Adapter; use ReflectionUnionType as CoreReflectionUnionType; -use Roave\BetterReflection\Reflection\ReflectionType as BetterReflectionType; -use Roave\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; +use PHPStan\BetterReflection\Reflection\ReflectionType as BetterReflectionType; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; use function array_map; use function assert; diff --git a/src/Reflection/Annotation/AnnotationHelper.php b/src/Reflection/Annotation/AnnotationHelper.php index 66a8ba444..a0af5c435 100644 --- a/src/Reflection/Annotation/AnnotationHelper.php +++ b/src/Reflection/Annotation/AnnotationHelper.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Annotation; +namespace PHPStan\BetterReflection\Reflection\Annotation; use function preg_match; diff --git a/src/Reflection/Attribute/ReflectionAttributeHelper.php b/src/Reflection/Attribute/ReflectionAttributeHelper.php index eb5c50092..87ed83c30 100644 --- a/src/Reflection/Attribute/ReflectionAttributeHelper.php +++ b/src/Reflection/Attribute/ReflectionAttributeHelper.php @@ -2,18 +2,18 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Attribute; +namespace PHPStan\BetterReflection\Reflection\Attribute; use PhpParser\Node; -use Roave\BetterReflection\Reflection\ReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnumCase; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionProperty; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionProperty; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_filter; use function array_values; @@ -28,7 +28,7 @@ class ReflectionAttributeHelper * @return list * * @psalm-pure - * @param \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionClassConstant|\Roave\BetterReflection\Reflection\ReflectionEnumCase|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionParameter $reflection + * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionParameter $reflection */ public static function createAttributes(Reflector $reflector, $reflection, array $attrGroups): array { diff --git a/src/Reflection/Deprecated/DeprecatedHelper.php b/src/Reflection/Deprecated/DeprecatedHelper.php index 0c7f8b609..1e399b10d 100644 --- a/src/Reflection/Deprecated/DeprecatedHelper.php +++ b/src/Reflection/Deprecated/DeprecatedHelper.php @@ -2,22 +2,22 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Deprecated; +namespace PHPStan\BetterReflection\Reflection\Deprecated; -use Roave\BetterReflection\Reflection\Annotation\AnnotationHelper; -use Roave\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnumCase; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionProperty; +use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper; +use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionProperty; /** @internal */ final class DeprecatedHelper { /** @psalm-pure - * @param \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionClassConstant|\Roave\BetterReflection\Reflection\ReflectionEnumCase|\Roave\BetterReflection\Reflection\ReflectionProperty $reflection */ + * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionProperty $reflection */ public static function isDeprecated($reflection): bool { // We don't use Deprecated::class because the class is currently missing in stubs diff --git a/src/Reflection/Exception/CircularReference.php b/src/Reflection/Exception/CircularReference.php index 3a34fc2ee..b6392dc81 100644 --- a/src/Reflection/Exception/CircularReference.php +++ b/src/Reflection/Exception/CircularReference.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use UnexpectedValueException; diff --git a/src/Reflection/Exception/ClassDoesNotExist.php b/src/Reflection/Exception/ClassDoesNotExist.php index 2f347b4b3..043f42a27 100644 --- a/src/Reflection/Exception/ClassDoesNotExist.php +++ b/src/Reflection/Exception/ClassDoesNotExist.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; -use Roave\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflection\Reflection; use RuntimeException; use function sprintf; diff --git a/src/Reflection/Exception/CodeLocationMissing.php b/src/Reflection/Exception/CodeLocationMissing.php index 746424c3c..d6e49ac49 100644 --- a/src/Reflection/Exception/CodeLocationMissing.php +++ b/src/Reflection/Exception/CodeLocationMissing.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use RuntimeException; diff --git a/src/Reflection/Exception/FunctionDoesNotExist.php b/src/Reflection/Exception/FunctionDoesNotExist.php index 054c682a1..740f5af60 100644 --- a/src/Reflection/Exception/FunctionDoesNotExist.php +++ b/src/Reflection/Exception/FunctionDoesNotExist.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use RuntimeException; diff --git a/src/Reflection/Exception/InvalidArrowFunctionBodyNode.php b/src/Reflection/Exception/InvalidArrowFunctionBodyNode.php index 82abf1522..2833f0889 100644 --- a/src/Reflection/Exception/InvalidArrowFunctionBodyNode.php +++ b/src/Reflection/Exception/InvalidArrowFunctionBodyNode.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use PhpParser\Node\Stmt; -use Roave\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\BetterReflection; use RuntimeException; use function sprintf; diff --git a/src/Reflection/Exception/InvalidConstantNode.php b/src/Reflection/Exception/InvalidConstantNode.php index fafec209f..daa453189 100644 --- a/src/Reflection/Exception/InvalidConstantNode.php +++ b/src/Reflection/Exception/InvalidConstantNode.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use PhpParser\Node; -use Roave\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\BetterReflection; use RuntimeException; use function sprintf; diff --git a/src/Reflection/Exception/InvalidDefaultValueType.php b/src/Reflection/Exception/InvalidDefaultValueType.php index 78c3235dd..606748fb4 100644 --- a/src/Reflection/Exception/InvalidDefaultValueType.php +++ b/src/Reflection/Exception/InvalidDefaultValueType.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use RuntimeException; diff --git a/src/Reflection/Exception/MethodPrototypeNotFound.php b/src/Reflection/Exception/MethodPrototypeNotFound.php index 992790726..292396d59 100644 --- a/src/Reflection/Exception/MethodPrototypeNotFound.php +++ b/src/Reflection/Exception/MethodPrototypeNotFound.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use ReflectionException; diff --git a/src/Reflection/Exception/NoObjectProvided.php b/src/Reflection/Exception/NoObjectProvided.php index d2530fc92..b6ad6b6cd 100644 --- a/src/Reflection/Exception/NoObjectProvided.php +++ b/src/Reflection/Exception/NoObjectProvided.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use InvalidArgumentException; diff --git a/src/Reflection/Exception/NoParent.php b/src/Reflection/Exception/NoParent.php index 86e21a7e4..9baf24369 100644 --- a/src/Reflection/Exception/NoParent.php +++ b/src/Reflection/Exception/NoParent.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use LogicException; diff --git a/src/Reflection/Exception/NotAnObject.php b/src/Reflection/Exception/NotAnObject.php index e0bd833e5..b944b6f33 100644 --- a/src/Reflection/Exception/NotAnObject.php +++ b/src/Reflection/Exception/NotAnObject.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use InvalidArgumentException; diff --git a/src/Reflection/Exception/ObjectNotInstanceOfClass.php b/src/Reflection/Exception/ObjectNotInstanceOfClass.php index fb7c76700..2f7b3f5d1 100644 --- a/src/Reflection/Exception/ObjectNotInstanceOfClass.php +++ b/src/Reflection/Exception/ObjectNotInstanceOfClass.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use InvalidArgumentException; diff --git a/src/Reflection/Exception/PropertyDoesNotExist.php b/src/Reflection/Exception/PropertyDoesNotExist.php index 2afe38d9e..62521998d 100644 --- a/src/Reflection/Exception/PropertyDoesNotExist.php +++ b/src/Reflection/Exception/PropertyDoesNotExist.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use RuntimeException; diff --git a/src/Reflection/Exception/PropertyIsNotStatic.php b/src/Reflection/Exception/PropertyIsNotStatic.php index 9c3ecf598..4d46d615b 100644 --- a/src/Reflection/Exception/PropertyIsNotStatic.php +++ b/src/Reflection/Exception/PropertyIsNotStatic.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Exception; +namespace PHPStan\BetterReflection\Reflection\Exception; use RuntimeException; diff --git a/src/Reflection/Reflection.php b/src/Reflection/Reflection.php index f9d34cfe8..ae09fa962 100644 --- a/src/Reflection/Reflection.php +++ b/src/Reflection/Reflection.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; /** * This interface is used internally by the Generic reflector in order to diff --git a/src/Reflection/ReflectionAttribute.php b/src/Reflection/ReflectionAttribute.php index b5a407e2d..3b6d30514 100644 --- a/src/Reflection/ReflectionAttribute.php +++ b/src/Reflection/ReflectionAttribute.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use Attribute; use LogicException; use PhpParser\Node; -use Roave\BetterReflection\NodeCompiler\CompileNodeToValue; -use Roave\BetterReflection\NodeCompiler\CompilerContext; -use Roave\BetterReflection\Reflection\StringCast\ReflectionAttributeStringCast; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue; +use PHPStan\BetterReflection\NodeCompiler\CompilerContext; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionAttributeStringCast; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_map; @@ -19,7 +19,7 @@ class ReflectionAttribute { private Reflector $reflector; /** - * @var \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionClassConstant|\Roave\BetterReflection\Reflection\ReflectionEnumCase|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionParameter + * @var \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionParameter */ private $owner; private bool $isRepeated; @@ -30,7 +30,7 @@ class ReflectionAttribute private array $arguments; /** @internal - * @param \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionClassConstant|\Roave\BetterReflection\Reflection\ReflectionEnumCase|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionParameter $owner */ + * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionParameter $owner */ public function __construct(Reflector $reflector, Node\Attribute $node, $owner, bool $isRepeated) { $this->reflector = $reflector; @@ -45,7 +45,7 @@ public function __construct(Reflector $reflector, Node\Attribute $node, $owner, } /** @internal - * @param \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionClassConstant|\Roave\BetterReflection\Reflection\ReflectionEnumCase|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionParameter $owner */ + * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionParameter $owner */ public function withOwner($owner): self { $clone = clone $this; diff --git a/src/Reflection/ReflectionClass.php b/src/Reflection/ReflectionClass.php index 879803e62..6bb3a5dc6 100644 --- a/src/Reflection/ReflectionClass.php +++ b/src/Reflection/ReflectionClass.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use BackedEnum; use PhpParser\Modifiers; @@ -16,27 +16,27 @@ use ReflectionClass as CoreReflectionClass; use ReflectionException; use ReflectionMethod as CoreReflectionMethod; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; -use Roave\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; -use Roave\BetterReflection\Reflection\Deprecated\DeprecatedHelper; -use Roave\BetterReflection\Reflection\Exception\CircularReference; -use Roave\BetterReflection\Reflection\Exception\ClassDoesNotExist; -use Roave\BetterReflection\Reflection\Exception\NoObjectProvided; -use Roave\BetterReflection\Reflection\Exception\NotAnObject; -use Roave\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; -use Roave\BetterReflection\Reflection\Exception\PropertyDoesNotExist; -use Roave\BetterReflection\Reflection\StringCast\ReflectionClassStringCast; -use Roave\BetterReflection\Reflection\Support\AlreadyVisitedClasses; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Located\InternalLocatedSource; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\Util\CalculateReflectionColumn; -use Roave\BetterReflection\Util\GetLastDocComment; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; +use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; +use PHPStan\BetterReflection\Reflection\Deprecated\DeprecatedHelper; +use PHPStan\BetterReflection\Reflection\Exception\CircularReference; +use PHPStan\BetterReflection\Reflection\Exception\ClassDoesNotExist; +use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided; +use PHPStan\BetterReflection\Reflection\Exception\NotAnObject; +use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; +use PHPStan\BetterReflection\Reflection\Exception\PropertyDoesNotExist; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionClassStringCast; +use PHPStan\BetterReflection\Reflection\Support\AlreadyVisitedClasses; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Util\CalculateReflectionColumn; +use PHPStan\BetterReflection\Util\GetLastDocComment; use Stringable; use Traversable; use UnitEnum; @@ -152,7 +152,7 @@ class ReflectionClass implements Reflection private $cachedTraits = null; /** - * @var \Roave\BetterReflection\Reflection\ReflectionMethod|null + * @var \PHPStan\BetterReflection\Reflection\ReflectionMethod|null */ private $cachedConstructor = null; @@ -682,7 +682,7 @@ private function addEnumMethods(EnumNode $node, array $methods): array * * @param non-empty-string $methodName */ - public function getMethod(string $methodName): ?\Roave\BetterReflection\Reflection\ReflectionMethod + public function getMethod(string $methodName): ?\PHPStan\BetterReflection\Reflection\ReflectionMethod { $lowercaseMethodName = strtolower($methodName); $methods = $this->getMethodsIndexedByLowercasedName(AlreadyVisitedClasses::createEmpty()); @@ -737,7 +737,7 @@ public function hasConstant(string $name): bool * * @param non-empty-string $name */ - public function getConstant(string $name): ?\Roave\BetterReflection\Reflection\ReflectionClassConstant + public function getConstant(string $name): ?\PHPStan\BetterReflection\Reflection\ReflectionClassConstant { return $this->getConstants()[$name] ?? null; } @@ -840,7 +840,7 @@ private function getConstantsConsideringAlreadyVisitedClasses(AlreadyVisitedClas /** * Get the constructor method for this class. */ - public function getConstructor(): ?\Roave\BetterReflection\Reflection\ReflectionMethod + public function getConstructor(): ?\PHPStan\BetterReflection\Reflection\ReflectionMethod { if ($this->cachedConstructor !== null) { return $this->cachedConstructor; @@ -1066,7 +1066,7 @@ private function getPropertiesConsideringAlreadyVisitedClasses(AlreadyVisitedCla * * @param non-empty-string $name */ - public function getProperty(string $name): ?\Roave\BetterReflection\Reflection\ReflectionProperty + public function getProperty(string $name): ?\PHPStan\BetterReflection\Reflection\ReflectionProperty { $properties = $this->getProperties(); @@ -1142,7 +1142,7 @@ public function getEndColumn(): int /** * Get the parent class, if it is defined. */ - public function getParentClass(): ?\Roave\BetterReflection\Reflection\ReflectionClass + public function getParentClass(): ?\PHPStan\BetterReflection\Reflection\ReflectionClass { $parentClassName = $this->getParentClassName(); if ($parentClassName === null) { diff --git a/src/Reflection/ReflectionClassConstant.php b/src/Reflection/ReflectionClassConstant.php index 551003bea..8bb9102a2 100644 --- a/src/Reflection/ReflectionClassConstant.php +++ b/src/Reflection/ReflectionClassConstant.php @@ -2,22 +2,22 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use PhpParser\Node; use PhpParser\Node\Stmt\ClassConst; use ReflectionClassConstant as CoreReflectionClassConstant; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\NodeCompiler\CompiledValue; -use Roave\BetterReflection\NodeCompiler\CompileNodeToValue; -use Roave\BetterReflection\NodeCompiler\CompilerContext; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; -use Roave\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; -use Roave\BetterReflection\Reflection\Deprecated\DeprecatedHelper; -use Roave\BetterReflection\Reflection\StringCast\ReflectionClassConstantStringCast; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\Util\CalculateReflectionColumn; -use Roave\BetterReflection\Util\GetLastDocComment; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\NodeCompiler\CompiledValue; +use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue; +use PHPStan\BetterReflection\NodeCompiler\CompilerContext; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; +use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; +use PHPStan\BetterReflection\Reflection\Deprecated\DeprecatedHelper; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionClassConstantStringCast; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Util\CalculateReflectionColumn; +use PHPStan\BetterReflection\Util\GetLastDocComment; use function array_map; use function assert; @@ -35,7 +35,7 @@ class ReflectionClassConstant private int $modifiers; /** - * @var \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @var \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ private $type; @@ -60,7 +60,7 @@ class ReflectionClassConstant private int $endColumn; /** @psalm-allow-private-mutation - * @var \Roave\BetterReflection\NodeCompiler\CompiledValue|null */ + * @var \PHPStan\BetterReflection\NodeCompiler\CompiledValue|null */ private $compiledValue = null; private function __construct(Reflector $reflector, ClassConst $node, int $positionInNode, ReflectionClass $declaringClass, ReflectionClass $implementingClass) @@ -125,7 +125,7 @@ public function getName(): string } /** - * @return \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ private function createType(ClassConst $node) { @@ -141,7 +141,7 @@ private function createType(ClassConst $node) } /** - * @return \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ public function getType() { diff --git a/src/Reflection/ReflectionConstant.php b/src/Reflection/ReflectionConstant.php index c2b2746c4..e2da72751 100644 --- a/src/Reflection/ReflectionConstant.php +++ b/src/Reflection/ReflectionConstant.php @@ -2,22 +2,22 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use PhpParser\Node; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\NodeCompiler\CompiledValue; -use Roave\BetterReflection\NodeCompiler\CompileNodeToValue; -use Roave\BetterReflection\NodeCompiler\CompilerContext; -use Roave\BetterReflection\Reflection\Annotation\AnnotationHelper; -use Roave\BetterReflection\Reflection\Exception\InvalidConstantNode; -use Roave\BetterReflection\Reflection\StringCast\ReflectionConstantStringCast; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\Util\CalculateReflectionColumn; -use Roave\BetterReflection\Util\ConstantNodeChecker; -use Roave\BetterReflection\Util\GetLastDocComment; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\NodeCompiler\CompiledValue; +use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue; +use PHPStan\BetterReflection\NodeCompiler\CompilerContext; +use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper; +use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionConstantStringCast; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Util\CalculateReflectionColumn; +use PHPStan\BetterReflection\Util\ConstantNodeChecker; +use PHPStan\BetterReflection\Util\GetLastDocComment; use function array_slice; use function assert; @@ -65,7 +65,7 @@ class ReflectionConstant implements Reflection private int $endColumn; /** @psalm-allow-private-mutation - * @var \Roave\BetterReflection\NodeCompiler\CompiledValue|null */ + * @var \PHPStan\BetterReflection\NodeCompiler\CompiledValue|null */ private $compiledValue = null; /** @param non-empty-string|null $namespace diff --git a/src/Reflection/ReflectionEnum.php b/src/Reflection/ReflectionEnum.php index ff9e7f59a..3e74f9366 100644 --- a/src/Reflection/ReflectionEnum.php +++ b/src/Reflection/ReflectionEnum.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use LogicException; use PhpParser\Node; @@ -10,8 +10,8 @@ use PhpParser\Node\Stmt\Enum_ as EnumNode; use PhpParser\Node\Stmt\Interface_ as InterfaceNode; use PhpParser\Node\Stmt\Trait_ as TraitNode; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; use function array_combine; use function array_filter; @@ -24,7 +24,7 @@ class ReflectionEnum extends ReflectionClass { private Reflector $reflector; /** - * @var \Roave\BetterReflection\Reflection\ReflectionNamedType|null + * @var \PHPStan\BetterReflection\Reflection\ReflectionNamedType|null */ private $backingType; @@ -66,7 +66,7 @@ public function hasCase(string $name): bool } /** @param non-empty-string $name */ - public function getCase(string $name): ?\Roave\BetterReflection\Reflection\ReflectionEnumCase + public function getCase(string $name): ?\PHPStan\BetterReflection\Reflection\ReflectionEnumCase { return $this->cases[$name] ?? null; } @@ -102,7 +102,7 @@ public function getBackingType(): ReflectionNamedType return $this->backingType; } - private function createBackingType(EnumNode $node): ?\Roave\BetterReflection\Reflection\ReflectionNamedType + private function createBackingType(EnumNode $node): ?\PHPStan\BetterReflection\Reflection\ReflectionNamedType { if ($node->scalarType === null) { return null; diff --git a/src/Reflection/ReflectionEnumCase.php b/src/Reflection/ReflectionEnumCase.php index 39cab71d6..70d70ab11 100644 --- a/src/Reflection/ReflectionEnumCase.php +++ b/src/Reflection/ReflectionEnumCase.php @@ -2,20 +2,20 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use LogicException; use PhpParser\Node; use PhpParser\Node\Stmt\EnumCase; -use Roave\BetterReflection\NodeCompiler\CompiledValue; -use Roave\BetterReflection\NodeCompiler\CompileNodeToValue; -use Roave\BetterReflection\NodeCompiler\CompilerContext; -use Roave\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; -use Roave\BetterReflection\Reflection\Deprecated\DeprecatedHelper; -use Roave\BetterReflection\Reflection\StringCast\ReflectionEnumCaseStringCast; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\Util\CalculateReflectionColumn; -use Roave\BetterReflection\Util\GetLastDocComment; +use PHPStan\BetterReflection\NodeCompiler\CompiledValue; +use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue; +use PHPStan\BetterReflection\NodeCompiler\CompilerContext; +use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; +use PHPStan\BetterReflection\Reflection\Deprecated\DeprecatedHelper; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionEnumCaseStringCast; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Util\CalculateReflectionColumn; +use PHPStan\BetterReflection\Util\GetLastDocComment; use function assert; use function is_int; @@ -53,7 +53,7 @@ class ReflectionEnumCase private int $endColumn; /** @psalm-allow-private-mutation - * @var \Roave\BetterReflection\NodeCompiler\CompiledValue|null */ + * @var \PHPStan\BetterReflection\NodeCompiler\CompiledValue|null */ private $compiledValue = null; private function __construct(Reflector $reflector, EnumCase $node, ReflectionEnum $enum) diff --git a/src/Reflection/ReflectionFunction.php b/src/Reflection/ReflectionFunction.php index 8bbbff73d..ba0d8efbc 100644 --- a/src/Reflection/ReflectionFunction.php +++ b/src/Reflection/ReflectionFunction.php @@ -2,20 +2,20 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use Closure; use PhpParser\Node; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplemented; -use Roave\BetterReflection\Reflection\Exception\FunctionDoesNotExist; -use Roave\BetterReflection\Reflection\StringCast\ReflectionFunctionStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\ClosureSourceLocator; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented; +use PHPStan\BetterReflection\Reflection\Exception\FunctionDoesNotExist; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionFunctionStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\ClosureSourceLocator; use function assert; use function function_exists; diff --git a/src/Reflection/ReflectionFunctionAbstract.php b/src/Reflection/ReflectionFunctionAbstract.php index 3af22717a..c58875597 100644 --- a/src/Reflection/ReflectionFunctionAbstract.php +++ b/src/Reflection/ReflectionFunctionAbstract.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use PhpParser\Node; use PhpParser\Node\Expr\Throw_ as NodeThrow; @@ -11,14 +11,14 @@ use PhpParser\Node\Stmt\ClassMethod as MethodNode; use PhpParser\NodeTraverser; use PhpParser\NodeVisitor\FindingVisitor; -use Roave\BetterReflection\Reflection\Annotation\AnnotationHelper; -use Roave\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; -use Roave\BetterReflection\Reflection\Deprecated\DeprecatedHelper; -use Roave\BetterReflection\Reflection\Exception\CodeLocationMissing; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\Util\CalculateReflectionColumn; -use Roave\BetterReflection\Util\Exception\NoNodePosition; -use Roave\BetterReflection\Util\GetLastDocComment; +use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper; +use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; +use PHPStan\BetterReflection\Reflection\Deprecated\DeprecatedHelper; +use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Util\CalculateReflectionColumn; +use PHPStan\BetterReflection\Util\Exception\NoNodePosition; +use PHPStan\BetterReflection\Util\GetLastDocComment; use function array_filter; use function array_values; @@ -45,7 +45,7 @@ trait ReflectionFunctionAbstract private bool $returnsReference; /** @psalm-allow-private-mutation - * @var \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null */ + * @var \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ protected $returnType; /** @@ -255,7 +255,7 @@ private function isParameterOptional(array $parameterNodes, int $parameterIndex) * * @param non-empty-string $parameterName */ - public function getParameter(string $parameterName): ?\Roave\BetterReflection\Reflection\ReflectionParameter + public function getParameter(string $parameterName): ?\PHPStan\BetterReflection\Reflection\ReflectionParameter { return $this->parameters[$parameterName] ?? null; } @@ -464,7 +464,7 @@ public function returnsReference(): bool /** * Get the return type declaration - * @return \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ public function getReturnType() { @@ -497,7 +497,7 @@ public function hasTentativeReturnType(): bool } /** - * @return \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ public function getTentativeReturnType() { @@ -510,7 +510,7 @@ public function getTentativeReturnType() /** * @param MethodNode|\PhpParser\Node\PropertyHook|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction $node - * @return \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ private function createReturnType($node) { diff --git a/src/Reflection/ReflectionIntersectionType.php b/src/Reflection/ReflectionIntersectionType.php index c9c6dd8b9..e6eeb39ac 100644 --- a/src/Reflection/ReflectionIntersectionType.php +++ b/src/Reflection/ReflectionIntersectionType.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use PhpParser\Node; use PhpParser\Node\IntersectionType; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_map; use function assert; @@ -19,7 +19,7 @@ class ReflectionIntersectionType extends ReflectionType private array $types; /** @internal - * @param \Roave\BetterReflection\Reflection\ReflectionParameter|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionEnum|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant $owner */ + * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant $owner */ public function __construct(Reflector $reflector, $owner, IntersectionType $type) { /** @var non-empty-list $types */ @@ -33,7 +33,7 @@ public function __construct(Reflector $reflector, $owner, IntersectionType $type } /** @internal - * @param \Roave\BetterReflection\Reflection\ReflectionParameter|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionEnum|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant $owner + * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant $owner * @return static */ public function withOwner($owner) { diff --git a/src/Reflection/ReflectionMethod.php b/src/Reflection/ReflectionMethod.php index 2e2d002dd..fa8280959 100644 --- a/src/Reflection/ReflectionMethod.php +++ b/src/Reflection/ReflectionMethod.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use Closure; use OutOfBoundsException; @@ -10,15 +10,15 @@ use PhpParser\Node\Stmt\ClassMethod as MethodNode; use ReflectionException; use ReflectionMethod as CoreReflectionMethod; -use Roave\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; -use Roave\BetterReflection\Reflection\Exception\ClassDoesNotExist; -use Roave\BetterReflection\Reflection\Exception\NoObjectProvided; -use Roave\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; -use Roave\BetterReflection\Reflection\StringCast\ReflectionMethodStringCast; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\Util\ClassExistenceChecker; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; +use PHPStan\BetterReflection\Reflection\Exception\ClassDoesNotExist; +use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided; +use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionMethodStringCast; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Util\ClassExistenceChecker; use function array_map; use function assert; @@ -42,7 +42,7 @@ class ReflectionMethod */ private $aliasName; /** - * @var \Roave\BetterReflection\Reflection\ReflectionProperty|null + * @var \PHPStan\BetterReflection\Reflection\ReflectionProperty|null */ private $hookProperty = null; use ReflectionFunctionAbstract; @@ -56,7 +56,7 @@ class ReflectionMethod * @param non-empty-string|null $namespace * @param MethodNode|\PhpParser\Node\PropertyHook|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction $node */ - private function __construct(Reflector $reflector, $node, LocatedSource $locatedSource, string $name, ?string $namespace, ReflectionClass $declaringClass, ReflectionClass $implementingClass, ReflectionClass $currentClass, ?string $aliasName, ?\Roave\BetterReflection\Reflection\ReflectionProperty $hookProperty = null) + private function __construct(Reflector $reflector, $node, LocatedSource $locatedSource, string $name, ?string $namespace, ReflectionClass $declaringClass, ReflectionClass $implementingClass, ReflectionClass $currentClass, ?string $aliasName, ?\PHPStan\BetterReflection\Reflection\ReflectionProperty $hookProperty = null) { $this->reflector = $reflector; $this->locatedSource = $locatedSource; @@ -441,7 +441,7 @@ public function isHook(): bool return $this->hookProperty !== null; } - public function getHookProperty(): ?\Roave\BetterReflection\Reflection\ReflectionProperty + public function getHookProperty(): ?\PHPStan\BetterReflection\Reflection\ReflectionProperty { return $this->hookProperty; } diff --git a/src/Reflection/ReflectionNamedType.php b/src/Reflection/ReflectionNamedType.php index b6c0670da..333f1ed54 100644 --- a/src/Reflection/ReflectionNamedType.php +++ b/src/Reflection/ReflectionNamedType.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use LogicException; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_key_exists; use function assert; @@ -19,7 +19,7 @@ class ReflectionNamedType extends ReflectionType { private Reflector $reflector; /** - * @var \Roave\BetterReflection\Reflection\ReflectionParameter|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionEnum|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant + * @var \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant */ private $owner; /** @@ -50,7 +50,7 @@ class ReflectionNamedType extends ReflectionType private string $name; /** @internal - * @param \Roave\BetterReflection\Reflection\ReflectionParameter|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionEnum|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant $owner + * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant $owner * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name $type */ public function __construct(Reflector $reflector, $owner, $type) { @@ -61,7 +61,7 @@ public function __construct(Reflector $reflector, $owner, $type) } /** @internal - * @param \Roave\BetterReflection\Reflection\ReflectionParameter|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionEnum|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant $owner + * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant $owner * @return static */ public function withOwner($owner) { diff --git a/src/Reflection/ReflectionObject.php b/src/Reflection/ReflectionObject.php index 6f33e33aa..275cb1902 100644 --- a/src/Reflection/ReflectionObject.php +++ b/src/Reflection/ReflectionObject.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use InvalidArgumentException; use PhpParser\Builder\Property as PropertyNodeBuilder; @@ -10,14 +10,14 @@ use ReflectionException; use ReflectionObject as CoreReflectionObject; use ReflectionProperty as CoreReflectionProperty; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\AnonymousClassObjectSourceLocator; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\AnonymousClassObjectSourceLocator; use function array_filter; use function array_map; @@ -172,7 +172,7 @@ public function getImmediateMethods(int $filter = 0): array } /** @param non-empty-string $methodName */ - public function getMethod(string $methodName): ?\Roave\BetterReflection\Reflection\ReflectionMethod + public function getMethod(string $methodName): ?\PHPStan\BetterReflection\Reflection\ReflectionMethod { return $this->reflectionClass->getMethod($methodName); } @@ -204,12 +204,12 @@ public function hasConstant(string $name): bool return $this->reflectionClass->hasConstant($name); } - public function getConstant(string $name): ?\Roave\BetterReflection\Reflection\ReflectionClassConstant + public function getConstant(string $name): ?\PHPStan\BetterReflection\Reflection\ReflectionClassConstant { return $this->reflectionClass->getConstant($name); } - public function getConstructor(): ?\Roave\BetterReflection\Reflection\ReflectionMethod + public function getConstructor(): ?\PHPStan\BetterReflection\Reflection\ReflectionMethod { return $this->reflectionClass->getConstructor(); } @@ -236,7 +236,7 @@ public function getImmediateProperties(int $filter = 0): array ); } - public function getProperty(string $name): ?\Roave\BetterReflection\Reflection\ReflectionProperty + public function getProperty(string $name): ?\PHPStan\BetterReflection\Reflection\ReflectionProperty { $runtimeProperties = $this->getRuntimeProperties(); @@ -296,7 +296,7 @@ public function getEndColumn(): int return $this->reflectionClass->getEndColumn(); } - public function getParentClass(): ?\Roave\BetterReflection\Reflection\ReflectionClass + public function getParentClass(): ?\PHPStan\BetterReflection\Reflection\ReflectionClass { return $this->reflectionClass->getParentClass(); } diff --git a/src/Reflection/ReflectionParameter.php b/src/Reflection/ReflectionParameter.php index b814829a8..fcdb8b165 100644 --- a/src/Reflection/ReflectionParameter.php +++ b/src/Reflection/ReflectionParameter.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use Closure; use Exception; @@ -11,16 +11,16 @@ use OutOfBoundsException; use PhpParser\Node; use PhpParser\Node\Param as ParamNode; -use Roave\BetterReflection\NodeCompiler\CompiledValue; -use Roave\BetterReflection\NodeCompiler\CompileNodeToValue; -use Roave\BetterReflection\NodeCompiler\CompilerContext; -use Roave\BetterReflection\NodeCompiler\Exception\UnableToCompileNode; -use Roave\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; -use Roave\BetterReflection\Reflection\Exception\CodeLocationMissing; -use Roave\BetterReflection\Reflection\StringCast\ReflectionParameterStringCast; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\Util\CalculateReflectionColumn; -use Roave\BetterReflection\Util\Exception\NoNodePosition; +use PHPStan\BetterReflection\NodeCompiler\CompiledValue; +use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue; +use PHPStan\BetterReflection\NodeCompiler\CompilerContext; +use PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode; +use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; +use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionParameterStringCast; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Util\CalculateReflectionColumn; +use PHPStan\BetterReflection\Util\Exception\NoNodePosition; use function array_map; use function assert; @@ -35,7 +35,7 @@ class ReflectionParameter { private Reflector $reflector; /** - * @var \Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction + * @var \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction */ private $function; private int $parameterIndex; @@ -49,7 +49,7 @@ class ReflectionParameter private $default; /** - * @var \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @var \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ private $type; @@ -75,11 +75,11 @@ class ReflectionParameter private $endColumn; /** @psalm-allow-private-mutation - * @var \Roave\BetterReflection\NodeCompiler\CompiledValue|null */ + * @var \PHPStan\BetterReflection\NodeCompiler\CompiledValue|null */ private $compiledDefaultValue = null; /** - * @param \Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction $function + * @param \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction $function */ private function __construct(Reflector $reflector, ParamNode $node, $function, int $parameterIndex, bool $isOptional) { @@ -169,7 +169,7 @@ public function __toString(): string * @internal * * @param ParamNode $node Node has to be processed by the PhpParser\NodeVisitor\NameResolver - * @param \Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction $function + * @param \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction $function */ public static function createFromNode(Reflector $reflector, ParamNode $node, $function, int $parameterIndex, bool $isOptional): self { @@ -183,7 +183,7 @@ public static function createFromNode(Reflector $reflector, ParamNode $node, $fu } /** @internal - * @param \Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction $function */ + * @param \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction $function */ public function withFunction($function): self { $clone = clone $this; @@ -229,7 +229,7 @@ public function getName(): string /** * Get the function (or method) that declared this parameter. - * @return \Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction + * @return \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction */ public function getDeclaringFunction() { @@ -242,7 +242,7 @@ public function getDeclaringFunction() * * This will return null if the declaring function is not a method. */ - public function getDeclaringClass(): ?\Roave\BetterReflection\Reflection\ReflectionClass + public function getDeclaringClass(): ?\PHPStan\BetterReflection\Reflection\ReflectionClass { if ($this->function instanceof ReflectionMethod) { return $this->function->getDeclaringClass(); @@ -251,7 +251,7 @@ public function getDeclaringClass(): ?\Roave\BetterReflection\Reflection\Reflect return null; } - public function getImplementingClass(): ?\Roave\BetterReflection\Reflection\ReflectionClass + public function getImplementingClass(): ?\PHPStan\BetterReflection\Reflection\ReflectionClass { if ($this->function instanceof ReflectionMethod) { return $this->function->getImplementingClass(); @@ -336,7 +336,7 @@ public function getPosition(): int * this parameter * * (note: this has nothing to do with DocBlocks). - * @return \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ public function getType() { @@ -344,7 +344,7 @@ public function getType() } /** - * @return \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ private function createType(ParamNode $node) { diff --git a/src/Reflection/ReflectionProperty.php b/src/Reflection/ReflectionProperty.php index 491b847d3..322cc60c9 100644 --- a/src/Reflection/ReflectionProperty.php +++ b/src/Reflection/ReflectionProperty.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use Closure; use Error; @@ -14,24 +14,24 @@ use PhpParser\NodeVisitor\FindingVisitor; use ReflectionException; use ReflectionProperty as CoreReflectionProperty; -use Roave\BetterReflection\NodeCompiler\CompiledValue; -use Roave\BetterReflection\NodeCompiler\CompileNodeToValue; -use Roave\BetterReflection\NodeCompiler\CompilerContext; -use Roave\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; -use Roave\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; -use Roave\BetterReflection\Reflection\Deprecated\DeprecatedHelper; -use Roave\BetterReflection\Reflection\Exception\ClassDoesNotExist; -use Roave\BetterReflection\Reflection\Exception\CodeLocationMissing; -use Roave\BetterReflection\Reflection\Exception\NoObjectProvided; -use Roave\BetterReflection\Reflection\Exception\NotAnObject; -use Roave\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; -use Roave\BetterReflection\Reflection\StringCast\ReflectionPropertyStringCast; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\Util\CalculateReflectionColumn; -use Roave\BetterReflection\Util\ClassExistenceChecker; -use Roave\BetterReflection\Util\Exception\NoNodePosition; -use Roave\BetterReflection\Util\GetLastDocComment; +use PHPStan\BetterReflection\NodeCompiler\CompiledValue; +use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue; +use PHPStan\BetterReflection\NodeCompiler\CompilerContext; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; +use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; +use PHPStan\BetterReflection\Reflection\Deprecated\DeprecatedHelper; +use PHPStan\BetterReflection\Reflection\Exception\ClassDoesNotExist; +use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing; +use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided; +use PHPStan\BetterReflection\Reflection\Exception\NotAnObject; +use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionPropertyStringCast; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Util\CalculateReflectionColumn; +use PHPStan\BetterReflection\Util\ClassExistenceChecker; +use PHPStan\BetterReflection\Util\Exception\NoNodePosition; +use PHPStan\BetterReflection\Util\GetLastDocComment; use function array_map; use function assert; @@ -56,7 +56,7 @@ class ReflectionProperty private int $modifiers; /** - * @var \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @var \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ private $type; @@ -99,7 +99,7 @@ class ReflectionProperty private $cachedVirtual = null; /** @psalm-allow-private-mutation - * @var \Roave\BetterReflection\NodeCompiler\CompiledValue|null */ + * @var \PHPStan\BetterReflection\NodeCompiler\CompiledValue|null */ private $compiledDefaultValue = null; private function __construct(Reflector $reflector, PropertyNode $node, Node\PropertyItem $propertyNode, ReflectionClass $declaringClass, ReflectionClass $implementingClass, bool $isPromoted, bool $declaredAtCompileTime) @@ -547,7 +547,7 @@ public function allowsNull(): bool } /** - * @return \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ private function createType(PropertyNode $node) { @@ -567,7 +567,7 @@ private function createType(PropertyNode $node) * this property * * (note: this has nothing to do with DocBlocks). - * @return \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */ public function getType() { @@ -607,7 +607,7 @@ public function hasHook(string $hookType): bool /** * @param @param ReflectionPropertyHookType::* $hookType */ - public function getHook(string $hookType): ?\Roave\BetterReflection\Reflection\ReflectionMethod + public function getHook(string $hookType): ?\PHPStan\BetterReflection\Reflection\ReflectionMethod { return $this->getHooks()[$hookType] ?? null; } @@ -815,7 +815,7 @@ private function createCachedHooks(): array return $hooks; } - private function getParentProperty(): ?\Roave\BetterReflection\Reflection\ReflectionProperty + private function getParentProperty(): ?\PHPStan\BetterReflection\Reflection\ReflectionProperty { return ($nullsafeVariable3 = $this->getDeclaringClass()->getParentClass()) ? $nullsafeVariable3->getProperty($this->name) : null; } diff --git a/src/Reflection/ReflectionPropertyHookType.php b/src/Reflection/ReflectionPropertyHookType.php index 1591aefd5..b5dac733d 100644 --- a/src/Reflection/ReflectionPropertyHookType.php +++ b/src/Reflection/ReflectionPropertyHookType.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use PropertyHookType as CoreReflectionPropertyHookType; diff --git a/src/Reflection/ReflectionType.php b/src/Reflection/ReflectionType.php index 83ca81905..f2e273ad2 100644 --- a/src/Reflection/ReflectionType.php +++ b/src/Reflection/ReflectionType.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use PhpParser\Node\Identifier; use PhpParser\Node\IntersectionType; use PhpParser\Node\Name; use PhpParser\Node\NullableType; use PhpParser\Node\UnionType; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflector\Reflector; /** @psalm-immutable */ abstract class ReflectionType @@ -18,9 +18,9 @@ abstract class ReflectionType * @internal * * @psalm-pure - * @param \Roave\BetterReflection\Reflection\ReflectionParameter|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionEnum|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant $owner + * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant $owner * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\IntersectionType $type - * @return \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType + * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType */ public static function createFromNode(Reflector $reflector, $owner, $type, bool $allowsNull = false) { diff --git a/src/Reflection/ReflectionUnionType.php b/src/Reflection/ReflectionUnionType.php index b28fa6a94..2693eba74 100644 --- a/src/Reflection/ReflectionUnionType.php +++ b/src/Reflection/ReflectionUnionType.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection; +namespace PHPStan\BetterReflection\Reflection; use PhpParser\Node\Identifier; use PhpParser\Node\IntersectionType; use PhpParser\Node\Name; use PhpParser\Node\UnionType; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_map; use function assert; @@ -22,7 +22,7 @@ class ReflectionUnionType extends ReflectionType private array $types; /** @internal - * @param \Roave\BetterReflection\Reflection\ReflectionParameter|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionEnum|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant $owner */ + * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant $owner */ public function __construct(Reflector $reflector, $owner, UnionType $type) { /** @var non-empty-list $types */ @@ -36,7 +36,7 @@ public function __construct(Reflector $reflector, $owner, UnionType $type) } /** @internal - * @param \Roave\BetterReflection\Reflection\ReflectionParameter|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionEnum|\Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant $owner + * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant $owner * @return static */ public function withOwner($owner) { diff --git a/src/Reflection/StringCast/ReflectionAttributeStringCast.php b/src/Reflection/StringCast/ReflectionAttributeStringCast.php index b28384f6a..c00d05f45 100644 --- a/src/Reflection/StringCast/ReflectionAttributeStringCast.php +++ b/src/Reflection/StringCast/ReflectionAttributeStringCast.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; +namespace PHPStan\BetterReflection\Reflection\StringCast; -use Roave\BetterReflection\Reflection\ReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute; use function count; use function is_array; diff --git a/src/Reflection/StringCast/ReflectionClassConstantStringCast.php b/src/Reflection/StringCast/ReflectionClassConstantStringCast.php index 591c6392b..b9d93feb7 100644 --- a/src/Reflection/StringCast/ReflectionClassConstantStringCast.php +++ b/src/Reflection/StringCast/ReflectionClassConstantStringCast.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; +namespace PHPStan\BetterReflection\Reflection\StringCast; -use Roave\BetterReflection\Reflection\ReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant; use function gettype; use function is_array; diff --git a/src/Reflection/StringCast/ReflectionClassStringCast.php b/src/Reflection/StringCast/ReflectionClassStringCast.php index 37fd97c01..44dec5182 100644 --- a/src/Reflection/StringCast/ReflectionClassStringCast.php +++ b/src/Reflection/StringCast/ReflectionClassStringCast.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; - -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionEnumCase; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionObject; -use Roave\BetterReflection\Reflection\ReflectionProperty; +namespace PHPStan\BetterReflection\Reflection\StringCast; + +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionObject; +use PHPStan\BetterReflection\Reflection\ReflectionProperty; use function array_filter; use function array_map; diff --git a/src/Reflection/StringCast/ReflectionConstantStringCast.php b/src/Reflection/StringCast/ReflectionConstantStringCast.php index 2c551b3c5..41270b268 100644 --- a/src/Reflection/StringCast/ReflectionConstantStringCast.php +++ b/src/Reflection/StringCast/ReflectionConstantStringCast.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; +namespace PHPStan\BetterReflection\Reflection\StringCast; -use Roave\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; use function assert; use function gettype; diff --git a/src/Reflection/StringCast/ReflectionEnumCaseStringCast.php b/src/Reflection/StringCast/ReflectionEnumCaseStringCast.php index 6e5257865..d2583f8bc 100644 --- a/src/Reflection/StringCast/ReflectionEnumCaseStringCast.php +++ b/src/Reflection/StringCast/ReflectionEnumCaseStringCast.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; +namespace PHPStan\BetterReflection\Reflection\StringCast; -use Roave\BetterReflection\Reflection\ReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase; use function gettype; use function sprintf; diff --git a/src/Reflection/StringCast/ReflectionFunctionStringCast.php b/src/Reflection/StringCast/ReflectionFunctionStringCast.php index 274780731..81981d56f 100644 --- a/src/Reflection/StringCast/ReflectionFunctionStringCast.php +++ b/src/Reflection/StringCast/ReflectionFunctionStringCast.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; +namespace PHPStan\BetterReflection\Reflection\StringCast; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; use function array_reduce; use function assert; diff --git a/src/Reflection/StringCast/ReflectionMethodStringCast.php b/src/Reflection/StringCast/ReflectionMethodStringCast.php index 1e60ddc83..2d0d9f0db 100644 --- a/src/Reflection/StringCast/ReflectionMethodStringCast.php +++ b/src/Reflection/StringCast/ReflectionMethodStringCast.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; +namespace PHPStan\BetterReflection\Reflection\StringCast; -use Roave\BetterReflection\Reflection\Exception\MethodPrototypeNotFound; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\Exception\MethodPrototypeNotFound; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; use function array_reduce; use function assert; diff --git a/src/Reflection/StringCast/ReflectionParameterStringCast.php b/src/Reflection/StringCast/ReflectionParameterStringCast.php index a3d6c909f..412ca0ea1 100644 --- a/src/Reflection/StringCast/ReflectionParameterStringCast.php +++ b/src/Reflection/StringCast/ReflectionParameterStringCast.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; +namespace PHPStan\BetterReflection\Reflection\StringCast; -use Roave\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; use function is_array; use function is_string; diff --git a/src/Reflection/StringCast/ReflectionPropertyStringCast.php b/src/Reflection/StringCast/ReflectionPropertyStringCast.php index f3cc56318..f1316b32f 100644 --- a/src/Reflection/StringCast/ReflectionPropertyStringCast.php +++ b/src/Reflection/StringCast/ReflectionPropertyStringCast.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; +namespace PHPStan\BetterReflection\Reflection\StringCast; -use Roave\BetterReflection\Reflection\ReflectionProperty; +use PHPStan\BetterReflection\Reflection\ReflectionProperty; use function sprintf; diff --git a/src/Reflection/StringCast/ReflectionStringCastHelper.php b/src/Reflection/StringCast/ReflectionStringCastHelper.php index 6fef8587a..f8f2507c0 100644 --- a/src/Reflection/StringCast/ReflectionStringCastHelper.php +++ b/src/Reflection/StringCast/ReflectionStringCastHelper.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; +namespace PHPStan\BetterReflection\Reflection\StringCast; -use Roave\BetterReflection\Reflection\ReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnumCase; -use Roave\BetterReflection\Reflection\ReflectionProperty; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionProperty; use function preg_replace; @@ -14,7 +14,7 @@ final class ReflectionStringCastHelper { /** @psalm-pure - * @param \Roave\BetterReflection\Reflection\ReflectionProperty|\Roave\BetterReflection\Reflection\ReflectionClassConstant|\Roave\BetterReflection\Reflection\ReflectionEnumCase $reflection */ + * @param \PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase $reflection */ public static function docCommentToString($reflection, bool $indent): string { $docComment = $reflection->getDocComment(); diff --git a/src/Reflection/StringCast/ReflectionTypeStringCast.php b/src/Reflection/StringCast/ReflectionTypeStringCast.php index 9b2f78cb8..e850d2e65 100644 --- a/src/Reflection/StringCast/ReflectionTypeStringCast.php +++ b/src/Reflection/StringCast/ReflectionTypeStringCast.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\StringCast; +namespace PHPStan\BetterReflection\Reflection\StringCast; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionType; -use Roave\BetterReflection\Reflection\ReflectionUnionType; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionType; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType; use function array_filter; use function array_values; @@ -20,7 +20,7 @@ final class ReflectionTypeStringCast * @return non-empty-string * * @psalm-pure - * @param \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType $type + * @param \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType $type */ public static function toString($type): string { diff --git a/src/Reflection/Support/AlreadyVisitedClasses.php b/src/Reflection/Support/AlreadyVisitedClasses.php index 77301f23a..808d6e8d7 100644 --- a/src/Reflection/Support/AlreadyVisitedClasses.php +++ b/src/Reflection/Support/AlreadyVisitedClasses.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflection\Support; +namespace PHPStan\BetterReflection\Reflection\Support; -use Roave\BetterReflection\Reflection\Exception\CircularReference; +use PHPStan\BetterReflection\Reflection\Exception\CircularReference; use function array_key_exists; diff --git a/src/Reflector/DefaultReflector.php b/src/Reflector/DefaultReflector.php index 0126e4f14..86768bba5 100644 --- a/src/Reflector/DefaultReflector.php +++ b/src/Reflector/DefaultReflector.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflector; - -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +namespace PHPStan\BetterReflection\Reflector; + +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use function assert; diff --git a/src/Reflector/Exception/IdentifierNotFound.php b/src/Reflector/Exception/IdentifierNotFound.php index cb732adca..b8a257bff 100644 --- a/src/Reflector/Exception/IdentifierNotFound.php +++ b/src/Reflector/Exception/IdentifierNotFound.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflector\Exception; +namespace PHPStan\BetterReflection\Reflector\Exception; -use Roave\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\Identifier; use RuntimeException; use function sprintf; diff --git a/src/Reflector/Reflector.php b/src/Reflector/Reflector.php index d9d9b1e44..608f16781 100644 --- a/src/Reflector/Reflector.php +++ b/src/Reflector/Reflector.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Reflector; +namespace PHPStan\BetterReflection\Reflector; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; interface Reflector { diff --git a/src/SourceLocator/Ast/Exception/ParseToAstFailure.php b/src/SourceLocator/Ast/Exception/ParseToAstFailure.php index ffd41554e..16319826d 100644 --- a/src/SourceLocator/Ast/Exception/ParseToAstFailure.php +++ b/src/SourceLocator/Ast/Exception/ParseToAstFailure.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Ast\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Ast\Exception; use PhpParser\Error; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; use RuntimeException; use Throwable; diff --git a/src/SourceLocator/Ast/FindReflectionsInTree.php b/src/SourceLocator/Ast/FindReflectionsInTree.php index a6f97b95b..01f039130 100644 --- a/src/SourceLocator/Ast/FindReflectionsInTree.php +++ b/src/SourceLocator/Ast/FindReflectionsInTree.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Ast; +namespace PHPStan\BetterReflection\SourceLocator\Ast; use PhpParser\Node; use PhpParser\Node\Name; @@ -10,16 +10,16 @@ use PhpParser\NodeTraverser; use PhpParser\NodeVisitor\NameResolver; use PhpParser\NodeVisitorAbstract; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Exception\InvalidConstantNode; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Strategy\AstConversionStrategy; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\Util\ConstantNodeChecker; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\AstConversionStrategy; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Util\ConstantNodeChecker; use function assert; use function count; diff --git a/src/SourceLocator/Ast/Locator.php b/src/SourceLocator/Ast/Locator.php index 648564e36..613dcd2b6 100644 --- a/src/SourceLocator/Ast/Locator.php +++ b/src/SourceLocator/Ast/Locator.php @@ -2,17 +2,17 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Ast; +namespace PHPStan\BetterReflection\SourceLocator\Ast; use PhpParser\Node; use PhpParser\Parser; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; use Throwable; use function strtolower; diff --git a/src/SourceLocator/Ast/Parser/MemoizingParser.php b/src/SourceLocator/Ast/Parser/MemoizingParser.php index cd34a81b7..ac2a23359 100644 --- a/src/SourceLocator/Ast/Parser/MemoizingParser.php +++ b/src/SourceLocator/Ast/Parser/MemoizingParser.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Ast\Parser; +namespace PHPStan\BetterReflection\SourceLocator\Ast\Parser; use PhpParser\ErrorHandler; use PhpParser\Node; diff --git a/src/SourceLocator/Ast/Strategy/AstConversionStrategy.php b/src/SourceLocator/Ast/Strategy/AstConversionStrategy.php index 48c5555ad..52e603b7a 100644 --- a/src/SourceLocator/Ast/Strategy/AstConversionStrategy.php +++ b/src/SourceLocator/Ast/Strategy/AstConversionStrategy.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Ast\Strategy; +namespace PHPStan\BetterReflection\SourceLocator\Ast\Strategy; use PhpParser\Node; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; /** @internal */ interface AstConversionStrategy @@ -18,7 +18,7 @@ interface AstConversionStrategy * Take an AST node in some located source (potentially in a namespace) and * convert it to something (concrete implementation decides) * @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Interface_|\PhpParser\Node\Stmt\Trait_|\PhpParser\Node\Stmt\Enum_|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction|\PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall $node - * @return \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionConstant|\Roave\BetterReflection\Reflection\ReflectionFunction + * @return \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionConstant|\PHPStan\BetterReflection\Reflection\ReflectionFunction */ public function __invoke(Reflector $reflector, $node, LocatedSource $locatedSource, ?\PhpParser\Node\Stmt\Namespace_ $namespace, ?int $positionInNode = null); } diff --git a/src/SourceLocator/Ast/Strategy/NodeToReflection.php b/src/SourceLocator/Ast/Strategy/NodeToReflection.php index b283a4284..c6161067b 100644 --- a/src/SourceLocator/Ast/Strategy/NodeToReflection.php +++ b/src/SourceLocator/Ast/Strategy/NodeToReflection.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Ast\Strategy; +namespace PHPStan\BetterReflection\SourceLocator\Ast\Strategy; use PhpParser\Node; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; /** @internal */ class NodeToReflection implements AstConversionStrategy @@ -19,7 +19,7 @@ class NodeToReflection implements AstConversionStrategy * Take an AST node in some located source (potentially in a namespace) and * convert it to a Reflection * @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Interface_|\PhpParser\Node\Stmt\Trait_|\PhpParser\Node\Stmt\Enum_|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction|\PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall $node - * @return \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionConstant|\Roave\BetterReflection\Reflection\ReflectionFunction + * @return \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionConstant|\PHPStan\BetterReflection\Reflection\ReflectionFunction */ public function __invoke(Reflector $reflector, $node, LocatedSource $locatedSource, ?\PhpParser\Node\Stmt\Namespace_ $namespace, ?int $positionInNode = null) { diff --git a/src/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocated.php b/src/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocated.php index 298fa8ba7..4e01fbf62 100644 --- a/src/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocated.php +++ b/src/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocated.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Exception; use LogicException; diff --git a/src/SourceLocator/Exception/EvaledClosureCannotBeLocated.php b/src/SourceLocator/Exception/EvaledClosureCannotBeLocated.php index abe4683ad..9ae37885e 100644 --- a/src/SourceLocator/Exception/EvaledClosureCannotBeLocated.php +++ b/src/SourceLocator/Exception/EvaledClosureCannotBeLocated.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Exception; use LogicException; diff --git a/src/SourceLocator/Exception/InvalidDirectory.php b/src/SourceLocator/Exception/InvalidDirectory.php index 1cd6fa44c..b01a5bd7a 100644 --- a/src/SourceLocator/Exception/InvalidDirectory.php +++ b/src/SourceLocator/Exception/InvalidDirectory.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Exception; use RuntimeException; diff --git a/src/SourceLocator/Exception/InvalidFileInfo.php b/src/SourceLocator/Exception/InvalidFileInfo.php index 5bc1c5439..28614ad9b 100644 --- a/src/SourceLocator/Exception/InvalidFileInfo.php +++ b/src/SourceLocator/Exception/InvalidFileInfo.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Exception; use RuntimeException; diff --git a/src/SourceLocator/Exception/InvalidFileLocation.php b/src/SourceLocator/Exception/InvalidFileLocation.php index 3ed9db870..9dcade4d1 100644 --- a/src/SourceLocator/Exception/InvalidFileLocation.php +++ b/src/SourceLocator/Exception/InvalidFileLocation.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Exception; use RuntimeException; diff --git a/src/SourceLocator/Exception/NoAnonymousClassOnLine.php b/src/SourceLocator/Exception/NoAnonymousClassOnLine.php index 94993eb5f..63954569c 100644 --- a/src/SourceLocator/Exception/NoAnonymousClassOnLine.php +++ b/src/SourceLocator/Exception/NoAnonymousClassOnLine.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Exception; use LogicException; diff --git a/src/SourceLocator/Exception/NoClosureOnLine.php b/src/SourceLocator/Exception/NoClosureOnLine.php index 161a57337..7bf0df100 100644 --- a/src/SourceLocator/Exception/NoClosureOnLine.php +++ b/src/SourceLocator/Exception/NoClosureOnLine.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Exception; use LogicException; diff --git a/src/SourceLocator/Exception/NotInternalClass.php b/src/SourceLocator/Exception/NotInternalClass.php index d2f1daf09..41ed64cab 100644 --- a/src/SourceLocator/Exception/NotInternalClass.php +++ b/src/SourceLocator/Exception/NotInternalClass.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Exception; use LogicException; diff --git a/src/SourceLocator/Exception/TwoAnonymousClassesOnSameLine.php b/src/SourceLocator/Exception/TwoAnonymousClassesOnSameLine.php index a2a859a92..77704e198 100644 --- a/src/SourceLocator/Exception/TwoAnonymousClassesOnSameLine.php +++ b/src/SourceLocator/Exception/TwoAnonymousClassesOnSameLine.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Exception; use LogicException; diff --git a/src/SourceLocator/Exception/TwoClosuresOnSameLine.php b/src/SourceLocator/Exception/TwoClosuresOnSameLine.php index 06707bf13..f03b3a0f2 100644 --- a/src/SourceLocator/Exception/TwoClosuresOnSameLine.php +++ b/src/SourceLocator/Exception/TwoClosuresOnSameLine.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Exception; use LogicException; diff --git a/src/SourceLocator/FileChecker.php b/src/SourceLocator/FileChecker.php index 08e11b7c4..56eeee5df 100644 --- a/src/SourceLocator/FileChecker.php +++ b/src/SourceLocator/FileChecker.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator; +namespace PHPStan\BetterReflection\SourceLocator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; use function is_file; use function is_readable; diff --git a/src/SourceLocator/Located/AliasLocatedSource.php b/src/SourceLocator/Located/AliasLocatedSource.php index ef4f64220..94d102878 100644 --- a/src/SourceLocator/Located/AliasLocatedSource.php +++ b/src/SourceLocator/Located/AliasLocatedSource.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Located; +namespace PHPStan\BetterReflection\SourceLocator\Located; /** * @internal diff --git a/src/SourceLocator/Located/AnonymousLocatedSource.php b/src/SourceLocator/Located/AnonymousLocatedSource.php index 08f69701a..c42a56bb8 100644 --- a/src/SourceLocator/Located/AnonymousLocatedSource.php +++ b/src/SourceLocator/Located/AnonymousLocatedSource.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Located; +namespace PHPStan\BetterReflection\SourceLocator\Located; /** * @internal diff --git a/src/SourceLocator/Located/EvaledLocatedSource.php b/src/SourceLocator/Located/EvaledLocatedSource.php index 1bfc28ab6..94980221d 100644 --- a/src/SourceLocator/Located/EvaledLocatedSource.php +++ b/src/SourceLocator/Located/EvaledLocatedSource.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Located; +namespace PHPStan\BetterReflection\SourceLocator\Located; /** * @internal diff --git a/src/SourceLocator/Located/InternalLocatedSource.php b/src/SourceLocator/Located/InternalLocatedSource.php index 62339f129..6595e315c 100644 --- a/src/SourceLocator/Located/InternalLocatedSource.php +++ b/src/SourceLocator/Located/InternalLocatedSource.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Located; +namespace PHPStan\BetterReflection\SourceLocator\Located; /** * @internal diff --git a/src/SourceLocator/Located/LocatedSource.php b/src/SourceLocator/Located/LocatedSource.php index 20df9fbd4..5f1f35341 100644 --- a/src/SourceLocator/Located/LocatedSource.php +++ b/src/SourceLocator/Located/LocatedSource.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Located; +namespace PHPStan\BetterReflection\SourceLocator\Located; use InvalidArgumentException; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\Util\FileHelper; use function assert; diff --git a/src/SourceLocator/SourceStubber/AggregateSourceStubber.php b/src/SourceLocator/SourceStubber/AggregateSourceStubber.php index ee53a8a12..9c788cbc1 100644 --- a/src/SourceLocator/SourceStubber/AggregateSourceStubber.php +++ b/src/SourceLocator/SourceStubber/AggregateSourceStubber.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\SourceStubber; +namespace PHPStan\BetterReflection\SourceLocator\SourceStubber; use function array_merge; use function array_reduce; @@ -19,7 +19,7 @@ public function __construct(SourceStubber $sourceStubber, SourceStubber ...$othe } /** @param class-string|trait-string $className */ - public function generateClassStub(string $className): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData + public function generateClassStub(string $className): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData { foreach ($this->sourceStubbers as $sourceStubber) { $stubData = $sourceStubber->generateClassStub($className); @@ -32,7 +32,7 @@ public function generateClassStub(string $className): ?\Roave\BetterReflection\S return null; } - public function generateFunctionStub(string $functionName): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData + public function generateFunctionStub(string $functionName): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData { foreach ($this->sourceStubbers as $sourceStubber) { $stubData = $sourceStubber->generateFunctionStub($functionName); @@ -45,8 +45,8 @@ public function generateFunctionStub(string $functionName): ?\Roave\BetterReflec return null; } - public function generateConstantStub(string $constantName): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData + public function generateConstantStub(string $constantName): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData { - return array_reduce($this->sourceStubbers, static fn (?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData $stubData, SourceStubber $sourceStubber): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData => $stubData ?? $sourceStubber->generateConstantStub($constantName), null); + return array_reduce($this->sourceStubbers, static fn (?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData $stubData, SourceStubber $sourceStubber): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData => $stubData ?? $sourceStubber->generateConstantStub($constantName), null); } } diff --git a/src/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubs.php b/src/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubs.php index 863b1f5c4..e908562b8 100644 --- a/src/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubs.php +++ b/src/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubs.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\SourceStubber\Exception; +namespace PHPStan\BetterReflection\SourceLocator\SourceStubber\Exception; use RuntimeException; diff --git a/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php b/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php index b26872bd3..08c7a9b16 100644 --- a/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php +++ b/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\SourceStubber; +namespace PHPStan\BetterReflection\SourceLocator\SourceStubber; use CompileError; use DatePeriod; @@ -23,12 +23,12 @@ use PhpParser\Parser; use PhpParser\PrettyPrinter\Standard; use RecursiveIterator; -use Roave\BetterReflection\Reflection\Annotation\AnnotationHelper; -use Roave\BetterReflection\Reflection\Exception\InvalidConstantNode; -use Roave\BetterReflection\SourceLocator\FileChecker; -use Roave\BetterReflection\SourceLocator\SourceStubber\Exception\CouldNotFindPhpStormStubs; -use Roave\BetterReflection\SourceLocator\SourceStubber\PhpStormStubs\CachingVisitor; -use Roave\BetterReflection\Util\ConstantNodeChecker; +use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper; +use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode; +use PHPStan\BetterReflection\SourceLocator\FileChecker; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\Exception\CouldNotFindPhpStormStubs; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubs\CachingVisitor; +use PHPStan\BetterReflection\Util\ConstantNodeChecker; use SeekableIterator; use SimpleXMLElement; use SplFixedArray; @@ -244,7 +244,7 @@ public function isPresentFunction(string $functionName): ?bool } /** @param class-string|trait-string $className */ - public function generateClassStub(string $className): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData + public function generateClassStub(string $className): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData { if (strtolower($className) === 'iterable') { return null; @@ -333,7 +333,7 @@ private function getFunctionNodeData(string $functionName): ?array return $this->functionNodes[$lowercaseFunctionName]; } - public function generateFunctionStub(string $functionName): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData + public function generateFunctionStub(string $functionName): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData { $functionNodeData = $this->getFunctionNodeData($functionName); @@ -347,7 +347,7 @@ public function generateFunctionStub(string $functionName): ?\Roave\BetterReflec return new StubData($this->createStub($functionNodeData[0], $functionNodeData[1]), $extension, $this->getAbsoluteFilePath($filePath)); } - public function generateConstantStub(string $constantName): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData + public function generateConstantStub(string $constantName): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData { $lowercaseConstantName = strtolower($constantName); diff --git a/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php b/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php index 5cfc993b2..8bb726789 100644 --- a/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php +++ b/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\SourceStubber; +namespace PHPStan\BetterReflection\SourceLocator\SourceStubber; use BackedEnum; use c; @@ -41,8 +41,8 @@ use ReflectionProperty as CoreReflectionProperty; use ReflectionType as CoreReflectionType; use ReflectionUnionType as CoreReflectionUnionType; -use Roave\BetterReflection\Reflection\Annotation\AnnotationHelper; -use Roave\BetterReflection\Util\ClassExistenceChecker; +use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper; +use PHPStan\BetterReflection\Util\ClassExistenceChecker; use UnitEnum; use function array_diff; @@ -84,7 +84,7 @@ public function __construct(Standard $prettyPrinter, int $phpVersion = PHP_VERSI } /** @param class-string|trait-string $className */ - public function generateClassStub(string $className): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData + public function generateClassStub(string $className): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData { /** @phpstan-ignore staticMethod.alreadyNarrowedType */ if (! ClassExistenceChecker::exists($className, false)) { @@ -136,7 +136,7 @@ public function generateClassStub(string $className): ?\Roave\BetterReflection\S return $this->createStubData($stub, $extensionName, $classReflection->getFileName() !== false ? $classReflection->getFileName() : null); } - public function generateFunctionStub(string $functionName): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData + public function generateFunctionStub(string $functionName): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData { if (! function_exists($functionName)) { return null; @@ -177,7 +177,7 @@ public function generateFunctionStubFromReflection(CoreReflectionFunction $funct return $this->createStubData($this->generateStubInNamespace($functionNode->getNode(), $functionReflection->getNamespaceName()), $extensionName, $functionReflection->getFileName() !== false ? $functionReflection->getFileName() : null); } - public function generateConstantStub(string $constantName): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData + public function generateConstantStub(string $constantName): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData { $constantData = $this->findConstantData($constantName); diff --git a/src/SourceLocator/SourceStubber/SourceStubber.php b/src/SourceLocator/SourceStubber/SourceStubber.php index 704e08b0b..edf13c22c 100644 --- a/src/SourceLocator/SourceStubber/SourceStubber.php +++ b/src/SourceLocator/SourceStubber/SourceStubber.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\SourceStubber; +namespace PHPStan\BetterReflection\SourceLocator\SourceStubber; /** @internal */ interface SourceStubber @@ -12,15 +12,15 @@ interface SourceStubber * * @param class-string|trait-string $className */ - public function generateClassStub(string $className): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData; + public function generateClassStub(string $className): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData; /** * Generates stub for given function. Returns null when it cannot generate the stub. */ - public function generateFunctionStub(string $functionName): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData; + public function generateFunctionStub(string $functionName): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData; /** * Generates stub for given constant. Returns null when it cannot generate the stub. */ - public function generateConstantStub(string $constantName): ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData; + public function generateConstantStub(string $constantName): ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData; } diff --git a/src/SourceLocator/SourceStubber/StubData.php b/src/SourceLocator/SourceStubber/StubData.php index e212b4c39..9bb2a59a8 100644 --- a/src/SourceLocator/SourceStubber/StubData.php +++ b/src/SourceLocator/SourceStubber/StubData.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\SourceStubber; +namespace PHPStan\BetterReflection\SourceLocator\SourceStubber; /** @internal */ class StubData diff --git a/src/SourceLocator/Type/AbstractSourceLocator.php b/src/SourceLocator/Type/AbstractSourceLocator.php index c5743ed64..f743e7140 100644 --- a/src/SourceLocator/Type/AbstractSourceLocator.php +++ b/src/SourceLocator/Type/AbstractSourceLocator.php @@ -2,16 +2,16 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure; -use Roave\BetterReflection\SourceLocator\Ast\Locator as AstLocator; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator as AstLocator; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; abstract class AbstractSourceLocator implements SourceLocator { @@ -24,7 +24,7 @@ abstract class AbstractSourceLocator implements SourceLocator * return new LocatedSource(['createLocatedSource($identifier); diff --git a/src/SourceLocator/Type/AggregateSourceLocator.php b/src/SourceLocator/Type/AggregateSourceLocator.php index 296ff0f1d..7e89e8245 100644 --- a/src/SourceLocator/Type/AggregateSourceLocator.php +++ b/src/SourceLocator/Type/AggregateSourceLocator.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_map; use function array_merge; @@ -24,7 +24,7 @@ public function __construct(array $sourceLocators = []) $this->sourceLocators = $sourceLocators; } - public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\Roave\BetterReflection\Reflection\Reflection + public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\PHPStan\BetterReflection\Reflection\Reflection { foreach ($this->sourceLocators as $sourceLocator) { $located = $sourceLocator->locateIdentifier($reflector, $identifier); diff --git a/src/SourceLocator/Type/AnonymousClassObjectSourceLocator.php b/src/SourceLocator/Type/AnonymousClassObjectSourceLocator.php index 3c723202e..2e7229684 100644 --- a/src/SourceLocator/Type/AnonymousClassObjectSourceLocator.php +++ b/src/SourceLocator/Type/AnonymousClassObjectSourceLocator.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; use PhpParser\Node; use PhpParser\Node\Stmt\Class_; @@ -11,19 +11,19 @@ use PhpParser\NodeVisitorAbstract; use PhpParser\Parser; use ReflectionClass as CoreReflectionClass; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure; -use Roave\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection; -use Roave\BetterReflection\SourceLocator\Exception\EvaledAnonymousClassCannotBeLocated; -use Roave\BetterReflection\SourceLocator\Exception\NoAnonymousClassOnLine; -use Roave\BetterReflection\SourceLocator\Exception\TwoAnonymousClassesOnSameLine; -use Roave\BetterReflection\SourceLocator\FileChecker; -use Roave\BetterReflection\SourceLocator\Located\AnonymousLocatedSource; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure; +use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection; +use PHPStan\BetterReflection\SourceLocator\Exception\EvaledAnonymousClassCannotBeLocated; +use PHPStan\BetterReflection\SourceLocator\Exception\NoAnonymousClassOnLine; +use PHPStan\BetterReflection\SourceLocator\Exception\TwoAnonymousClassesOnSameLine; +use PHPStan\BetterReflection\SourceLocator\FileChecker; +use PHPStan\BetterReflection\SourceLocator\Located\AnonymousLocatedSource; +use PHPStan\BetterReflection\Util\FileHelper; use function array_filter; use function assert; @@ -47,7 +47,7 @@ public function __construct(object $anonymousClassObject, Parser $parser) * * @throws ParseToAstFailure */ - public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\Roave\BetterReflection\Reflection\Reflection + public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\PHPStan\BetterReflection\Reflection\Reflection { return $this->getReflectionClass($reflector, $identifier->getType()); } @@ -62,7 +62,7 @@ public function locateIdentifiersByType(Reflector $reflector, IdentifierType $id return array_filter([$this->getReflectionClass($reflector, $identifierType)]); } - private function getReflectionClass(Reflector $reflector, IdentifierType $identifierType): ?\Roave\BetterReflection\Reflection\ReflectionClass + private function getReflectionClass(Reflector $reflector, IdentifierType $identifierType): ?\PHPStan\BetterReflection\Reflection\ReflectionClass { if (! $identifierType->isClass()) { return null; diff --git a/src/SourceLocator/Type/AutoloadSourceLocator.php b/src/SourceLocator/Type/AutoloadSourceLocator.php index 5b21e8cba..d578c4dbc 100644 --- a/src/SourceLocator/Type/AutoloadSourceLocator.php +++ b/src/SourceLocator/Type/AutoloadSourceLocator.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; use InvalidArgumentException; use PhpParser\Node; @@ -14,17 +14,17 @@ use ReflectionClass; use ReflectionException; use ReflectionFunction; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Reflection\Exception\InvalidConstantNode; -use Roave\BetterReflection\SourceLocator\Ast\Locator as AstLocator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\FileChecker; -use Roave\BetterReflection\SourceLocator\Located\AliasLocatedSource; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\Type\AutoloadSourceLocator\FileReadTrapStreamWrapper; -use Roave\BetterReflection\Util\ClassExistenceChecker; -use Roave\BetterReflection\Util\ConstantNodeChecker; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator as AstLocator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\FileChecker; +use PHPStan\BetterReflection\SourceLocator\Located\AliasLocatedSource; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator\FileReadTrapStreamWrapper; +use PHPStan\BetterReflection\Util\ClassExistenceChecker; +use PHPStan\BetterReflection\Util\ConstantNodeChecker; use function array_key_exists; use function array_reverse; @@ -74,7 +74,7 @@ public function __construct($astLocator = null, ?\PhpParser\Parser $phpParser = * @throws InvalidArgumentException * @throws InvalidFileLocation */ - protected function createLocatedSource(Identifier $identifier): ?\Roave\BetterReflection\SourceLocator\Located\LocatedSource + protected function createLocatedSource(Identifier $identifier): ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource { $locatedData = $this->attemptAutoloadForIdentifier($identifier); diff --git a/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php b/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php index b404491af..2d5f7c0bf 100644 --- a/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php +++ b/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; +namespace PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; use LogicException; @@ -19,7 +19,7 @@ * in operation. * * @internal DO NOT USE: this is an implementation detail of - * the {@see \Roave\BetterReflection\SourceLocator\Type\AutoloadSourceLocator} + * the {@see \PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator} * * @phpcs:disable SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps diff --git a/src/SourceLocator/Type/ClosureSourceLocator.php b/src/SourceLocator/Type/ClosureSourceLocator.php index 9e0e69b03..090c80936 100644 --- a/src/SourceLocator/Type/ClosureSourceLocator.php +++ b/src/SourceLocator/Type/ClosureSourceLocator.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; use Closure; use PhpParser\Node; @@ -12,19 +12,19 @@ use PhpParser\NodeVisitorAbstract; use PhpParser\Parser; use ReflectionFunction as CoreFunctionReflection; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure; -use Roave\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection; -use Roave\BetterReflection\SourceLocator\Exception\EvaledClosureCannotBeLocated; -use Roave\BetterReflection\SourceLocator\Exception\NoClosureOnLine; -use Roave\BetterReflection\SourceLocator\Exception\TwoClosuresOnSameLine; -use Roave\BetterReflection\SourceLocator\FileChecker; -use Roave\BetterReflection\SourceLocator\Located\AnonymousLocatedSource; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure; +use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection; +use PHPStan\BetterReflection\SourceLocator\Exception\EvaledClosureCannotBeLocated; +use PHPStan\BetterReflection\SourceLocator\Exception\NoClosureOnLine; +use PHPStan\BetterReflection\SourceLocator\Exception\TwoClosuresOnSameLine; +use PHPStan\BetterReflection\SourceLocator\FileChecker; +use PHPStan\BetterReflection\SourceLocator\Located\AnonymousLocatedSource; +use PHPStan\BetterReflection\Util\FileHelper; use function array_filter; use function assert; @@ -48,7 +48,7 @@ public function __construct(Closure $closure, Parser $parser) * * @throws ParseToAstFailure */ - public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\Roave\BetterReflection\Reflection\Reflection + public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\PHPStan\BetterReflection\Reflection\Reflection { return $this->getReflectionFunction($reflector, $identifier->getType()); } @@ -63,7 +63,7 @@ public function locateIdentifiersByType(Reflector $reflector, IdentifierType $id return array_filter([$this->getReflectionFunction($reflector, $identifierType)]); } - private function getReflectionFunction(Reflector $reflector, IdentifierType $identifierType): ?\Roave\BetterReflection\Reflection\ReflectionFunction + private function getReflectionFunction(Reflector $reflector, IdentifierType $identifierType): ?\PHPStan\BetterReflection\Reflection\ReflectionFunction { if (! $identifierType->isFunction()) { return null; diff --git a/src/SourceLocator/Type/Composer/Factory/Exception/Exception.php b/src/SourceLocator/Type/Composer/Factory/Exception/Exception.php index ffc7e63bc..954e6b761 100644 --- a/src/SourceLocator/Type/Composer/Factory/Exception/Exception.php +++ b/src/SourceLocator/Type/Composer/Factory/Exception/Exception.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception; use Throwable; diff --git a/src/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJson.php b/src/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJson.php index a6fe22472..c9ffc21ce 100644 --- a/src/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJson.php +++ b/src/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJson.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception; use UnexpectedValueException; diff --git a/src/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectory.php b/src/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectory.php index 041405e8d..85ffdfc9d 100644 --- a/src/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectory.php +++ b/src/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectory.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception; use InvalidArgumentException; diff --git a/src/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJson.php b/src/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJson.php index 86ab103de..2bc344054 100644 --- a/src/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJson.php +++ b/src/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJson.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception; use UnexpectedValueException; diff --git a/src/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJson.php b/src/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJson.php index a90c218fe..532a342b7 100644 --- a/src/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJson.php +++ b/src/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJson.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception; use UnexpectedValueException; diff --git a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php index 4432698ea..60e9e70bd 100644 --- a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php +++ b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php @@ -2,18 +2,18 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Factory; - -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; -use Roave\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory; + +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; +use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use function array_filter; use function array_map; diff --git a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php index 9f525c5e8..94da0b779 100644 --- a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php +++ b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php @@ -2,19 +2,19 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Factory; - -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; -use Roave\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory; + +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; +use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use function array_filter; use function array_map; diff --git a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php index fcb04c250..5ddf83856 100644 --- a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php +++ b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php @@ -2,19 +2,19 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Factory; - -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; -use Roave\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory; + +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; +use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use function array_filter; use function array_map; diff --git a/src/SourceLocator/Type/Composer/Psr/Exception/Exception.php b/src/SourceLocator/Type/Composer/Psr/Exception/Exception.php index 581ab648d..320d0ce5d 100644 --- a/src/SourceLocator/Type/Composer/Psr/Exception/Exception.php +++ b/src/SourceLocator/Type/Composer/Psr/Exception/Exception.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Exception; use Throwable; diff --git a/src/SourceLocator/Type/Composer/Psr/Exception/InvalidPrefixMapping.php b/src/SourceLocator/Type/Composer/Psr/Exception/InvalidPrefixMapping.php index d9caaaf18..33bb8f96d 100644 --- a/src/SourceLocator/Type/Composer/Psr/Exception/InvalidPrefixMapping.php +++ b/src/SourceLocator/Type/Composer/Psr/Exception/InvalidPrefixMapping.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Exception; use InvalidArgumentException; diff --git a/src/SourceLocator/Type/Composer/Psr/Psr0Mapping.php b/src/SourceLocator/Type/Composer/Psr/Psr0Mapping.php index 8fdcaeea9..140f617d9 100644 --- a/src/SourceLocator/Type/Composer/Psr/Psr0Mapping.php +++ b/src/SourceLocator/Type/Composer/Psr/Psr0Mapping.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Psr; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr; -use Roave\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\Identifier; use function array_map; use function array_merge; diff --git a/src/SourceLocator/Type/Composer/Psr/Psr4Mapping.php b/src/SourceLocator/Type/Composer/Psr/Psr4Mapping.php index 62ccd5214..3cfa12130 100644 --- a/src/SourceLocator/Type/Composer/Psr/Psr4Mapping.php +++ b/src/SourceLocator/Type/Composer/Psr/Psr4Mapping.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Psr; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr; -use Roave\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\Identifier; use function array_filter; use function array_keys; diff --git a/src/SourceLocator/Type/Composer/Psr/PsrAutoloaderMapping.php b/src/SourceLocator/Type/Composer/Psr/PsrAutoloaderMapping.php index 51554e018..7fff24a4e 100644 --- a/src/SourceLocator/Type/Composer/Psr/PsrAutoloaderMapping.php +++ b/src/SourceLocator/Type/Composer/Psr/PsrAutoloaderMapping.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer\Psr; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr; -use Roave\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\Identifier; interface PsrAutoloaderMapping { diff --git a/src/SourceLocator/Type/Composer/PsrAutoloaderLocator.php b/src/SourceLocator/Type/Composer/PsrAutoloaderLocator.php index 43de46973..96d6f52a3 100644 --- a/src/SourceLocator/Type/Composer/PsrAutoloaderLocator.php +++ b/src/SourceLocator/Type/Composer/PsrAutoloaderLocator.php @@ -2,20 +2,20 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type\Composer; +namespace PHPStan\BetterReflection\SourceLocator\Type\Composer; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\FileChecker; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping; -use Roave\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\FileChecker; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping; +use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use function file_get_contents; @@ -29,7 +29,7 @@ public function __construct(PsrAutoloaderMapping $mapping, Locator $astLocator) $this->astLocator = $astLocator; } - public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\Roave\BetterReflection\Reflection\Reflection + public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\PHPStan\BetterReflection\Reflection\Reflection { /** @phpstan-var non-empty-string $file */ foreach ($this->mapping->resolvePossibleFilePaths($identifier) as $file) { diff --git a/src/SourceLocator/Type/ComposerSourceLocator.php b/src/SourceLocator/Type/ComposerSourceLocator.php index bf1671542..253754440 100644 --- a/src/SourceLocator/Type/ComposerSourceLocator.php +++ b/src/SourceLocator/Type/ComposerSourceLocator.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; use Composer\Autoload\ClassLoader; use InvalidArgumentException; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; use function file_get_contents; @@ -36,7 +36,7 @@ public function __construct(ClassLoader $classLoader, Locator $astLocator) * @throws InvalidArgumentException * @throws InvalidFileLocation */ - protected function createLocatedSource(Identifier $identifier): ?\Roave\BetterReflection\SourceLocator\Located\LocatedSource + protected function createLocatedSource(Identifier $identifier): ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource { if ($identifier->getType()->getName() !== IdentifierType::IDENTIFIER_CLASS) { return null; diff --git a/src/SourceLocator/Type/DirectoriesSourceLocator.php b/src/SourceLocator/Type/DirectoriesSourceLocator.php index 8bc2eb32e..20ec91b8b 100644 --- a/src/SourceLocator/Type/DirectoriesSourceLocator.php +++ b/src/SourceLocator/Type/DirectoriesSourceLocator.php @@ -2,17 +2,17 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; use RecursiveDirectoryIterator; use RecursiveIteratorIterator; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidDirectory; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileInfo; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidDirectory; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileInfo; use function array_map; use function is_dir; @@ -50,7 +50,7 @@ static function (string $directory) use ($astLocator): FileIteratorSourceLocator )); } - public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\Roave\BetterReflection\Reflection\Reflection + public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\PHPStan\BetterReflection\Reflection\Reflection { return $this->aggregateSourceLocator->locateIdentifier($reflector, $identifier); } diff --git a/src/SourceLocator/Type/EvaledCodeSourceLocator.php b/src/SourceLocator/Type/EvaledCodeSourceLocator.php index 3b144a812..fba281a38 100644 --- a/src/SourceLocator/Type/EvaledCodeSourceLocator.php +++ b/src/SourceLocator/Type/EvaledCodeSourceLocator.php @@ -2,17 +2,17 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; use InvalidArgumentException; use ReflectionClass; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\Located\EvaledLocatedSource; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\Util\ClassExistenceChecker; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\Located\EvaledLocatedSource; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\Util\ClassExistenceChecker; use function is_file; @@ -31,7 +31,7 @@ public function __construct(Locator $astLocator, SourceStubber $stubber) * @throws InvalidArgumentException * @throws InvalidFileLocation */ - protected function createLocatedSource(Identifier $identifier): ?\Roave\BetterReflection\SourceLocator\Located\LocatedSource + protected function createLocatedSource(Identifier $identifier): ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource { $classReflection = $this->getInternalReflectionClass($identifier); diff --git a/src/SourceLocator/Type/FileIteratorSourceLocator.php b/src/SourceLocator/Type/FileIteratorSourceLocator.php index 2a43b0335..eab329069 100644 --- a/src/SourceLocator/Type/FileIteratorSourceLocator.php +++ b/src/SourceLocator/Type/FileIteratorSourceLocator.php @@ -2,16 +2,16 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; use Iterator; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileInfo; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileInfo; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; use SplFileInfo; use function array_filter; @@ -29,7 +29,7 @@ class FileIteratorSourceLocator implements SourceLocator { private Locator $astLocator; /** - * @var \Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator|null + * @var \PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator|null */ private $aggregateSourceLocator = null; @@ -60,7 +60,7 @@ private function getAggregatedSourceLocator(): AggregateSourceLocator // @infection-ignore-all Coalesce: There's no difference, it's just optimization return $this->aggregateSourceLocator ?? $this->aggregateSourceLocator = new AggregateSourceLocator(array_values(array_filter(array_map( - function (SplFileInfo $item): ?\Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator { + function (SplFileInfo $item): ?\PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator { $realPath = $item->getRealPath(); if (! ($item->isFile() && pathinfo($realPath, PATHINFO_EXTENSION) === 'php')) { @@ -78,7 +78,7 @@ function (SplFileInfo $item): ?\Roave\BetterReflection\SourceLocator\Type\Single * * @throws InvalidFileLocation */ - public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\Roave\BetterReflection\Reflection\Reflection + public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\PHPStan\BetterReflection\Reflection\Reflection { return $this->getAggregatedSourceLocator()->locateIdentifier($reflector, $identifier); } diff --git a/src/SourceLocator/Type/MemoizingSourceLocator.php b/src/SourceLocator/Type/MemoizingSourceLocator.php index 0155a3c9b..33e987fe9 100644 --- a/src/SourceLocator/Type/MemoizingSourceLocator.php +++ b/src/SourceLocator/Type/MemoizingSourceLocator.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_key_exists; use function spl_object_id; @@ -27,7 +27,7 @@ public function __construct(SourceLocator $wrappedSourceLocator) $this->wrappedSourceLocator = $wrappedSourceLocator; } - public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\Roave\BetterReflection\Reflection\Reflection + public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\PHPStan\BetterReflection\Reflection\Reflection { $cacheKey = sprintf('%s_%s', $this->reflectorCacheKey($reflector), $this->identifierToCacheKey($identifier)); diff --git a/src/SourceLocator/Type/PhpInternalSourceLocator.php b/src/SourceLocator/Type/PhpInternalSourceLocator.php index 8a809d5e3..ee0474c1a 100644 --- a/src/SourceLocator/Type/PhpInternalSourceLocator.php +++ b/src/SourceLocator/Type/PhpInternalSourceLocator.php @@ -2,17 +2,17 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; use InvalidArgumentException; use ReflectionClass as CoreReflectionClass; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\Located\InternalLocatedSource; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\SourceStubber\StubData; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData; use function class_exists; use function strtolower; @@ -32,14 +32,14 @@ public function __construct(Locator $astLocator, SourceStubber $stubber) * @throws InvalidArgumentException * @throws InvalidFileLocation */ - protected function createLocatedSource(Identifier $identifier): ?\Roave\BetterReflection\SourceLocator\Located\LocatedSource + protected function createLocatedSource(Identifier $identifier): ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource { return $this->getClassSource($identifier) ?? $this->getFunctionSource($identifier) ?? $this->getConstantSource($identifier); } - private function getClassSource(Identifier $identifier): ?\Roave\BetterReflection\SourceLocator\Located\InternalLocatedSource + private function getClassSource(Identifier $identifier): ?\PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource { if (! $identifier->isClass()) { return null; @@ -62,7 +62,7 @@ private function getClassSource(Identifier $identifier): ?\Roave\BetterReflectio return $this->createLocatedSourceFromStubData($identifier, $this->stubber->generateClassStub($className), $aliasName); } - private function getFunctionSource(Identifier $identifier): ?\Roave\BetterReflection\SourceLocator\Located\InternalLocatedSource + private function getFunctionSource(Identifier $identifier): ?\PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource { if (! $identifier->isFunction()) { return null; @@ -71,7 +71,7 @@ private function getFunctionSource(Identifier $identifier): ?\Roave\BetterReflec return $this->createLocatedSourceFromStubData($identifier, $this->stubber->generateFunctionStub($identifier->getName())); } - private function getConstantSource(Identifier $identifier): ?\Roave\BetterReflection\SourceLocator\Located\InternalLocatedSource + private function getConstantSource(Identifier $identifier): ?\PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource { if (! $identifier->isConstant()) { return null; @@ -80,7 +80,7 @@ private function getConstantSource(Identifier $identifier): ?\Roave\BetterReflec return $this->createLocatedSourceFromStubData($identifier, $this->stubber->generateConstantStub($identifier->getName())); } - private function createLocatedSourceFromStubData(Identifier $identifier, ?\Roave\BetterReflection\SourceLocator\SourceStubber\StubData $stubData, ?string $aliasName = null): ?\Roave\BetterReflection\SourceLocator\Located\InternalLocatedSource + private function createLocatedSourceFromStubData(Identifier $identifier, ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData $stubData, ?string $aliasName = null): ?\PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource { if ($stubData === null) { return null; diff --git a/src/SourceLocator/Type/SingleFileSourceLocator.php b/src/SourceLocator/Type/SingleFileSourceLocator.php index 5fd356f70..51d2402af 100644 --- a/src/SourceLocator/Type/SingleFileSourceLocator.php +++ b/src/SourceLocator/Type/SingleFileSourceLocator.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; use InvalidArgumentException; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\FileChecker; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\FileChecker; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; use function file_get_contents; @@ -46,7 +46,7 @@ public function __construct(string $fileName, Locator $astLocator) * @throws InvalidArgumentException * @throws InvalidFileLocation */ - protected function createLocatedSource(Identifier $identifier): ?\Roave\BetterReflection\SourceLocator\Located\LocatedSource + protected function createLocatedSource(Identifier $identifier): ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource { return new LocatedSource( file_get_contents($this->fileName), diff --git a/src/SourceLocator/Type/SourceLocator.php b/src/SourceLocator/Type/SourceLocator.php index 8754ae107..27a597abd 100644 --- a/src/SourceLocator/Type/SourceLocator.php +++ b/src/SourceLocator/Type/SourceLocator.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflector\Reflector; interface SourceLocator { @@ -21,7 +21,7 @@ interface SourceLocator * locate the identifier, it should simply return null. If an exception is * thrown, it will break the Generic Reflector. */ - public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\Roave\BetterReflection\Reflection\Reflection; + public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?\PHPStan\BetterReflection\Reflection\Reflection; /** * Find all identifiers of a type diff --git a/src/SourceLocator/Type/StringSourceLocator.php b/src/SourceLocator/Type/StringSourceLocator.php index b6dad78bc..f4648f2d6 100644 --- a/src/SourceLocator/Type/StringSourceLocator.php +++ b/src/SourceLocator/Type/StringSourceLocator.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Type; +namespace PHPStan\BetterReflection\SourceLocator\Type; use InvalidArgumentException; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; /** * This source locator simply parses the string given in the constructor as @@ -36,7 +36,7 @@ public function __construct(string $source, Locator $astLocator) * @throws InvalidArgumentException * @throws InvalidFileLocation */ - protected function createLocatedSource(Identifier $identifier): ?\Roave\BetterReflection\SourceLocator\Located\LocatedSource + protected function createLocatedSource(Identifier $identifier): ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource { return new LocatedSource( $this->source, diff --git a/src/Util/CalculateReflectionColumn.php b/src/Util/CalculateReflectionColumn.php index 1514016ea..e28c25c26 100644 --- a/src/Util/CalculateReflectionColumn.php +++ b/src/Util/CalculateReflectionColumn.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Util; +namespace PHPStan\BetterReflection\Util; use PhpParser\Node; -use Roave\BetterReflection\Util\Exception\InvalidNodePosition; -use Roave\BetterReflection\Util\Exception\NoNodePosition; +use PHPStan\BetterReflection\Util\Exception\InvalidNodePosition; +use PHPStan\BetterReflection\Util\Exception\NoNodePosition; use function strlen; use function strrpos; diff --git a/src/Util/ClassExistenceChecker.php b/src/Util/ClassExistenceChecker.php index 470c44123..a2aacb25d 100644 --- a/src/Util/ClassExistenceChecker.php +++ b/src/Util/ClassExistenceChecker.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Util; +namespace PHPStan\BetterReflection\Util; use function class_exists; use function interface_exists; diff --git a/src/Util/ConstantNodeChecker.php b/src/Util/ConstantNodeChecker.php index 3c7f74b6e..8cba41dcd 100644 --- a/src/Util/ConstantNodeChecker.php +++ b/src/Util/ConstantNodeChecker.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Util; +namespace PHPStan\BetterReflection\Util; use PhpParser\Node; -use Roave\BetterReflection\Reflection\Exception\InvalidConstantNode; +use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode; use function count; use function in_array; diff --git a/src/Util/Exception/InvalidNodePosition.php b/src/Util/Exception/InvalidNodePosition.php index fbe5142c1..44386bd3c 100644 --- a/src/Util/Exception/InvalidNodePosition.php +++ b/src/Util/Exception/InvalidNodePosition.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Util\Exception; +namespace PHPStan\BetterReflection\Util\Exception; use InvalidArgumentException; diff --git a/src/Util/Exception/NoNodePosition.php b/src/Util/Exception/NoNodePosition.php index b76e3752c..27587bc23 100644 --- a/src/Util/Exception/NoNodePosition.php +++ b/src/Util/Exception/NoNodePosition.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Util\Exception; +namespace PHPStan\BetterReflection\Util\Exception; use InvalidArgumentException; use PhpParser\Lexer; diff --git a/src/Util/FileHelper.php b/src/Util/FileHelper.php index 039612c2c..16f2345e0 100644 --- a/src/Util/FileHelper.php +++ b/src/Util/FileHelper.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Util; +namespace PHPStan\BetterReflection\Util; use function array_pop; use function assert; diff --git a/src/Util/FindReflectionOnLine.php b/src/Util/FindReflectionOnLine.php index 0cb7e8b30..823bf6158 100644 --- a/src/Util/FindReflectionOnLine.php +++ b/src/Util/FindReflectionOnLine.php @@ -2,22 +2,22 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Util; +namespace PHPStan\BetterReflection\Util; use InvalidArgumentException; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use function array_merge; @@ -41,7 +41,7 @@ public function __construct(SourceLocator $sourceLocator, Locator $astLocator) * @throws InvalidFileLocation * @throws ParseToAstFailure * @throws InvalidArgumentException - * @return \Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionConstant|\Roave\BetterReflection\Reflection\Reflection|null + * @return \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionConstant|\PHPStan\BetterReflection\Reflection\Reflection|null */ public function __invoke(string $filename, int $lineNumber) { @@ -94,7 +94,7 @@ private function computeReflections(string $filename): array /** * Check to see if the line is within the boundaries of the reflection specified. - * @param \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionMethod|\Roave\BetterReflection\Reflection\ReflectionFunction|\Roave\BetterReflection\Reflection\ReflectionConstant $reflection + * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionConstant $reflection */ private function containsLine($reflection, int $lineNumber): bool { diff --git a/src/Util/GetLastDocComment.php b/src/Util/GetLastDocComment.php index 1a9e17b29..39e1f56a8 100644 --- a/src/Util/GetLastDocComment.php +++ b/src/Util/GetLastDocComment.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Roave\BetterReflection\Util; +namespace PHPStan\BetterReflection\Util; use PhpParser\NodeAbstract; diff --git a/test/benchmark/PhpUnitTestCaseBench.php b/test/benchmark/PhpUnitTestCaseBench.php index 71d08c72a..b32b58999 100644 --- a/test/benchmark/PhpUnitTestCaseBench.php +++ b/test/benchmark/PhpUnitTestCaseBench.php @@ -6,10 +6,10 @@ use PhpBench\Benchmark\Metadata\Annotations\Iterations; use PhpBench\Extension\RunnerExtension; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_map; use function array_merge; diff --git a/test/compat/ReflectInternalClassByName.phpt b/test/compat/ReflectInternalClassByName.phpt index 116ed9f93..824751a7a 100644 --- a/test/compat/ReflectInternalClassByName.phpt +++ b/test/compat/ReflectInternalClassByName.phpt @@ -4,7 +4,7 @@ Reflecting an internal class by name getName()); var_dump($classInfo->isInternal()); diff --git a/test/compat/ReflectOnClassInString.phpt b/test/compat/ReflectOnClassInString.phpt index fd5202a4a..30f890441 100644 --- a/test/compat/ReflectOnClassInString.phpt +++ b/test/compat/ReflectOnClassInString.phpt @@ -10,10 +10,10 @@ $source = <<astLocator() + (new PHPStan\BetterReflection\BetterReflection())->astLocator() ) ); diff --git a/test/compat/ReflectOnUnloadedClass.phpt b/test/compat/ReflectOnUnloadedClass.phpt index faea61d19..740d6cab6 100644 --- a/test/compat/ReflectOnUnloadedClass.phpt +++ b/test/compat/ReflectOnUnloadedClass.phpt @@ -6,10 +6,10 @@ require_once __DIR__ . '/../../vendor/autoload.php'; var_dump(class_exists(UnloadedClass::class, false)); -$reflector = new \Roave\BetterReflection\Reflector\DefaultReflector( - new Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator( +$reflector = new \PHPStan\BetterReflection\Reflector\DefaultReflector( + new PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator( __DIR__ . '/assets/UnloadedClass.php', - (new Roave\BetterReflection\BetterReflection())->astLocator() + (new PHPStan\BetterReflection\BetterReflection())->astLocator() ) ); diff --git a/test/compat/ReflectUserClassByName.phpt b/test/compat/ReflectUserClassByName.phpt index d699dc971..15f2cc50b 100644 --- a/test/compat/ReflectUserClassByName.phpt +++ b/test/compat/ReflectUserClassByName.phpt @@ -4,7 +4,7 @@ Reflecting a user-defined class by name astLocator() + (new PHPStan\BetterReflection\BetterReflection())->astLocator() ); -$reflector = new \Roave\BetterReflection\Reflector\DefaultReflector($sourceLocator); +$reflector = new \PHPStan\BetterReflection\Reflector\DefaultReflector($sourceLocator); $functionInfo = $reflector->reflectFunction('myFunction'); @@ -27,7 +27,7 @@ var_dump([ 'type' => $returnType->__toString(), ]); -array_map(function (\Roave\BetterReflection\Reflection\ReflectionParameter $param) { +array_map(function (\PHPStan\BetterReflection\Reflection\ReflectionParameter $param) { $type = $param->getType(); var_dump([ diff --git a/test/unit/BetterReflectionSingleton.php b/test/unit/BetterReflectionSingleton.php index 1ac1b2e00..59a8bee2a 100644 --- a/test/unit/BetterReflectionSingleton.php +++ b/test/unit/BetterReflectionSingleton.php @@ -4,7 +4,7 @@ namespace Roave\BetterReflectionTest; -use Roave\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\BetterReflection; abstract class BetterReflectionSingleton { diff --git a/test/unit/BetterReflectionTest.php b/test/unit/BetterReflectionTest.php index 5775b7ebd..8ec16e0fa 100644 --- a/test/unit/BetterReflectionTest.php +++ b/test/unit/BetterReflectionTest.php @@ -8,16 +8,16 @@ use PhpParser\Parser; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\BetterReflection; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; -use Roave\BetterReflection\Util\FindReflectionOnLine; +use PHPStan\BetterReflection\BetterReflection; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\Util\FindReflectionOnLine; use function uniqid; diff --git a/test/unit/Identifier/Exception/InvalidIdentifierNameTest.php b/test/unit/Identifier/Exception/InvalidIdentifierNameTest.php index c313d5b6d..0b017d330 100644 --- a/test/unit/Identifier/Exception/InvalidIdentifierNameTest.php +++ b/test/unit/Identifier/Exception/InvalidIdentifierNameTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Exception\InvalidIdentifierName; +use PHPStan\BetterReflection\Identifier\Exception\InvalidIdentifierName; #[CoversClass(InvalidIdentifierName::class)] class InvalidIdentifierNameTest extends TestCase diff --git a/test/unit/Identifier/IdentifierTest.php b/test/unit/Identifier/IdentifierTest.php index 7fe848f9b..cc74a53bb 100644 --- a/test/unit/Identifier/IdentifierTest.php +++ b/test/unit/Identifier/IdentifierTest.php @@ -7,11 +7,11 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Exception\InvalidIdentifierName; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Identifier\Exception\InvalidIdentifierName; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; #[CoversClass(Identifier::class)] class IdentifierTest extends TestCase diff --git a/test/unit/Identifier/IdentifierTypeTest.php b/test/unit/Identifier/IdentifierTypeTest.php index cfd4671e0..3972b6c95 100644 --- a/test/unit/Identifier/IdentifierTypeTest.php +++ b/test/unit/Identifier/IdentifierTypeTest.php @@ -8,7 +8,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Identifier\IdentifierType; #[CoversClass(IdentifierType::class)] class IdentifierTypeTest extends TestCase diff --git a/test/unit/NodeCompiler/CompileNodeToValueTest.php b/test/unit/NodeCompiler/CompileNodeToValueTest.php index bdafd6f5d..4e18ba746 100644 --- a/test/unit/NodeCompiler/CompileNodeToValueTest.php +++ b/test/unit/NodeCompiler/CompileNodeToValueTest.php @@ -13,19 +13,19 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\NodeCompiler\CompileNodeToValue; -use Roave\BetterReflection\NodeCompiler\CompilerContext; -use Roave\BetterReflection\NodeCompiler\Exception\UnableToCompileNode; -use Roave\BetterReflection\Reflection\ReflectionPropertyHookType; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue; +use PHPStan\BetterReflection\NodeCompiler\CompilerContext; +use PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode; +use PHPStan\BetterReflection\Reflection\ReflectionPropertyHookType; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Util\FileHelper; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\ClassWithNewInInitializers; use Roave\BetterReflectionTest\Fixture\MagicConstantsClass; diff --git a/test/unit/NodeCompiler/CompiledValueTest.php b/test/unit/NodeCompiler/CompiledValueTest.php index 16fc524b9..3731b7a86 100644 --- a/test/unit/NodeCompiler/CompiledValueTest.php +++ b/test/unit/NodeCompiler/CompiledValueTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\NodeCompiler\CompiledValue; +use PHPStan\BetterReflection\NodeCompiler\CompiledValue; #[CoversClass(CompiledValue::class)] class CompiledValueTest extends TestCase diff --git a/test/unit/NodeCompiler/CompilerContextTest.php b/test/unit/NodeCompiler/CompilerContextTest.php index edca2eb2a..61b921762 100644 --- a/test/unit/NodeCompiler/CompilerContextTest.php +++ b/test/unit/NodeCompiler/CompilerContextTest.php @@ -8,11 +8,11 @@ use PHPStan\BetterReflection\Reflector\Reflector; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\NodeCompiler\CompilerContext; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\NodeCompiler\CompilerContext; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(CompilerContext::class)] diff --git a/test/unit/NodeCompiler/Exception/UnableToCompileNodeTest.php b/test/unit/NodeCompiler/Exception/UnableToCompileNodeTest.php index dd8d4c52d..3687110f0 100644 --- a/test/unit/NodeCompiler/Exception/UnableToCompileNodeTest.php +++ b/test/unit/NodeCompiler/Exception/UnableToCompileNodeTest.php @@ -16,13 +16,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\NodeCompiler\CompilerContext; -use Roave\BetterReflection\NodeCompiler\Exception\UnableToCompileNode; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\NodeCompiler\CompilerContext; +use PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function sprintf; diff --git a/test/unit/Reflection/Adapter/Exception/NotImplementedBecauseItTriggersAutoloadingTest.php b/test/unit/Reflection/Adapter/Exception/NotImplementedBecauseItTriggersAutoloadingTest.php index 86cc229a0..343fe2bbc 100644 --- a/test/unit/Reflection/Adapter/Exception/NotImplementedBecauseItTriggersAutoloadingTest.php +++ b/test/unit/Reflection/Adapter/Exception/NotImplementedBecauseItTriggersAutoloadingTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; #[CoversClass(NotImplementedBecauseItTriggersAutoloading::class)] class NotImplementedBecauseItTriggersAutoloadingTest extends TestCase diff --git a/test/unit/Reflection/Adapter/ReflectionAttributeTest.php b/test/unit/Reflection/Adapter/ReflectionAttributeTest.php index 8f75b3d5b..5f094752a 100644 --- a/test/unit/Reflection/Adapter/ReflectionAttributeTest.php +++ b/test/unit/Reflection/Adapter/ReflectionAttributeTest.php @@ -10,13 +10,13 @@ use PHPUnit\Framework\TestCase; use ReflectionAttribute as CoreReflectionAttribute; use ReflectionClass as CoreReflectionClass; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\AttributeThatAcceptsArgument; use Roave\BetterReflectionTest\Fixture\AttributeThatHasNestedClassUsingNamedArguments; diff --git a/test/unit/Reflection/Adapter/ReflectionClassConstantTest.php b/test/unit/Reflection/Adapter/ReflectionClassConstantTest.php index a21b28535..64a54e48a 100644 --- a/test/unit/Reflection/Adapter/ReflectionClassConstantTest.php +++ b/test/unit/Reflection/Adapter/ReflectionClassConstantTest.php @@ -11,14 +11,14 @@ use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; use ReflectionClassConstant as CoreReflectionClassConstant; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; use Roave\BetterReflectionTest\Fixture\PureEnum; use function array_combine; diff --git a/test/unit/Reflection/Adapter/ReflectionClassTest.php b/test/unit/Reflection/Adapter/ReflectionClassTest.php index e2b388017..c600a8535 100644 --- a/test/unit/Reflection/Adapter/ReflectionClassTest.php +++ b/test/unit/Reflection/Adapter/ReflectionClassTest.php @@ -15,21 +15,21 @@ use ReflectionException as CoreReflectionException; use ReflectionMethod as CoreReflectionMethod; use ReflectionProperty as CoreReflectionProperty; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplemented; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; +use PHPStan\BetterReflection\Util\FileHelper; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\ClassesWithPublicOrNonPublicConstructor\ClassWithConstructorAndArguments; use Roave\BetterReflectionTest\Fixture\AutoloadableEnum; diff --git a/test/unit/Reflection/Adapter/ReflectionEnumBackedCaseTest.php b/test/unit/Reflection/Adapter/ReflectionEnumBackedCaseTest.php index 4cfc42118..6c3e59252 100644 --- a/test/unit/Reflection/Adapter/ReflectionEnumBackedCaseTest.php +++ b/test/unit/Reflection/Adapter/ReflectionEnumBackedCaseTest.php @@ -11,14 +11,14 @@ use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; use ReflectionEnumBackedCase as CoreReflectionEnumBackedCase; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionEnum as ReflectionEnumAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionEnumBackedCase as ReflectionEnumBackedCaseAdapter; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum as ReflectionEnumAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumBackedCase as ReflectionEnumBackedCaseAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; use function array_combine; use function array_map; diff --git a/test/unit/Reflection/Adapter/ReflectionEnumTest.php b/test/unit/Reflection/Adapter/ReflectionEnumTest.php index fbcec4728..400adb1ca 100644 --- a/test/unit/Reflection/Adapter/ReflectionEnumTest.php +++ b/test/unit/Reflection/Adapter/ReflectionEnumTest.php @@ -16,25 +16,25 @@ use ReflectionException as CoreReflectionException; use ReflectionMethod as CoreReflectionMethod; use ReflectionProperty as CoreReflectionProperty; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplemented; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionEnum as ReflectionEnumAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionEnumBackedCase as ReflectionEnumBackedCaseAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionEnumUnitCase as ReflectionEnumUnitCaseAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum as ReflectionEnumAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumBackedCase as ReflectionEnumBackedCaseAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumUnitCase as ReflectionEnumUnitCaseAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; use Roave\BetterReflectionTest\Fixture\AutoloadableEnum; use stdClass; diff --git a/test/unit/Reflection/Adapter/ReflectionEnumUnitCaseTest.php b/test/unit/Reflection/Adapter/ReflectionEnumUnitCaseTest.php index 4faeb72a3..c79b6c5fe 100644 --- a/test/unit/Reflection/Adapter/ReflectionEnumUnitCaseTest.php +++ b/test/unit/Reflection/Adapter/ReflectionEnumUnitCaseTest.php @@ -11,14 +11,14 @@ use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; use ReflectionEnumUnitCase as CoreReflectionEnumUnitCase; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionEnum as ReflectionEnumAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionEnumUnitCase as ReflectionEnumUnitCaseAdapter; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum as ReflectionEnumAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumUnitCase as ReflectionEnumUnitCaseAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase; use function array_combine; use function array_map; diff --git a/test/unit/Reflection/Adapter/ReflectionFunctionTest.php b/test/unit/Reflection/Adapter/ReflectionFunctionTest.php index 3a84e9311..6e627e574 100644 --- a/test/unit/Reflection/Adapter/ReflectionFunctionTest.php +++ b/test/unit/Reflection/Adapter/ReflectionFunctionTest.php @@ -14,17 +14,17 @@ use ReflectionClass as CoreReflectionClass; use ReflectionException as CoreReflectionException; use ReflectionFunction as CoreReflectionFunction; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplemented; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionFunction as ReflectionFunctionAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionParameter as ReflectionParameterAdapter; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionFunction as ReflectionFunctionAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter as ReflectionParameterAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; +use PHPStan\BetterReflection\Util\FileHelper; use Throwable; use function array_combine; diff --git a/test/unit/Reflection/Adapter/ReflectionIntersectionTypeTest.php b/test/unit/Reflection/Adapter/ReflectionIntersectionTypeTest.php index 061432f19..481cf936c 100644 --- a/test/unit/Reflection/Adapter/ReflectionIntersectionTypeTest.php +++ b/test/unit/Reflection/Adapter/ReflectionIntersectionTypeTest.php @@ -9,10 +9,10 @@ use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; use ReflectionIntersectionType as CoreReflectionIntersectionType; -use Roave\BetterReflection\Reflection\Adapter\ReflectionIntersectionType as ReflectionIntersectionTypeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType as ReflectionIntersectionTypeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; use function array_combine; use function array_map; diff --git a/test/unit/Reflection/Adapter/ReflectionMethodTest.php b/test/unit/Reflection/Adapter/ReflectionMethodTest.php index f831fdd5b..10b180860 100644 --- a/test/unit/Reflection/Adapter/ReflectionMethodTest.php +++ b/test/unit/Reflection/Adapter/ReflectionMethodTest.php @@ -13,22 +13,22 @@ use ReflectionClass as CoreReflectionClass; use ReflectionException as CoreReflectionException; use ReflectionMethod as CoreReflectionMethod; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplemented; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionParameter as ReflectionParameterAdapter; -use Roave\BetterReflection\Reflection\Exception\CodeLocationMissing; -use Roave\BetterReflection\Reflection\Exception\MethodPrototypeNotFound; -use Roave\BetterReflection\Reflection\Exception\NoObjectProvided; -use Roave\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter as ReflectionParameterAdapter; +use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing; +use PHPStan\BetterReflection\Reflection\Exception\MethodPrototypeNotFound; +use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided; +use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; +use PHPStan\BetterReflection\Util\FileHelper; use stdClass; use function array_combine; diff --git a/test/unit/Reflection/Adapter/ReflectionNamedTypeTest.php b/test/unit/Reflection/Adapter/ReflectionNamedTypeTest.php index 1ea2a584a..df6ca336f 100644 --- a/test/unit/Reflection/Adapter/ReflectionNamedTypeTest.php +++ b/test/unit/Reflection/Adapter/ReflectionNamedTypeTest.php @@ -10,10 +10,10 @@ use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; use ReflectionNamedType as CoreReflectionNamedType; -use Roave\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_combine; use function array_map; diff --git a/test/unit/Reflection/Adapter/ReflectionObjectTest.php b/test/unit/Reflection/Adapter/ReflectionObjectTest.php index 37c4b2590..f0205aa23 100644 --- a/test/unit/Reflection/Adapter/ReflectionObjectTest.php +++ b/test/unit/Reflection/Adapter/ReflectionObjectTest.php @@ -15,21 +15,21 @@ use ReflectionMethod as CoreReflectionMethod; use ReflectionObject as CoreReflectionObject; use ReflectionProperty as CoreReflectionProperty; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplemented; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionObject as ReflectionObjectAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionObject as BetterReflectionObject; -use Roave\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionObject as ReflectionObjectAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionObject as BetterReflectionObject; +use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; +use PHPStan\BetterReflection\Util\FileHelper; use stdClass; use function array_combine; diff --git a/test/unit/Reflection/Adapter/ReflectionParameterTest.php b/test/unit/Reflection/Adapter/ReflectionParameterTest.php index a0f2c7336..611958b4b 100644 --- a/test/unit/Reflection/Adapter/ReflectionParameterTest.php +++ b/test/unit/Reflection/Adapter/ReflectionParameterTest.php @@ -12,21 +12,21 @@ use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; use ReflectionParameter as CoreReflectionParameter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionFunction as ReflectionFunctionAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionParameter as ReflectionParameterAdapter; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionFunction as ReflectionFunctionAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter as ReflectionParameterAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_combine; use function array_map; diff --git a/test/unit/Reflection/Adapter/ReflectionPropertyTest.php b/test/unit/Reflection/Adapter/ReflectionPropertyTest.php index 24ebbbc7c..9d8c48fdc 100644 --- a/test/unit/Reflection/Adapter/ReflectionPropertyTest.php +++ b/test/unit/Reflection/Adapter/ReflectionPropertyTest.php @@ -15,20 +15,20 @@ use ReflectionClass as CoreReflectionClass; use ReflectionException as CoreReflectionException; use ReflectionProperty as CoreReflectionProperty; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; -use Roave\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; -use Roave\BetterReflection\Reflection\Exception\NoObjectProvided; -use Roave\BetterReflection\Reflection\Exception\NotAnObject; -use Roave\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; -use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplementedBecauseItTriggersAutoloading; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute as ReflectionAttributeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; +use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided; +use PHPStan\BetterReflection\Reflection\Exception\NotAnObject; +use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty; use stdClass; use TypeError; diff --git a/test/unit/Reflection/Adapter/ReflectionTypeTest.php b/test/unit/Reflection/Adapter/ReflectionTypeTest.php index cca0f1101..6281dac91 100644 --- a/test/unit/Reflection/Adapter/ReflectionTypeTest.php +++ b/test/unit/Reflection/Adapter/ReflectionTypeTest.php @@ -10,15 +10,15 @@ use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; use ReflectionType as CoreReflectionType; -use Roave\BetterReflection\Reflection\Adapter\ReflectionIntersectionType as ReflectionIntersectionTypeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionType as ReflectionTypeAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionUnionType as ReflectionUnionTypeAdapter; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType as ReflectionIntersectionTypeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType as ReflectionNamedTypeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionType as ReflectionTypeAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType as ReflectionUnionTypeAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; +use PHPStan\BetterReflection\Reflector\Reflector; use function array_combine; use function array_map; diff --git a/test/unit/Reflection/Adapter/ReflectionUnionTypeTest.php b/test/unit/Reflection/Adapter/ReflectionUnionTypeTest.php index e65ecd298..6f769994e 100644 --- a/test/unit/Reflection/Adapter/ReflectionUnionTypeTest.php +++ b/test/unit/Reflection/Adapter/ReflectionUnionTypeTest.php @@ -10,10 +10,10 @@ use ReflectionClass as CoreReflectionClass; use ReflectionType as CoreReflectionType; use ReflectionUnionType as CoreReflectionUnionType; -use Roave\BetterReflection\Reflection\Adapter\ReflectionUnionType as ReflectionUnionTypeAdapter; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType as ReflectionUnionTypeAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType; use function array_combine; use function array_map; diff --git a/test/unit/Reflection/Annotation/AnnotationHelperTest.php b/test/unit/Reflection/Annotation/AnnotationHelperTest.php index 248c5ec6e..bb6551d2a 100644 --- a/test/unit/Reflection/Annotation/AnnotationHelperTest.php +++ b/test/unit/Reflection/Annotation/AnnotationHelperTest.php @@ -7,7 +7,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Annotation\AnnotationHelper; +use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper; #[CoversClass(AnnotationHelper::class)] class AnnotationHelperTest extends TestCase diff --git a/test/unit/Reflection/Attribute/ReflectionAttributeHelperTest.php b/test/unit/Reflection/Attribute/ReflectionAttributeHelperTest.php index 3954a9ba7..be3b67332 100644 --- a/test/unit/Reflection/Attribute/ReflectionAttributeHelperTest.php +++ b/test/unit/Reflection/Attribute/ReflectionAttributeHelperTest.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; -use Roave\BetterReflection\Reflection\ReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflector\Reflector; #[CoversClass(ReflectionAttributeHelper::class)] class ReflectionAttributeHelperTest extends TestCase diff --git a/test/unit/Reflection/Deprecated/DeprecatedHelperTest.php b/test/unit/Reflection/Deprecated/DeprecatedHelperTest.php index ebd89fe3d..54fc46302 100644 --- a/test/unit/Reflection/Deprecated/DeprecatedHelperTest.php +++ b/test/unit/Reflection/Deprecated/DeprecatedHelperTest.php @@ -7,10 +7,10 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Deprecated\DeprecatedHelper; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\Deprecated\DeprecatedHelper; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function sprintf; diff --git a/test/unit/Reflection/Exception/CircularReferenceTest.php b/test/unit/Reflection/Exception/CircularReferenceTest.php index f4e2380c9..ff4eac34c 100644 --- a/test/unit/Reflection/Exception/CircularReferenceTest.php +++ b/test/unit/Reflection/Exception/CircularReferenceTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\CircularReference; +use PHPStan\BetterReflection\Reflection\Exception\CircularReference; #[CoversClass(CircularReference::class)] class CircularReferenceTest extends TestCase diff --git a/test/unit/Reflection/Exception/ClassDoesNotExistTest.php b/test/unit/Reflection/Exception/ClassDoesNotExistTest.php index 92d0688bc..de2558850 100644 --- a/test/unit/Reflection/Exception/ClassDoesNotExistTest.php +++ b/test/unit/Reflection/Exception/ClassDoesNotExistTest.php @@ -6,8 +6,8 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\ClassDoesNotExist; -use Roave\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflection\Exception\ClassDoesNotExist; +use PHPStan\BetterReflection\Reflection\Reflection; #[CoversClass(ClassDoesNotExist::class)] class ClassDoesNotExistTest extends TestCase diff --git a/test/unit/Reflection/Exception/CodeLocationMissingTest.php b/test/unit/Reflection/Exception/CodeLocationMissingTest.php index 668de2bed..99cfcf2a5 100644 --- a/test/unit/Reflection/Exception/CodeLocationMissingTest.php +++ b/test/unit/Reflection/Exception/CodeLocationMissingTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\CodeLocationMissing; +use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing; #[CoversClass(CodeLocationMissing::class)] class CodeLocationMissingTest extends TestCase diff --git a/test/unit/Reflection/Exception/FunctionDoesNotExistTest.php b/test/unit/Reflection/Exception/FunctionDoesNotExistTest.php index 928e11e39..4e3c4b2e3 100644 --- a/test/unit/Reflection/Exception/FunctionDoesNotExistTest.php +++ b/test/unit/Reflection/Exception/FunctionDoesNotExistTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\FunctionDoesNotExist; +use PHPStan\BetterReflection\Reflection\Exception\FunctionDoesNotExist; #[CoversClass(FunctionDoesNotExist::class)] class FunctionDoesNotExistTest extends TestCase diff --git a/test/unit/Reflection/Exception/InvalidArrowFunctionBodyNodeTest.php b/test/unit/Reflection/Exception/InvalidArrowFunctionBodyNodeTest.php index fd21b0c8b..6326dffc8 100644 --- a/test/unit/Reflection/Exception/InvalidArrowFunctionBodyNodeTest.php +++ b/test/unit/Reflection/Exception/InvalidArrowFunctionBodyNodeTest.php @@ -8,7 +8,7 @@ use PhpParser\Node\Stmt\Echo_; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\InvalidArrowFunctionBodyNode; +use PHPStan\BetterReflection\Reflection\Exception\InvalidArrowFunctionBodyNode; #[CoversClass(InvalidArrowFunctionBodyNode::class)] class InvalidArrowFunctionBodyNodeTest extends TestCase diff --git a/test/unit/Reflection/Exception/InvalidConstantNodeTest.php b/test/unit/Reflection/Exception/InvalidConstantNodeTest.php index c425d4842..a891b0ae1 100644 --- a/test/unit/Reflection/Exception/InvalidConstantNodeTest.php +++ b/test/unit/Reflection/Exception/InvalidConstantNodeTest.php @@ -7,7 +7,7 @@ use PhpParser\Node; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\InvalidConstantNode; +use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode; #[CoversClass(InvalidConstantNode::class)] class InvalidConstantNodeTest extends TestCase diff --git a/test/unit/Reflection/Exception/NoObjectProvidedTest.php b/test/unit/Reflection/Exception/NoObjectProvidedTest.php index 8ea196b0c..66424ae20 100644 --- a/test/unit/Reflection/Exception/NoObjectProvidedTest.php +++ b/test/unit/Reflection/Exception/NoObjectProvidedTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\NoObjectProvided; +use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided; #[CoversClass(NoObjectProvided::class)] class NoObjectProvidedTest extends TestCase diff --git a/test/unit/Reflection/Exception/NotAnObjectTest.php b/test/unit/Reflection/Exception/NotAnObjectTest.php index abfbfcf3d..b50984646 100644 --- a/test/unit/Reflection/Exception/NotAnObjectTest.php +++ b/test/unit/Reflection/Exception/NotAnObjectTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\NotAnObject; +use PHPStan\BetterReflection\Reflection\Exception\NotAnObject; #[CoversClass(NotAnObject::class)] class NotAnObjectTest extends TestCase diff --git a/test/unit/Reflection/Exception/ObjectNotInstanceOfClassTest.php b/test/unit/Reflection/Exception/ObjectNotInstanceOfClassTest.php index d6c1b7ee3..dead58b84 100644 --- a/test/unit/Reflection/Exception/ObjectNotInstanceOfClassTest.php +++ b/test/unit/Reflection/Exception/ObjectNotInstanceOfClassTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; +use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; #[CoversClass(ObjectNotInstanceOfClass::class)] class ObjectNotInstanceOfClassTest extends TestCase diff --git a/test/unit/Reflection/Exception/PropertyDoesNotExistTest.php b/test/unit/Reflection/Exception/PropertyDoesNotExistTest.php index 1516cd291..045e307f7 100644 --- a/test/unit/Reflection/Exception/PropertyDoesNotExistTest.php +++ b/test/unit/Reflection/Exception/PropertyDoesNotExistTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\PropertyDoesNotExist; +use PHPStan\BetterReflection\Reflection\Exception\PropertyDoesNotExist; #[CoversClass(PropertyDoesNotExist::class)] class PropertyDoesNotExistTest extends TestCase diff --git a/test/unit/Reflection/Exception/PropertyIsNotStaticTest.php b/test/unit/Reflection/Exception/PropertyIsNotStaticTest.php index 118d5d4af..1d7b3bfdd 100644 --- a/test/unit/Reflection/Exception/PropertyIsNotStaticTest.php +++ b/test/unit/Reflection/Exception/PropertyIsNotStaticTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\PropertyIsNotStatic; +use PHPStan\BetterReflection\Reflection\Exception\PropertyIsNotStatic; #[CoversClass(PropertyIsNotStatic::class)] class PropertyIsNotStaticTest extends TestCase diff --git a/test/unit/Reflection/ReflectionAttributeTest.php b/test/unit/Reflection/ReflectionAttributeTest.php index b05d8bb66..a9c9410ba 100644 --- a/test/unit/Reflection/ReflectionAttributeTest.php +++ b/test/unit/Reflection/ReflectionAttributeTest.php @@ -8,13 +8,13 @@ use PhpParser\Node; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionAttribute; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Reflection\ReflectionAttribute; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\AnotherAttr; use Roave\BetterReflectionTest\Fixture\Attr; diff --git a/test/unit/Reflection/ReflectionClassConstantTest.php b/test/unit/Reflection/ReflectionClassConstantTest.php index 78185a3df..f2d0b261e 100644 --- a/test/unit/Reflection/ReflectionClassConstantTest.php +++ b/test/unit/Reflection/ReflectionClassConstantTest.php @@ -8,15 +8,15 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use ReflectionClassConstant as CoreReflectionClassConstant; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionNamedType; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\ComposerSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\ComposerSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\Attr; use Roave\BetterReflectionTest\Fixture\ClassWithAttributes; @@ -49,7 +49,7 @@ private function getComposerLocator(): ComposerSourceLocator } /** @param non-empty-string $name */ - private function getExampleConstant(string $name): ?\Roave\BetterReflection\Reflection\ReflectionClassConstant + private function getExampleConstant(string $name): ?\PHPStan\BetterReflection\Reflection\ReflectionClassConstant { $reflector = new DefaultReflector($this->getComposerLocator()); $classInfo = $reflector->reflectClass(ExampleClass::class); diff --git a/test/unit/Reflection/ReflectionClassTest.php b/test/unit/Reflection/ReflectionClassTest.php index 50d4b0bfb..140ed0cf0 100644 --- a/test/unit/Reflection/ReflectionClassTest.php +++ b/test/unit/Reflection/ReflectionClassTest.php @@ -26,27 +26,27 @@ use ReflectionClassConstant as CoreReflectionClassConstant; use ReflectionMethod as CoreReflectionMethod; use ReflectionProperty as CoreReflectionProperty; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; -use Roave\BetterReflection\Reflection\Exception\CircularReference; -use Roave\BetterReflection\Reflection\Exception\PropertyDoesNotExist; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionClassConstant; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionProperty; -use Roave\BetterReflection\Reflection\ReflectionUnionType; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\ComposerSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\FileIteratorSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\MemoizingSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; +use PHPStan\BetterReflection\Reflection\Exception\CircularReference; +use PHPStan\BetterReflection\Reflection\Exception\PropertyDoesNotExist; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionClassConstant; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionProperty; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\ComposerSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\FileIteratorSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\ClassesImplementingIterators; use Roave\BetterReflectionTest\ClassesWithCloneMethod; @@ -121,7 +121,7 @@ private function getComposerLocator(): ComposerSourceLocator public function testCanReflectInternalClassWithDefaultLocator(): void { - $reflector = (new \Roave\BetterReflection\BetterReflection())->reflector(); + $reflector = (new \PHPStan\BetterReflection\BetterReflection())->reflector(); self::assertSame(stdClass::class, $reflector->reflectClass(stdClass::class)->getName()); } @@ -137,7 +137,7 @@ public function testCanReflectEvaledClassWithDefaultLocator(): void eval('class ' . $className . '{}'); - $reflector = (new \Roave\BetterReflection\BetterReflection())->reflector(); + $reflector = (new \PHPStan\BetterReflection\BetterReflection())->reflector(); self::assertSame($className, $reflector->reflectClass($className)->getName()); } @@ -859,7 +859,7 @@ public function testGetParentClassDefault(): void public function testGetParentClassThrowsExceptionWithNoParent(): void { - $reflector = (new \Roave\BetterReflection\BetterReflection())->reflector(); + $reflector = (new \PHPStan\BetterReflection\BetterReflection())->reflector(); $reflection = $reflector->reflectClass(ExampleClass::class); self::assertNull($reflection->getParentClass()); @@ -2094,7 +2094,7 @@ public function testReflectedTraitHasNoInterfaces(): void public function testToString(): void { - $reflector = (new \Roave\BetterReflection\BetterReflection())->reflector(); + $reflector = (new \PHPStan\BetterReflection\BetterReflection())->reflector(); $reflection = $reflector->reflectClass(ExampleClass::class); self::assertStringMatchesFormat( file_get_contents(__DIR__ . '/../Fixture/ExampleClassExport.txt'), diff --git a/test/unit/Reflection/ReflectionConstantTest.php b/test/unit/Reflection/ReflectionConstantTest.php index 0536724fa..411aeb303 100644 --- a/test/unit/Reflection/ReflectionConstantTest.php +++ b/test/unit/Reflection/ReflectionConstantTest.php @@ -9,17 +9,17 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\InvalidConstantNode; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function sprintf; @@ -171,7 +171,7 @@ public function testToString(): void { require_once __DIR__ . '/../Fixture/Constants.php'; - $reflector = (new \Roave\BetterReflection\BetterReflection())->reflector(); + $reflector = (new \PHPStan\BetterReflection\BetterReflection())->reflector(); $reflection = $reflector->reflectConstant('Roave\BetterReflectionTest\Fixture\BY_CONST'); self::assertStringMatchesFormat("Constant [ boolean Roave\BetterReflectionTest\Fixture\BY_CONST ] {\n @@ %s/Fixture/Constants.php 5 - 5\n 1 }", (string) $reflection); diff --git a/test/unit/Reflection/ReflectionEnumCaseTest.php b/test/unit/Reflection/ReflectionEnumCaseTest.php index 71adb759f..d2f02fc0b 100644 --- a/test/unit/Reflection/ReflectionEnumCaseTest.php +++ b/test/unit/Reflection/ReflectionEnumCaseTest.php @@ -9,12 +9,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionEnumCase; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\Attr; use Roave\BetterReflectionTest\Fixture\DocComment; diff --git a/test/unit/Reflection/ReflectionEnumTest.php b/test/unit/Reflection/ReflectionEnumTest.php index d8f3736af..d2fbc4eb6 100644 --- a/test/unit/Reflection/ReflectionEnumTest.php +++ b/test/unit/Reflection/ReflectionEnumTest.php @@ -8,13 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionEnumCase; -use Roave\BetterReflection\Reflection\ReflectionNamedType; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionEnumCase; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\IntEnum; use Roave\BetterReflectionTest\Fixture\PureEnum; diff --git a/test/unit/Reflection/ReflectionFunctionAbstractTest.php b/test/unit/Reflection/ReflectionFunctionAbstractTest.php index 1ea232dfd..bd81e0ea3 100644 --- a/test/unit/Reflection/ReflectionFunctionAbstractTest.php +++ b/test/unit/Reflection/ReflectionFunctionAbstractTest.php @@ -11,20 +11,20 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; -use Roave\BetterReflection\Reflection\Exception\CodeLocationMissing; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionFunctionAbstract; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionType; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\ClosureSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionFunctionAbstract; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionType; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\ClosureSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\Attr; use Roave\BetterReflectionTest\Fixture\StringEnum; diff --git a/test/unit/Reflection/ReflectionFunctionTest.php b/test/unit/Reflection/ReflectionFunctionTest.php index fa4a7f9aa..7223b3bba 100644 --- a/test/unit/Reflection/ReflectionFunctionTest.php +++ b/test/unit/Reflection/ReflectionFunctionTest.php @@ -7,15 +7,15 @@ use Closure; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Adapter\Exception\NotImplemented; -use Roave\BetterReflection\Reflection\Exception\FunctionDoesNotExist; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented; +use PHPStan\BetterReflection\Reflection\Exception\FunctionDoesNotExist; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\Attr; use Roave\BetterReflectionTest\Fixture\ClassWithStaticMethod; @@ -227,7 +227,7 @@ public function testToString(): void { require_once __DIR__ . '/../Fixture/Functions.php'; - $reflector = (new \Roave\BetterReflection\BetterReflection())->reflector(); + $reflector = (new \PHPStan\BetterReflection\BetterReflection())->reflector(); $functionInfo = $reflector->reflectFunction('Roave\BetterReflectionTest\Fixture\myFunction'); self::assertStringMatchesFormat("Function [ function Roave\BetterReflectionTest\Fixture\myFunction ] {\n @@ %s/test/unit/Fixture/Functions.php 5 - 6\n}", (string) $functionInfo); @@ -237,7 +237,7 @@ public function testGetClosure(): void { require_once __DIR__ . '/../Fixture/Functions.php'; - $reflector = (new \Roave\BetterReflection\BetterReflection())->reflector(); + $reflector = (new \PHPStan\BetterReflection\BetterReflection())->reflector(); $functionReflection = $reflector->reflectFunction('Roave\BetterReflectionTest\Fixture\myFunctionWithParams'); $closure = $functionReflection->getClosure(); @@ -274,7 +274,7 @@ public function testInvoke(): void { require_once __DIR__ . '/../Fixture/Functions.php'; - $reflector = (new \Roave\BetterReflection\BetterReflection())->reflector(); + $reflector = (new \PHPStan\BetterReflection\BetterReflection())->reflector(); $functionReflection = $reflector->reflectFunction('Roave\BetterReflectionTest\Fixture\myFunctionWithParams'); self::assertSame(5, $functionReflection->invoke(2, 3)); diff --git a/test/unit/Reflection/ReflectionIntersectionTypeTest.php b/test/unit/Reflection/ReflectionIntersectionTypeTest.php index 03185c1ff..a8f377c89 100644 --- a/test/unit/Reflection/ReflectionIntersectionTypeTest.php +++ b/test/unit/Reflection/ReflectionIntersectionTypeTest.php @@ -8,10 +8,10 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflector\Reflector; #[CoversClass(ReflectionIntersectionType::class)] class ReflectionIntersectionTypeTest extends TestCase diff --git a/test/unit/Reflection/ReflectionMethodTest.php b/test/unit/Reflection/ReflectionMethodTest.php index 03306393d..a5d30bc88 100644 --- a/test/unit/Reflection/ReflectionMethodTest.php +++ b/test/unit/Reflection/ReflectionMethodTest.php @@ -16,25 +16,25 @@ use Reflection; use ReflectionClass as CoreReflectionClass; use ReflectionMethod as CoreReflectionMethod; -use Roave\BetterReflection\Reflection\Exception\ClassDoesNotExist; -use Roave\BetterReflection\Reflection\Exception\MethodPrototypeNotFound; -use Roave\BetterReflection\Reflection\Exception\NoObjectProvided; -use Roave\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionPropertyHookType; -use Roave\BetterReflection\Reflection\ReflectionType; -use Roave\BetterReflection\Reflection\ReflectionUnionType; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\ComposerSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\Exception\ClassDoesNotExist; +use PHPStan\BetterReflection\Reflection\Exception\MethodPrototypeNotFound; +use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided; +use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionPropertyHookType; +use PHPStan\BetterReflection\Reflection\ReflectionType; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\ComposerSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\Attr; use Roave\BetterReflectionTest\Fixture\ClassUsesTraitWithStaticMethod; diff --git a/test/unit/Reflection/ReflectionNamedTypeTest.php b/test/unit/Reflection/ReflectionNamedTypeTest.php index 65b1bba3f..21b289d22 100644 --- a/test/unit/Reflection/ReflectionNamedTypeTest.php +++ b/test/unit/Reflection/ReflectionNamedTypeTest.php @@ -10,13 +10,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function sprintf; diff --git a/test/unit/Reflection/ReflectionObjectTest.php b/test/unit/Reflection/ReflectionObjectTest.php index 67167ee25..ff0749897 100644 --- a/test/unit/Reflection/ReflectionObjectTest.php +++ b/test/unit/Reflection/ReflectionObjectTest.php @@ -14,11 +14,11 @@ use ReflectionObject as CoreReflectionObject; use ReflectionParameter; use ReflectionProperty as CoreReflectionProperty; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionObject; -use Roave\BetterReflection\Reflection\ReflectionProperty; -use Roave\BetterReflection\SourceLocator\Located\EvaledLocatedSource; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionObject; +use PHPStan\BetterReflection\Reflection\ReflectionProperty; +use PHPStan\BetterReflection\SourceLocator\Located\EvaledLocatedSource; +use PHPStan\BetterReflection\Util\FileHelper; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\ClassForHinting; use Roave\BetterReflectionTest\Fixture\DefaultProperties; diff --git a/test/unit/Reflection/ReflectionParameterTest.php b/test/unit/Reflection/ReflectionParameterTest.php index c38324f44..90b19c2eb 100644 --- a/test/unit/Reflection/ReflectionParameterTest.php +++ b/test/unit/Reflection/ReflectionParameterTest.php @@ -12,17 +12,17 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\CodeLocationMissing; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\ComposerSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\ComposerSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\Attr; use Roave\BetterReflectionTest\Fixture\ClassForHinting; diff --git a/test/unit/Reflection/ReflectionPropertyTest.php b/test/unit/Reflection/ReflectionPropertyTest.php index 67adac81b..d47c85b9a 100644 --- a/test/unit/Reflection/ReflectionPropertyTest.php +++ b/test/unit/Reflection/ReflectionPropertyTest.php @@ -17,25 +17,25 @@ use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; use ReflectionProperty as CoreReflectionProperty; -use Roave\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; -use Roave\BetterReflection\Reflection\Exception\ClassDoesNotExist; -use Roave\BetterReflection\Reflection\Exception\CodeLocationMissing; -use Roave\BetterReflection\Reflection\Exception\NoObjectProvided; -use Roave\BetterReflection\Reflection\Exception\NotAnObject; -use Roave\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionProperty; -use Roave\BetterReflection\Reflection\ReflectionPropertyHookType; -use Roave\BetterReflection\Reflection\ReflectionType; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\ComposerSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter; +use PHPStan\BetterReflection\Reflection\Exception\ClassDoesNotExist; +use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing; +use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided; +use PHPStan\BetterReflection\Reflection\Exception\NotAnObject; +use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionProperty; +use PHPStan\BetterReflection\Reflection\ReflectionPropertyHookType; +use PHPStan\BetterReflection\Reflection\ReflectionType; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\ComposerSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\Attr; use Roave\BetterReflectionTest\Fixture\ClassForHinting; diff --git a/test/unit/Reflection/ReflectionTypeTest.php b/test/unit/Reflection/ReflectionTypeTest.php index 6f61bc414..9c5a93475 100644 --- a/test/unit/Reflection/ReflectionTypeTest.php +++ b/test/unit/Reflection/ReflectionTypeTest.php @@ -8,12 +8,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionType; -use Roave\BetterReflection\Reflection\ReflectionUnionType; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionType; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType; +use PHPStan\BetterReflection\Reflector\Reflector; #[CoversClass(ReflectionType::class)] #[CoversClass(ReflectionNamedType::class)] diff --git a/test/unit/Reflection/ReflectionUnionTypeTest.php b/test/unit/Reflection/ReflectionUnionTypeTest.php index f34e66efb..b9361c16e 100644 --- a/test/unit/Reflection/ReflectionUnionTypeTest.php +++ b/test/unit/Reflection/ReflectionUnionTypeTest.php @@ -8,10 +8,10 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionType; -use Roave\BetterReflection\Reflection\ReflectionUnionType; -use Roave\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionType; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType; +use PHPStan\BetterReflection\Reflector\Reflector; #[CoversClass(ReflectionUnionType::class)] class ReflectionUnionTypeTest extends TestCase diff --git a/test/unit/Reflection/StringCast/ReflectionAttributeStringCastTest.php b/test/unit/Reflection/StringCast/ReflectionAttributeStringCastTest.php index 634d67f67..f6f928b0d 100644 --- a/test/unit/Reflection/StringCast/ReflectionAttributeStringCastTest.php +++ b/test/unit/Reflection/StringCast/ReflectionAttributeStringCastTest.php @@ -7,10 +7,10 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\StringCast\ReflectionAttributeStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionAttributeStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\ClassWithAttributesForStringCast; diff --git a/test/unit/Reflection/StringCast/ReflectionClassConstantStringCastTest.php b/test/unit/Reflection/StringCast/ReflectionClassConstantStringCastTest.php index 03efe6c02..20ca42236 100644 --- a/test/unit/Reflection/StringCast/ReflectionClassConstantStringCastTest.php +++ b/test/unit/Reflection/StringCast/ReflectionClassConstantStringCastTest.php @@ -7,10 +7,10 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\StringCast\ReflectionClassConstantStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionClassConstantStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\StringCastConstants; diff --git a/test/unit/Reflection/StringCast/ReflectionClassStringCastTest.php b/test/unit/Reflection/StringCast/ReflectionClassStringCastTest.php index 8bce67b40..e61695a0b 100644 --- a/test/unit/Reflection/StringCast/ReflectionClassStringCastTest.php +++ b/test/unit/Reflection/StringCast/ReflectionClassStringCastTest.php @@ -7,16 +7,16 @@ use Exception; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionObject; -use Roave\BetterReflection\Reflection\StringCast\ReflectionClassStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\ReflectionObject; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionClassStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\StringCastBackedEnum; use Roave\BetterReflectionTest\Fixture\StringCastClass; diff --git a/test/unit/Reflection/StringCast/ReflectionConstantStringCastTest.php b/test/unit/Reflection/StringCast/ReflectionConstantStringCastTest.php index cbe8b2449..85a800b45 100644 --- a/test/unit/Reflection/StringCast/ReflectionConstantStringCastTest.php +++ b/test/unit/Reflection/StringCast/ReflectionConstantStringCastTest.php @@ -7,14 +7,14 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\StringCast\ReflectionConstantStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionConstantStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(ReflectionConstantStringCast::class)] diff --git a/test/unit/Reflection/StringCast/ReflectionEnumCaseStringCastTest.php b/test/unit/Reflection/StringCast/ReflectionEnumCaseStringCastTest.php index 88cbfad46..bfef7be35 100644 --- a/test/unit/Reflection/StringCast/ReflectionEnumCaseStringCastTest.php +++ b/test/unit/Reflection/StringCast/ReflectionEnumCaseStringCastTest.php @@ -6,11 +6,11 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflection\StringCast\ReflectionEnumCaseStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionEnumCaseStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\StringCastBackedEnum; use Roave\BetterReflectionTest\Fixture\StringCastPureEnum; diff --git a/test/unit/Reflection/StringCast/ReflectionFunctionStringCastTest.php b/test/unit/Reflection/StringCast/ReflectionFunctionStringCastTest.php index aa7d8fc6b..d53a1b69e 100644 --- a/test/unit/Reflection/StringCast/ReflectionFunctionStringCastTest.php +++ b/test/unit/Reflection/StringCast/ReflectionFunctionStringCastTest.php @@ -7,12 +7,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\StringCast\ReflectionFunctionStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionFunctionStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(ReflectionFunctionStringCast::class)] diff --git a/test/unit/Reflection/StringCast/ReflectionMethodStringCastTest.php b/test/unit/Reflection/StringCast/ReflectionMethodStringCastTest.php index d8934f0e1..6378d326a 100644 --- a/test/unit/Reflection/StringCast/ReflectionMethodStringCastTest.php +++ b/test/unit/Reflection/StringCast/ReflectionMethodStringCastTest.php @@ -8,12 +8,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\StringCast\ReflectionMethodStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionMethodStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\StringCastMethods; diff --git a/test/unit/Reflection/StringCast/ReflectionParameterStringCastTest.php b/test/unit/Reflection/StringCast/ReflectionParameterStringCastTest.php index 1d044557a..4b563a835 100644 --- a/test/unit/Reflection/StringCast/ReflectionParameterStringCastTest.php +++ b/test/unit/Reflection/StringCast/ReflectionParameterStringCastTest.php @@ -7,10 +7,10 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\StringCast\ReflectionParameterStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionParameterStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\StringCastParameters; diff --git a/test/unit/Reflection/StringCast/ReflectionPropertyStringCastTest.php b/test/unit/Reflection/StringCast/ReflectionPropertyStringCastTest.php index 0b9372283..54d44d5a7 100644 --- a/test/unit/Reflection/StringCast/ReflectionPropertyStringCastTest.php +++ b/test/unit/Reflection/StringCast/ReflectionPropertyStringCastTest.php @@ -7,10 +7,10 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\StringCast\ReflectionPropertyStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionPropertyStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\StringCastProperties; diff --git a/test/unit/Reflection/StringCast/ReflectionStringCastHelperTest.php b/test/unit/Reflection/StringCast/ReflectionStringCastHelperTest.php index d7a1e3638..09e305c9f 100644 --- a/test/unit/Reflection/StringCast/ReflectionStringCastHelperTest.php +++ b/test/unit/Reflection/StringCast/ReflectionStringCastHelperTest.php @@ -6,10 +6,10 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\StringCast\ReflectionStringCastHelper; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionStringCastHelper; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(ReflectionStringCastHelper::class)] diff --git a/test/unit/Reflection/StringCast/ReflectionTypeStringCastTest.php b/test/unit/Reflection/StringCast/ReflectionTypeStringCastTest.php index 713148662..0731232c4 100644 --- a/test/unit/Reflection/StringCast/ReflectionTypeStringCastTest.php +++ b/test/unit/Reflection/StringCast/ReflectionTypeStringCastTest.php @@ -7,12 +7,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionIntersectionType; -use Roave\BetterReflection\Reflection\ReflectionNamedType; -use Roave\BetterReflection\Reflection\ReflectionUnionType; -use Roave\BetterReflection\Reflection\StringCast\ReflectionTypeStringCast; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType; +use PHPStan\BetterReflection\Reflection\ReflectionNamedType; +use PHPStan\BetterReflection\Reflection\ReflectionUnionType; +use PHPStan\BetterReflection\Reflection\StringCast\ReflectionTypeStringCast; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function assert; @@ -71,7 +71,7 @@ function k(): null|(A&B)|(A&C) {} } /** - * @param \Roave\BetterReflection\Reflection\ReflectionNamedType|\Roave\BetterReflection\Reflection\ReflectionUnionType|\Roave\BetterReflection\Reflection\ReflectionIntersectionType $type + * @param \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType $type */ #[DataProvider('toStringProvider')] public function testToString($type, string $expectedString) : void diff --git a/test/unit/Reflection/Support/AlreadyVisitedClassesTest.php b/test/unit/Reflection/Support/AlreadyVisitedClassesTest.php index a3e41f011..70674acc9 100644 --- a/test/unit/Reflection/Support/AlreadyVisitedClassesTest.php +++ b/test/unit/Reflection/Support/AlreadyVisitedClassesTest.php @@ -6,8 +6,8 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\CircularReference; -use Roave\BetterReflection\Reflection\Support\AlreadyVisitedClasses; +use PHPStan\BetterReflection\Reflection\Exception\CircularReference; +use PHPStan\BetterReflection\Reflection\Support\AlreadyVisitedClasses; #[CoversClass(AlreadyVisitedClasses::class)] class AlreadyVisitedClassesTest extends TestCase diff --git a/test/unit/Reflector/DefaultReflectorTest.php b/test/unit/Reflector/DefaultReflectorTest.php index a6688e60d..7f8741f6d 100644 --- a/test/unit/Reflector/DefaultReflectorTest.php +++ b/test/unit/Reflector/DefaultReflectorTest.php @@ -6,15 +6,15 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(DefaultReflector::class)] diff --git a/test/unit/Reflector/Exception/IdentifierNotFoundTest.php b/test/unit/Reflector/Exception/IdentifierNotFoundTest.php index 3085ee38e..cae219392 100644 --- a/test/unit/Reflector/Exception/IdentifierNotFoundTest.php +++ b/test/unit/Reflector/Exception/IdentifierNotFoundTest.php @@ -6,9 +6,9 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; #[CoversClass(IdentifierNotFound::class)] class IdentifierNotFoundTest extends TestCase diff --git a/test/unit/SourceLocator/Ast/Exception/ParseToAstFailureTest.php b/test/unit/SourceLocator/Ast/Exception/ParseToAstFailureTest.php index 73662db3c..d86dfd826 100644 --- a/test/unit/SourceLocator/Ast/Exception/ParseToAstFailureTest.php +++ b/test/unit/SourceLocator/Ast/Exception/ParseToAstFailureTest.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace Roave\BetterReflection\SourceLocator\Ast\Exception; +namespace PHPStan\BetterReflection\SourceLocator\Ast\Exception; use Exception; use PhpParser\Error; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use ReflectionProperty; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; #[CoversClass(ParseToAstFailure::class)] class ParseToAstFailureTest extends TestCase diff --git a/test/unit/SourceLocator/Ast/FindReflectionsInTreeTest.php b/test/unit/SourceLocator/Ast/FindReflectionsInTreeTest.php index a657dcbef..7a3e8a658 100644 --- a/test/unit/SourceLocator/Ast/FindReflectionsInTreeTest.php +++ b/test/unit/SourceLocator/Ast/FindReflectionsInTreeTest.php @@ -9,16 +9,16 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Constraint\Callback; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\FindReflectionsInTree; -use Roave\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\FindReflectionsInTree; +use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function sprintf; diff --git a/test/unit/SourceLocator/Ast/LocatorTest.php b/test/unit/SourceLocator/Ast/LocatorTest.php index fc5c05929..ca3e2170c 100644 --- a/test/unit/SourceLocator/Ast/LocatorTest.php +++ b/test/unit/SourceLocator/Ast/LocatorTest.php @@ -6,17 +6,17 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(Locator::class)] diff --git a/test/unit/SourceLocator/Ast/Parser/MemoizingParserTest.php b/test/unit/SourceLocator/Ast/Parser/MemoizingParserTest.php index c48f6771a..da98225c0 100644 --- a/test/unit/SourceLocator/Ast/Parser/MemoizingParserTest.php +++ b/test/unit/SourceLocator/Ast/Parser/MemoizingParserTest.php @@ -11,7 +11,7 @@ use PhpParser\Token; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Ast\Parser\MemoizingParser; +use PHPStan\BetterReflection\SourceLocator\Ast\Parser\MemoizingParser; use function array_map; use function array_unique; diff --git a/test/unit/SourceLocator/Ast/Strategy/NodeToReflectionTest.php b/test/unit/SourceLocator/Ast/Strategy/NodeToReflectionTest.php index 2ee132f73..7965c5e2b 100644 --- a/test/unit/SourceLocator/Ast/Strategy/NodeToReflectionTest.php +++ b/test/unit/SourceLocator/Ast/Strategy/NodeToReflectionTest.php @@ -10,13 +10,13 @@ use PhpParser\Parser; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function reset; diff --git a/test/unit/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocatedTest.php b/test/unit/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocatedTest.php index 925cc8c9f..0c97b0759 100644 --- a/test/unit/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocatedTest.php +++ b/test/unit/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocatedTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Exception\EvaledAnonymousClassCannotBeLocated; +use PHPStan\BetterReflection\SourceLocator\Exception\EvaledAnonymousClassCannotBeLocated; #[CoversClass(EvaledAnonymousClassCannotBeLocated::class)] class EvaledAnonymousClassCannotBeLocatedTest extends TestCase diff --git a/test/unit/SourceLocator/Exception/EvaledClosureCannotBeLocatedTest.php b/test/unit/SourceLocator/Exception/EvaledClosureCannotBeLocatedTest.php index 85f5e0638..25a873ec4 100644 --- a/test/unit/SourceLocator/Exception/EvaledClosureCannotBeLocatedTest.php +++ b/test/unit/SourceLocator/Exception/EvaledClosureCannotBeLocatedTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Exception\EvaledClosureCannotBeLocated; +use PHPStan\BetterReflection\SourceLocator\Exception\EvaledClosureCannotBeLocated; #[CoversClass(EvaledClosureCannotBeLocated::class)] class EvaledClosureCannotBeLocatedTest extends TestCase diff --git a/test/unit/SourceLocator/Exception/InvalidDirectoryTest.php b/test/unit/SourceLocator/Exception/InvalidDirectoryTest.php index 4e7adab9a..7fd475cdd 100644 --- a/test/unit/SourceLocator/Exception/InvalidDirectoryTest.php +++ b/test/unit/SourceLocator/Exception/InvalidDirectoryTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Exception\InvalidDirectory; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidDirectory; use stdClass; use function sprintf; diff --git a/test/unit/SourceLocator/Exception/InvalidFileInfoTest.php b/test/unit/SourceLocator/Exception/InvalidFileInfoTest.php index 43578f500..e2d540003 100644 --- a/test/unit/SourceLocator/Exception/InvalidFileInfoTest.php +++ b/test/unit/SourceLocator/Exception/InvalidFileInfoTest.php @@ -7,7 +7,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileInfo; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileInfo; use stdClass; #[CoversClass(InvalidFileInfo::class)] diff --git a/test/unit/SourceLocator/Exception/NoAnonymousClassOnLineTest.php b/test/unit/SourceLocator/Exception/NoAnonymousClassOnLineTest.php index a97e3cc8e..5f2acc3a3 100644 --- a/test/unit/SourceLocator/Exception/NoAnonymousClassOnLineTest.php +++ b/test/unit/SourceLocator/Exception/NoAnonymousClassOnLineTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Exception\NoAnonymousClassOnLine; +use PHPStan\BetterReflection\SourceLocator\Exception\NoAnonymousClassOnLine; #[CoversClass(NoAnonymousClassOnLine::class)] class NoAnonymousClassOnLineTest extends TestCase diff --git a/test/unit/SourceLocator/Exception/NoClosureOnLineTest.php b/test/unit/SourceLocator/Exception/NoClosureOnLineTest.php index 533e375fb..e15cbeb2e 100644 --- a/test/unit/SourceLocator/Exception/NoClosureOnLineTest.php +++ b/test/unit/SourceLocator/Exception/NoClosureOnLineTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Exception\NoClosureOnLine; +use PHPStan\BetterReflection\SourceLocator\Exception\NoClosureOnLine; #[CoversClass(NoClosureOnLine::class)] class NoClosureOnLineTest extends TestCase diff --git a/test/unit/SourceLocator/Exception/TwoAnonymousClassesOnSameLineTest.php b/test/unit/SourceLocator/Exception/TwoAnonymousClassesOnSameLineTest.php index ed2ae6542..d7e6941ca 100644 --- a/test/unit/SourceLocator/Exception/TwoAnonymousClassesOnSameLineTest.php +++ b/test/unit/SourceLocator/Exception/TwoAnonymousClassesOnSameLineTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Exception\TwoAnonymousClassesOnSameLine; +use PHPStan\BetterReflection\SourceLocator\Exception\TwoAnonymousClassesOnSameLine; #[CoversClass(TwoAnonymousClassesOnSameLine::class)] class TwoAnonymousClassesOnSameLineTest extends TestCase diff --git a/test/unit/SourceLocator/Exception/TwoClosuresOnSameLineTest.php b/test/unit/SourceLocator/Exception/TwoClosuresOnSameLineTest.php index 41b6cb4e6..3599542eb 100644 --- a/test/unit/SourceLocator/Exception/TwoClosuresOnSameLineTest.php +++ b/test/unit/SourceLocator/Exception/TwoClosuresOnSameLineTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Exception\TwoClosuresOnSameLine; +use PHPStan\BetterReflection\SourceLocator\Exception\TwoClosuresOnSameLine; #[CoversClass(TwoClosuresOnSameLine::class)] class TwoClosuresOnSameLineTest extends TestCase diff --git a/test/unit/SourceLocator/FileCheckerTest.php b/test/unit/SourceLocator/FileCheckerTest.php index 5aceccf7e..a49e69b60 100644 --- a/test/unit/SourceLocator/FileCheckerTest.php +++ b/test/unit/SourceLocator/FileCheckerTest.php @@ -6,8 +6,8 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\FileChecker; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\FileChecker; use Throwable; use function chmod; diff --git a/test/unit/SourceLocator/Located/AliasLocatedSourceTest.php b/test/unit/SourceLocator/Located/AliasLocatedSourceTest.php index 419ccedc7..a791b6f68 100644 --- a/test/unit/SourceLocator/Located/AliasLocatedSourceTest.php +++ b/test/unit/SourceLocator/Located/AliasLocatedSourceTest.php @@ -6,8 +6,8 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Located\AliasLocatedSource; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\SourceLocator\Located\AliasLocatedSource; +use PHPStan\BetterReflection\Util\FileHelper; #[CoversClass(AliasLocatedSource::class)] class AliasLocatedSourceTest extends TestCase diff --git a/test/unit/SourceLocator/Located/AnonymousLocatedSourceTest.php b/test/unit/SourceLocator/Located/AnonymousLocatedSourceTest.php index 56ed00dbf..4d766097b 100644 --- a/test/unit/SourceLocator/Located/AnonymousLocatedSourceTest.php +++ b/test/unit/SourceLocator/Located/AnonymousLocatedSourceTest.php @@ -6,8 +6,8 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Located\AnonymousLocatedSource; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\SourceLocator\Located\AnonymousLocatedSource; +use PHPStan\BetterReflection\Util\FileHelper; #[CoversClass(AnonymousLocatedSource::class)] class AnonymousLocatedSourceTest extends TestCase diff --git a/test/unit/SourceLocator/Located/EvaledLocatedSourceTest.php b/test/unit/SourceLocator/Located/EvaledLocatedSourceTest.php index 4bd0417e3..2a510b11a 100644 --- a/test/unit/SourceLocator/Located/EvaledLocatedSourceTest.php +++ b/test/unit/SourceLocator/Located/EvaledLocatedSourceTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Located\EvaledLocatedSource; +use PHPStan\BetterReflection\SourceLocator\Located\EvaledLocatedSource; #[CoversClass(EvaledLocatedSource::class)] class EvaledLocatedSourceTest extends TestCase diff --git a/test/unit/SourceLocator/Located/InternalLocatedSourceTest.php b/test/unit/SourceLocator/Located/InternalLocatedSourceTest.php index a4123e475..f1f1b7ec8 100644 --- a/test/unit/SourceLocator/Located/InternalLocatedSourceTest.php +++ b/test/unit/SourceLocator/Located/InternalLocatedSourceTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Located\InternalLocatedSource; +use PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource; #[CoversClass(InternalLocatedSource::class)] class InternalLocatedSourceTest extends TestCase diff --git a/test/unit/SourceLocator/Located/LocatedSourceTest.php b/test/unit/SourceLocator/Located/LocatedSourceTest.php index fd05e3ba8..75a5d9e75 100644 --- a/test/unit/SourceLocator/Located/LocatedSourceTest.php +++ b/test/unit/SourceLocator/Located/LocatedSourceTest.php @@ -6,8 +6,8 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\Util\FileHelper; #[CoversClass(LocatedSource::class)] class LocatedSourceTest extends TestCase diff --git a/test/unit/SourceLocator/SourceStubber/AggregateSourceStubberTest.php b/test/unit/SourceLocator/SourceStubber/AggregateSourceStubberTest.php index 4d5b218dd..72593b8b2 100644 --- a/test/unit/SourceLocator/SourceStubber/AggregateSourceStubberTest.php +++ b/test/unit/SourceLocator/SourceStubber/AggregateSourceStubberTest.php @@ -6,9 +6,9 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\SourceStubber\AggregateSourceStubber; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\SourceStubber\StubData; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\AggregateSourceStubber; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData; #[CoversClass(AggregateSourceStubber::class)] class AggregateSourceStubberTest extends TestCase diff --git a/test/unit/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubsTest.php b/test/unit/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubsTest.php index d80d33ad2..efe7d2666 100644 --- a/test/unit/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubsTest.php +++ b/test/unit/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubsTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\SourceStubber\Exception\CouldNotFindPhpStormStubs; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\Exception\CouldNotFindPhpStormStubs; #[CoversClass(CouldNotFindPhpStormStubs::class)] class CouldNotFindPhpStormStubsTest extends TestCase diff --git a/test/unit/SourceLocator/SourceStubber/PhpStormStubsSourceStubberTest.php b/test/unit/SourceLocator/SourceStubber/PhpStormStubsSourceStubberTest.php index b5d52681f..4c7b970b4 100644 --- a/test/unit/SourceLocator/SourceStubber/PhpStormStubsSourceStubberTest.php +++ b/test/unit/SourceLocator/SourceStubber/PhpStormStubsSourceStubberTest.php @@ -27,22 +27,22 @@ use ReflectionNamedType as CoreReflectionNamedType; use ReflectionParameter as CoreReflectionParameter; use ReflectionProperty as CoreReflectionProperty; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflection\ReflectionProperty; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\SourceStubber\PhpStormStubs\CachingVisitor; -use Roave\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber; -use Roave\BetterReflection\SourceLocator\SourceStubber\StubData; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflection\ReflectionProperty; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubs\CachingVisitor; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use SplFileObject; use Stringable; diff --git a/test/unit/SourceLocator/SourceStubber/ReflectionSourceStubberTest.php b/test/unit/SourceLocator/SourceStubber/ReflectionSourceStubberTest.php index 08ae3fbd2..04cd6c090 100644 --- a/test/unit/SourceLocator/SourceStubber/ReflectionSourceStubberTest.php +++ b/test/unit/SourceLocator/SourceStubber/ReflectionSourceStubberTest.php @@ -15,16 +15,16 @@ use ReflectionFunction as CoreReflectionFunction; use ReflectionMethod as CoreReflectionMethod; use ReflectionParameter as CoreReflectionParameter; -use Roave\BetterReflection\Reflection\Adapter\ReflectionType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionEnum; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Reflection\ReflectionParameter; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionEnum; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Reflection\ReflectionParameter; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\ClassWithAttributesForSourceStubber; use Roave\BetterReflectionTest\Fixture\ClassWithAttributesWithArgumentsForSourceStubber; @@ -268,7 +268,7 @@ private function assertSameInterfaces(CoreReflectionClass $original, ReflectionC /** * @param CoreReflectionClass|CoreReflectionEnum $original - * @param \Roave\BetterReflection\Reflection\ReflectionClass|\Roave\BetterReflection\Reflection\ReflectionEnum $stubbed + * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionEnum $stubbed */ private function assertSameClassAttributes($original, $stubbed): void { diff --git a/test/unit/SourceLocator/SourceStubber/StubDataTest.php b/test/unit/SourceLocator/SourceStubber/StubDataTest.php index 7b547528b..a82690354 100644 --- a/test/unit/SourceLocator/SourceStubber/StubDataTest.php +++ b/test/unit/SourceLocator/SourceStubber/StubDataTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\SourceStubber\StubData; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData; #[CoversClass(StubData::class)] class StubDataTest extends TestCase diff --git a/test/unit/SourceLocator/Type/AbstractSourceLocatorTest.php b/test/unit/SourceLocator/Type/AbstractSourceLocatorTest.php index a7a913ae0..14b10dfef 100644 --- a/test/unit/SourceLocator/Type/AbstractSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/AbstractSourceLocatorTest.php @@ -6,14 +6,14 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator as AstLocator; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\Type\AbstractSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator as AstLocator; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\Type\AbstractSourceLocator; #[CoversClass(AbstractSourceLocator::class)] class AbstractSourceLocatorTest extends TestCase diff --git a/test/unit/SourceLocator/Type/AggregateSourceLocatorTest.php b/test/unit/SourceLocator/Type/AggregateSourceLocatorTest.php index c9c126a2d..8c831b74c 100644 --- a/test/unit/SourceLocator/Type/AggregateSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/AggregateSourceLocatorTest.php @@ -7,14 +7,14 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(AggregateSourceLocator::class)] @@ -30,7 +30,7 @@ protected function setUp(): void } /** - * @return \Roave\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject + * @return \PHPStan\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject */ private function getMockReflector() { diff --git a/test/unit/SourceLocator/Type/AnonymousClassObjectSourceLocatorTest.php b/test/unit/SourceLocator/Type/AnonymousClassObjectSourceLocatorTest.php index cf5719842..307066fbe 100644 --- a/test/unit/SourceLocator/Type/AnonymousClassObjectSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/AnonymousClassObjectSourceLocatorTest.php @@ -9,17 +9,17 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Exception\EvaledAnonymousClassCannotBeLocated; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\Exception\NoAnonymousClassOnLine; -use Roave\BetterReflection\SourceLocator\Exception\TwoAnonymousClassesOnSameLine; -use Roave\BetterReflection\SourceLocator\Type\AnonymousClassObjectSourceLocator; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Exception\EvaledAnonymousClassCannotBeLocated; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\Exception\NoAnonymousClassOnLine; +use PHPStan\BetterReflection\SourceLocator\Exception\TwoAnonymousClassesOnSameLine; +use PHPStan\BetterReflection\SourceLocator\Type\AnonymousClassObjectSourceLocator; +use PHPStan\BetterReflection\Util\FileHelper; use Roave\BetterReflectionTest\BetterReflectionSingleton; use stdClass; diff --git a/test/unit/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapperTest.php b/test/unit/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapperTest.php index 259f14eb4..d52e97c54 100644 --- a/test/unit/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapperTest.php +++ b/test/unit/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapperTest.php @@ -8,7 +8,7 @@ use LogicException; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Type\AutoloadSourceLocator\FileReadTrapStreamWrapper; +use PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator\FileReadTrapStreamWrapper; use Throwable; use UnexpectedValueException; diff --git a/test/unit/SourceLocator/Type/AutoloadSourceLocatorTest.php b/test/unit/SourceLocator/Type/AutoloadSourceLocatorTest.php index dba1c009b..f1096cebe 100644 --- a/test/unit/SourceLocator/Type/AutoloadSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/AutoloadSourceLocatorTest.php @@ -12,16 +12,16 @@ use PHPUnit\Framework\TestCase; use ReflectionClass; use ReflectionObject; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Located\AliasLocatedSource; -use Roave\BetterReflection\SourceLocator\Located\LocatedSource; -use Roave\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Located\AliasLocatedSource; +use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource; +use PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use Roave\BetterReflectionTest\Fixture\AutoloadableAlias; use Roave\BetterReflectionTest\Fixture\AutoloadableByAlias; @@ -65,7 +65,7 @@ protected function setUp(): void } /** - * @return (\PHPUnit\Framework\MockObject\MockObject & \Roave\BetterReflection\Reflector\Reflector) + * @return (\PHPUnit\Framework\MockObject\MockObject & \PHPStan\BetterReflection\Reflector\Reflector) */ private function getMockReflector() { diff --git a/test/unit/SourceLocator/Type/AutoloadSourceLocatorWithoutLoadedParserDependenciesTest.php b/test/unit/SourceLocator/Type/AutoloadSourceLocatorWithoutLoadedParserDependenciesTest.php index fce029a60..e4dae2ee9 100644 --- a/test/unit/SourceLocator/Type/AutoloadSourceLocatorWithoutLoadedParserDependenciesTest.php +++ b/test/unit/SourceLocator/Type/AutoloadSourceLocatorWithoutLoadedParserDependenciesTest.php @@ -9,10 +9,10 @@ use PHPUnit\Framework\Attributes\PreserveGlobalState; use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Ast\Parser\MemoizingParser; -use Roave\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Ast\Parser\MemoizingParser; +use PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator; use Roave\BetterReflectionTest\Fixture\ExampleClass; use function class_exists; diff --git a/test/unit/SourceLocator/Type/ClosureSourceLocatorTest.php b/test/unit/SourceLocator/Type/ClosureSourceLocatorTest.php index f1b24532a..19d5c2470 100644 --- a/test/unit/SourceLocator/Type/ClosureSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/ClosureSourceLocatorTest.php @@ -11,17 +11,17 @@ use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; use ReflectionFunction as CoreReflectionFunction; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Exception\EvaledClosureCannotBeLocated; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\Exception\NoClosureOnLine; -use Roave\BetterReflection\SourceLocator\Exception\TwoClosuresOnSameLine; -use Roave\BetterReflection\SourceLocator\Type\ClosureSourceLocator; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Exception\EvaledClosureCannotBeLocated; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\Exception\NoClosureOnLine; +use PHPStan\BetterReflection\SourceLocator\Exception\TwoClosuresOnSameLine; +use PHPStan\BetterReflection\SourceLocator\Type\ClosureSourceLocator; +use PHPStan\BetterReflection\Util\FileHelper; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function assert; diff --git a/test/unit/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJsonTest.php b/test/unit/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJsonTest.php index 8a3d2bb49..418c79b84 100644 --- a/test/unit/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJsonTest.php +++ b/test/unit/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJsonTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\FailedToParseJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\FailedToParseJson; #[CoversClass(FailedToParseJson::class)] class FailedToParseJsonTest extends TestCase diff --git a/test/unit/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectoryTest.php b/test/unit/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectoryTest.php index 84224d9d5..7449ba05a 100644 --- a/test/unit/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectoryTest.php +++ b/test/unit/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectoryTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; #[CoversClass(InvalidProjectDirectory::class)] class InvalidProjectDirectoryTest extends TestCase diff --git a/test/unit/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJsonTest.php b/test/unit/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJsonTest.php index be541f836..4f1728b3b 100644 --- a/test/unit/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJsonTest.php +++ b/test/unit/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJsonTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; #[CoversClass(MissingComposerJson::class)] class MissingComposerJsonTest extends TestCase diff --git a/test/unit/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJsonTest.php b/test/unit/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJsonTest.php index cf7f62a92..3cb8374e5 100644 --- a/test/unit/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJsonTest.php +++ b/test/unit/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJsonTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson; #[CoversClass(MissingInstalledJson::class)] class MissingInstalledJsonTest extends TestCase diff --git a/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerInstalledJsonTest.php b/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerInstalledJsonTest.php index 2b39ff778..689def111 100644 --- a/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerInstalledJsonTest.php +++ b/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerInstalledJsonTest.php @@ -8,17 +8,17 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForInstalledJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; -use Roave\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForInstalledJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; +use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function array_column; diff --git a/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJsonTest.php b/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJsonTest.php index f660ce098..84e2e8fba 100644 --- a/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJsonTest.php +++ b/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJsonTest.php @@ -8,17 +8,17 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForComposerJsonAndInstalledJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; -use Roave\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForComposerJsonAndInstalledJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; +use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function array_column; diff --git a/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonTest.php b/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonTest.php index 61326c84e..8bc89772d 100644 --- a/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonTest.php +++ b/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonTest.php @@ -8,16 +8,16 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForComposerJson; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; -use Roave\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForComposerJson; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; +use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function array_column; diff --git a/test/unit/SourceLocator/Type/Composer/Psr/Excetion/InvalidPrefixMappingTest.php b/test/unit/SourceLocator/Type/Composer/Psr/Excetion/InvalidPrefixMappingTest.php index 14cefc59e..4de0bc7f1 100644 --- a/test/unit/SourceLocator/Type/Composer/Psr/Excetion/InvalidPrefixMappingTest.php +++ b/test/unit/SourceLocator/Type/Composer/Psr/Excetion/InvalidPrefixMappingTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Exception\InvalidPrefixMapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Exception\InvalidPrefixMapping; #[CoversClass(InvalidPrefixMapping::class)] final class InvalidPrefixMappingTest extends TestCase diff --git a/test/unit/SourceLocator/Type/Composer/Psr/Psr0MappingTest.php b/test/unit/SourceLocator/Type/Composer/Psr/Psr0MappingTest.php index 711bc74cc..ee037ae5e 100644 --- a/test/unit/SourceLocator/Type/Composer/Psr/Psr0MappingTest.php +++ b/test/unit/SourceLocator/Type/Composer/Psr/Psr0MappingTest.php @@ -7,9 +7,9 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping; #[CoversClass(Psr0Mapping::class)] class Psr0MappingTest extends TestCase diff --git a/test/unit/SourceLocator/Type/Composer/Psr/Psr4MappingTest.php b/test/unit/SourceLocator/Type/Composer/Psr/Psr4MappingTest.php index 087ad1f42..7fbfa8f68 100644 --- a/test/unit/SourceLocator/Type/Composer/Psr/Psr4MappingTest.php +++ b/test/unit/SourceLocator/Type/Composer/Psr/Psr4MappingTest.php @@ -7,9 +7,9 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; #[CoversClass(Psr4Mapping::class)] class Psr4MappingTest extends TestCase diff --git a/test/unit/SourceLocator/Type/Composer/PsrAutoloaderLocatorTest.php b/test/unit/SourceLocator/Type/Composer/PsrAutoloaderLocatorTest.php index 1885e1507..749c24a8d 100644 --- a/test/unit/SourceLocator/Type/Composer/PsrAutoloaderLocatorTest.php +++ b/test/unit/SourceLocator/Type/Composer/PsrAutoloaderLocatorTest.php @@ -7,14 +7,14 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping; -use Roave\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping; +use PHPStan\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator; use Roave\BetterReflectionTest\Assets\DirectoryScannerAssets\Bar\FooBar; use Roave\BetterReflectionTest\Assets\DirectoryScannerAssets\Foo; use Roave\BetterReflectionTest\Assets\DirectoryScannerAssetsFoo\Bar\FooBar as FooBar1; diff --git a/test/unit/SourceLocator/Type/ComposerSourceLocatorTest.php b/test/unit/SourceLocator/Type/ComposerSourceLocatorTest.php index 5935438f7..beab7fd4c 100644 --- a/test/unit/SourceLocator/Type/ComposerSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/ComposerSourceLocatorTest.php @@ -9,11 +9,11 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\ComposerSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\ComposerSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(ComposerSourceLocator::class)] @@ -29,7 +29,7 @@ protected function setUp(): void } /** - * @return \Roave\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject + * @return \PHPStan\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject */ private function getMockReflector() { diff --git a/test/unit/SourceLocator/Type/DirectoriesSourceLocatorTest.php b/test/unit/SourceLocator/Type/DirectoriesSourceLocatorTest.php index 934832c19..05777b7e9 100644 --- a/test/unit/SourceLocator/Type/DirectoriesSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/DirectoriesSourceLocatorTest.php @@ -7,12 +7,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Exception\InvalidDirectory; -use Roave\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidDirectory; +use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator; use Roave\BetterReflectionTest\Assets\DirectoryScannerAssets; use Roave\BetterReflectionTest\Assets\DirectoryScannerAssetsFoo; use Roave\BetterReflectionTest\BetterReflectionSingleton; diff --git a/test/unit/SourceLocator/Type/EvaledCodeSourceLocatorTest.php b/test/unit/SourceLocator/Type/EvaledCodeSourceLocatorTest.php index 14d8da16c..e0ae79156 100644 --- a/test/unit/SourceLocator/Type/EvaledCodeSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/EvaledCodeSourceLocatorTest.php @@ -8,15 +8,15 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Located\EvaledLocatedSource; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\Type\EvaledCodeSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Located\EvaledLocatedSource; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\Type\EvaledCodeSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function sprintf; @@ -40,7 +40,7 @@ protected function setUp(): void } /** - * @return \Roave\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject + * @return \PHPStan\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject */ private function getMockReflector() { diff --git a/test/unit/SourceLocator/Type/FileIteratorSourceLocatorTest.php b/test/unit/SourceLocator/Type/FileIteratorSourceLocatorTest.php index a13ab201b..79468277a 100644 --- a/test/unit/SourceLocator/Type/FileIteratorSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/FileIteratorSourceLocatorTest.php @@ -9,12 +9,12 @@ use PHPUnit\Framework\TestCase; use RecursiveDirectoryIterator; use RecursiveIteratorIterator; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflector\DefaultReflector; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileInfo; -use Roave\BetterReflection\SourceLocator\Type\FileIteratorSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflector\DefaultReflector; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileInfo; +use PHPStan\BetterReflection\SourceLocator\Type\FileIteratorSourceLocator; use Roave\BetterReflectionTest\Assets\DirectoryScannerAssets; use Roave\BetterReflectionTest\BetterReflectionSingleton; use stdClass; diff --git a/test/unit/SourceLocator/Type/MemoizingSourceLocatorTest.php b/test/unit/SourceLocator/Type/MemoizingSourceLocatorTest.php index fe5b89a32..dcc2c1980 100644 --- a/test/unit/SourceLocator/Type/MemoizingSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/MemoizingSourceLocatorTest.php @@ -7,12 +7,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\Reflection; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Type\MemoizingSourceLocator; -use Roave\BetterReflection\SourceLocator\Type\SourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\Reflection; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator; +use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator; use function array_filter; use function array_map; @@ -29,17 +29,17 @@ class MemoizingSourceLocatorTest extends TestCase { /** - * @var \Roave\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject + * @var \PHPStan\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject */ private $reflector1; /** - * @var \Roave\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject + * @var \PHPStan\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject */ private $reflector2; /** - * @var \Roave\BetterReflection\SourceLocator\Type\SourceLocator|\PHPUnit\Framework\MockObject\MockObject + * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator|\PHPUnit\Framework\MockObject\MockObject */ private $wrappedLocator; @@ -181,7 +181,7 @@ private function assertMemoization(array $identifiers, int $expectedFetchOperati self::logicalOr(...$reflectors), self::callback(static fn (Identifier $identifier): bool => in_array($identifier, $identifiers, true)), ) - ->willReturnCallback(function (Reflector $reflector, Identifier $identifier) use (&$fetchedSymbolsCount) : ?\Roave\BetterReflection\Reflection\Reflection { + ->willReturnCallback(function (Reflector $reflector, Identifier $identifier) use (&$fetchedSymbolsCount) : ?\PHPStan\BetterReflection\Reflection\Reflection { $identifierId = spl_object_id($identifier); $reflectorId = spl_object_id($reflector); $hash = $reflectorId . $identifierId; diff --git a/test/unit/SourceLocator/Type/PhpInternalSourceLocatorTest.php b/test/unit/SourceLocator/Type/PhpInternalSourceLocatorTest.php index 8898d5b02..6a8624c8e 100644 --- a/test/unit/SourceLocator/Type/PhpInternalSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/PhpInternalSourceLocatorTest.php @@ -10,16 +10,16 @@ use PHPUnit\Framework\TestCase; use ReflectionClass as CoreReflectionClass; use ReflectionException; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Located\InternalLocatedSource; -use Roave\BetterReflection\SourceLocator\SourceStubber\SourceStubber; -use Roave\BetterReflection\SourceLocator\SourceStubber\StubData; -use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber; +use PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData; +use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; use function array_filter; @@ -54,7 +54,7 @@ protected function setUp(): void } /** - * @return \Roave\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject + * @return \PHPStan\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject */ private function getMockReflector() { diff --git a/test/unit/SourceLocator/Type/SingleFileSourceLocatorTest.php b/test/unit/SourceLocator/Type/SingleFileSourceLocatorTest.php index 50c6959b7..55e354e4a 100644 --- a/test/unit/SourceLocator/Type/SingleFileSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/SingleFileSourceLocatorTest.php @@ -7,12 +7,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Exception\InvalidFileLocation; -use Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation; +use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(SingleFileSourceLocator::class)] @@ -28,7 +28,7 @@ protected function setUp(): void } /** - * @return \Roave\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject + * @return \PHPStan\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject */ private function getMockReflector() { diff --git a/test/unit/SourceLocator/Type/StringSourceLocatorTest.php b/test/unit/SourceLocator/Type/StringSourceLocatorTest.php index dd9f173fd..5970eba13 100644 --- a/test/unit/SourceLocator/Type/StringSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/StringSourceLocatorTest.php @@ -7,11 +7,11 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Identifier\Identifier; -use Roave\BetterReflection\Identifier\IdentifierType; -use Roave\BetterReflection\Reflector\Reflector; -use Roave\BetterReflection\SourceLocator\Ast\Locator; -use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; +use PHPStan\BetterReflection\Identifier\Identifier; +use PHPStan\BetterReflection\Identifier\IdentifierType; +use PHPStan\BetterReflection\Reflector\Reflector; +use PHPStan\BetterReflection\SourceLocator\Ast\Locator; +use PHPStan\BetterReflection\SourceLocator\Type\StringSourceLocator; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(StringSourceLocator::class)] @@ -27,7 +27,7 @@ protected function setUp(): void } /** - * @return \Roave\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject + * @return \PHPStan\BetterReflection\Reflector\Reflector|\PHPUnit\Framework\MockObject\MockObject */ private function getMockReflector() { diff --git a/test/unit/Util/CalculateReflectionColumnTest.php b/test/unit/Util/CalculateReflectionColumnTest.php index e1b0c6e5b..319e98c64 100644 --- a/test/unit/Util/CalculateReflectionColumnTest.php +++ b/test/unit/Util/CalculateReflectionColumnTest.php @@ -7,7 +7,7 @@ use PhpParser\Node; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Util\CalculateReflectionColumn; +use PHPStan\BetterReflection\Util\CalculateReflectionColumn; #[CoversClass(CalculateReflectionColumn::class)] class CalculateReflectionColumnTest extends TestCase diff --git a/test/unit/Util/ClassExistenceCheckerTest.php b/test/unit/Util/ClassExistenceCheckerTest.php index 66a333776..93e96a750 100644 --- a/test/unit/Util/ClassExistenceCheckerTest.php +++ b/test/unit/Util/ClassExistenceCheckerTest.php @@ -9,7 +9,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Util\ClassExistenceChecker; +use PHPStan\BetterReflection\Util\ClassExistenceChecker; use Roave\BetterReflectionTest\Fixture\ExampleClass; use Roave\BetterReflectionTest\Fixture\ExampleInterface; use Roave\BetterReflectionTest\Fixture\ExampleTrait; diff --git a/test/unit/Util/ConstantNodeCheckerTest.php b/test/unit/Util/ConstantNodeCheckerTest.php index 6d5c7b46f..667064030 100644 --- a/test/unit/Util/ConstantNodeCheckerTest.php +++ b/test/unit/Util/ConstantNodeCheckerTest.php @@ -8,8 +8,8 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\Exception\InvalidConstantNode; -use Roave\BetterReflection\Util\ConstantNodeChecker; +use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode; +use PHPStan\BetterReflection\Util\ConstantNodeChecker; #[CoversClass(ConstantNodeChecker::class)] class ConstantNodeCheckerTest extends TestCase diff --git a/test/unit/Util/Exception/InvalidNodePositionTest.php b/test/unit/Util/Exception/InvalidNodePositionTest.php index b43aab17d..df1b228c5 100644 --- a/test/unit/Util/Exception/InvalidNodePositionTest.php +++ b/test/unit/Util/Exception/InvalidNodePositionTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Util\Exception\InvalidNodePosition; +use PHPStan\BetterReflection\Util\Exception\InvalidNodePosition; #[CoversClass(InvalidNodePosition::class)] class InvalidNodePositionTest extends TestCase diff --git a/test/unit/Util/Exception/NoNodePositionTest.php b/test/unit/Util/Exception/NoNodePositionTest.php index dbc5d180c..1121d004c 100644 --- a/test/unit/Util/Exception/NoNodePositionTest.php +++ b/test/unit/Util/Exception/NoNodePositionTest.php @@ -8,7 +8,7 @@ use PhpParser\Node\Scalar\LNumber; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Util\Exception\NoNodePosition; +use PHPStan\BetterReflection\Util\Exception\NoNodePosition; use function sprintf; diff --git a/test/unit/Util/FileHelperTest.php b/test/unit/Util/FileHelperTest.php index c6dd8f6fc..0bf730363 100644 --- a/test/unit/Util/FileHelperTest.php +++ b/test/unit/Util/FileHelperTest.php @@ -9,7 +9,7 @@ use PHPUnit\Framework\Attributes\RequiresOperatingSystem; use PHPUnit\Framework\Attributes\RequiresOperatingSystemFamily; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Util\FileHelper; +use PHPStan\BetterReflection\Util\FileHelper; #[CoversClass(FileHelper::class)] class FileHelperTest extends TestCase diff --git a/test/unit/Util/FindReflectionOnLineTest.php b/test/unit/Util/FindReflectionOnLineTest.php index c28f2dad5..e1a1315ad 100644 --- a/test/unit/Util/FindReflectionOnLineTest.php +++ b/test/unit/Util/FindReflectionOnLineTest.php @@ -6,11 +6,11 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionConstant; -use Roave\BetterReflection\Reflection\ReflectionFunction; -use Roave\BetterReflection\Reflection\ReflectionMethod; -use Roave\BetterReflection\Util\FindReflectionOnLine; +use PHPStan\BetterReflection\Reflection\ReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionConstant; +use PHPStan\BetterReflection\Reflection\ReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionMethod; +use PHPStan\BetterReflection\Util\FindReflectionOnLine; use Roave\BetterReflectionTest\BetterReflectionSingleton; #[CoversClass(FindReflectionOnLine::class)] diff --git a/test/unit/Util/GetLastDocCommentTest.php b/test/unit/Util/GetLastDocCommentTest.php index 64efd0a6a..2612405ec 100644 --- a/test/unit/Util/GetLastDocCommentTest.php +++ b/test/unit/Util/GetLastDocCommentTest.php @@ -9,7 +9,7 @@ use PhpParser\Node\Stmt\Function_; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -use Roave\BetterReflection\Util\GetLastDocComment; +use PHPStan\BetterReflection\Util\GetLastDocComment; #[CoversClass(GetLastDocComment::class)] class GetLastDocCommentTest extends TestCase