Skip to content

Commit

Permalink
[GENERATED] Renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Dec 20, 2024
1 parent 8172e0d commit 11abb6b
Show file tree
Hide file tree
Showing 280 changed files with 1,522 additions and 1,522 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 @@ -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;

Expand All @@ -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;

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
8 changes: 4 additions & 4 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 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
12 changes: 6 additions & 6 deletions src/NodeCompiler/CompileNodeToValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
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
32 changes: 16 additions & 16 deletions src/NodeCompiler/CompilerContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand All @@ -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()
{
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
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;

class NotImplementedBecauseItTriggersAutoloading extends NotImplemented
{
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,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;

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 11abb6b

Please sign in to comment.