Skip to content

Commit

Permalink
[GENERATED] Renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 10, 2024
1 parent f30c8e0 commit 00d3413
Show file tree
Hide file tree
Showing 277 changed files with 1,604 additions and 1,604 deletions.
2 changes: 1 addition & 1 deletion demo/basic-reflection/example1.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions demo/basic-reflection/example2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
8 changes: 4 additions & 4 deletions demo/basic-reflection/example3.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down
6 changes: 3 additions & 3 deletions demo/parsing-whole-directory/example1.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];

Expand Down
10 changes: 5 additions & 5 deletions demo/parsing-whole-directory/example2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];

Expand Down
44 changes: 22 additions & 22 deletions src/BetterReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -32,22 +32,22 @@ final class BetterReflection
public static $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;

Expand All @@ -67,17 +67,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;

Expand Down
2 changes: 1 addition & 1 deletion src/Identifier/Exception/InvalidIdentifierName.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Roave\BetterReflection\Identifier\Exception;
namespace PHPStan\BetterReflection\Identifier\Exception;

use InvalidArgumentException;

Expand Down
10 changes: 5 additions & 5 deletions src/Identifier/Identifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,7 +23,7 @@ class Identifier
*/
private $name;
/**
* @var \Roave\BetterReflection\Identifier\IdentifierType
* @var \PHPStan\BetterReflection\Identifier\IdentifierType
*/
private $type;

Expand Down
8 changes: 4 additions & 4 deletions src/Identifier/IdentifierType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/NodeCompiler/CompileNodeToValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

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\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionClassConstant;
use PHPStan\BetterReflection\Reflection\ReflectionEnum;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;

use function array_map;
use function assert;
Expand Down
2 changes: 1 addition & 1 deletion src/NodeCompiler/CompiledValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Roave\BetterReflection\NodeCompiler;
namespace PHPStan\BetterReflection\NodeCompiler;

/** @internal */
class CompiledValue
Expand Down
34 changes: 17 additions & 17 deletions src/NodeCompiler/CompilerContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@

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
{
/**
* @var \Roave\BetterReflection\Reflector\Reflector
* @var \PHPStan\BetterReflection\Reflector\Reflector
*/
private $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)
{
Expand Down Expand Up @@ -74,7 +74,7 @@ public function getNamespace(): ?string
return (($getClass = $this->getClass()) ? $getClass->getNamespaceName() : null) ?? (($getFunction = $this->getFunction()) ? $getFunction->getNamespaceName() : null);
}

public function getClass(): ?\Roave\BetterReflection\Reflection\ReflectionClass
public function getClass(): ?\PHPStan\BetterReflection\Reflection\ReflectionClass
{
if ($this->contextReflection instanceof ReflectionClass) {
return $this->contextReflection;
Expand All @@ -100,7 +100,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()
{
Expand Down
8 changes: 4 additions & 4 deletions src/NodeCompiler/Exception/UnableToCompileNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Reflection/Adapter/Exception/NotImplemented.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Roave\BetterReflection\Reflection\Adapter\Exception;
namespace PHPStan\BetterReflection\Reflection\Adapter\Exception;

use LogicException;

Expand Down
4 changes: 2 additions & 2 deletions src/Reflection/Adapter/FakeReflectionAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/Reflection/Adapter/ReflectionAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace Roave\BetterReflection\Reflection\Adapter;
namespace PHPStan\BetterReflection\Reflection\Adapter;

use Attribute;
use PhpParser\Node\Expr;
use ReflectionAttribute as CoreReflectionAttribute;
use Roave\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;

/** @template-extends CoreReflectionAttribute<object> */
final class ReflectionAttribute extends CoreReflectionAttribute
Expand Down
6 changes: 3 additions & 3 deletions src/Reflection/Adapter/ReflectionAttributeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Loading

0 comments on commit 00d3413

Please sign in to comment.