mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-27 13:13:31 +00:00
Updated Rector to commit aa1fb8fdef
aa1fb8fdef
Bump to Sypmlify 10.1 (#1852)
This commit is contained in:
parent
d60e65b877
commit
cc86b38d98
|
@ -3,7 +3,7 @@
|
|||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\Contract;
|
||||
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface;
|
||||
interface BasePhpDocNodeVisitorInterface extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\Contract\PhpDocNodeVisitorInterface;
|
||||
interface BasePhpDocNodeVisitorInterface extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\Contract\PhpDocNodeVisitorInterface
|
||||
{
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
|||
use Rector\ChangesReporting\Collector\RectorChangeCollector;
|
||||
use Rector\Core\Configuration\CurrentNodeProvider;
|
||||
use Rector\StaticTypeMapper\StaticTypeMapper;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
/**
|
||||
* @template TNode as \PHPStan\PhpDocParser\Ast\Node
|
||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocInfo\PhpDocInfo\PhpDocInfoTest
|
||||
|
@ -296,7 +296,7 @@ final class PhpDocInfo
|
|||
*/
|
||||
public function removeByType(string $typeToRemove) : void
|
||||
{
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser->traverseWithCallable($this->phpDocNode, '', function (\PHPStan\PhpDocParser\Ast\Node $node) use($typeToRemove) : ?int {
|
||||
if ($node instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode && \is_a($node->value, $typeToRemove, \true)) {
|
||||
if (\strncmp($node->name, '@psalm-', \strlen('@psalm-')) === 0) {
|
||||
|
@ -306,13 +306,13 @@ final class PhpDocInfo
|
|||
return null;
|
||||
}
|
||||
$this->markAsChanged();
|
||||
return \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
return \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
}
|
||||
if (!\is_a($node, $typeToRemove, \true)) {
|
||||
return null;
|
||||
}
|
||||
$this->markAsChanged();
|
||||
return \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
return \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
});
|
||||
}
|
||||
/**
|
||||
|
@ -423,7 +423,7 @@ final class PhpDocInfo
|
|||
return \true;
|
||||
}
|
||||
// has a single node with missing start_end
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$changedPhpDocNodeVisitor = new \Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor();
|
||||
$phpDocNodeTraverser->addPhpDocNodeVisitor($changedPhpDocNodeVisitor);
|
||||
$phpDocNodeTraverser->traverse($this->phpDocNode);
|
||||
|
|
|
@ -7,7 +7,7 @@ use PHPStan\PhpDocParser\Ast\Node;
|
|||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
final class PhpDocTagRemover
|
||||
{
|
||||
public function removeByName(\Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo $phpDocInfo, string $name) : void
|
||||
|
@ -33,17 +33,17 @@ final class PhpDocTagRemover
|
|||
public function removeTagValueFromNode(\Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo $phpDocInfo, \PHPStan\PhpDocParser\Ast\Node $desiredNode) : void
|
||||
{
|
||||
$phpDocNode = $phpDocInfo->getPhpDocNode();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser->traverseWithCallable($phpDocNode, '', function ($node) use($desiredNode, $phpDocInfo) : ?int {
|
||||
if ($node instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode && $node->value === $desiredNode) {
|
||||
$phpDocInfo->markAsChanged();
|
||||
return \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
return \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
}
|
||||
if ($node !== $desiredNode) {
|
||||
return null;
|
||||
}
|
||||
$phpDocInfo->markAsChanged();
|
||||
return \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
return \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
});
|
||||
}
|
||||
private function areAnnotationNamesEqual(string $firstAnnotationName, string $secondAnnotationName) : bool
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Rector\BetterPhpDocParser\PhpDocNodeFinder;
|
|||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
/**
|
||||
* @template TNode as \PHPStan\PhpDocParser\Ast\Node
|
||||
*/
|
||||
|
@ -18,7 +18,7 @@ final class PhpDocNodeByTypeFinder
|
|||
*/
|
||||
public function findByType(\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode $phpDocNode, string $desiredType) : array
|
||||
{
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$foundNodes = [];
|
||||
$phpDocNodeTraverser->traverseWithCallable($phpDocNode, '', function ($node) use(&$foundNodes, $desiredType) : Node {
|
||||
if (!\is_a($node, $desiredType, \true)) {
|
||||
|
|
|
@ -7,9 +7,9 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
|||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||
use Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor;
|
||||
/**
|
||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocNodeMapperTest
|
||||
*/
|
||||
|
@ -22,12 +22,12 @@ final class PhpDocNodeMapper
|
|||
private $currentTokenIteratorProvider;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor
|
||||
* @var \Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor
|
||||
*/
|
||||
private $parentConnectingPhpDocNodeVisitor;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor
|
||||
* @var \Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor
|
||||
*/
|
||||
private $cloningPhpDocNodeVisitor;
|
||||
/**
|
||||
|
@ -38,7 +38,7 @@ final class PhpDocNodeMapper
|
|||
/**
|
||||
* @param BasePhpDocNodeVisitorInterface[] $phpDocNodeVisitors
|
||||
*/
|
||||
public function __construct(\Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider $currentTokenIteratorProvider, \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor $parentConnectingPhpDocNodeVisitor, \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor $cloningPhpDocNodeVisitor, array $phpDocNodeVisitors)
|
||||
public function __construct(\Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider $currentTokenIteratorProvider, \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor $parentConnectingPhpDocNodeVisitor, \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor $cloningPhpDocNodeVisitor, array $phpDocNodeVisitors)
|
||||
{
|
||||
$this->currentTokenIteratorProvider = $currentTokenIteratorProvider;
|
||||
$this->parentConnectingPhpDocNodeVisitor = $parentConnectingPhpDocNodeVisitor;
|
||||
|
@ -48,13 +48,13 @@ final class PhpDocNodeMapper
|
|||
public function transform(\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode $phpDocNode, \Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator $betterTokenIterator) : void
|
||||
{
|
||||
$this->currentTokenIteratorProvider->setBetterTokenIterator($betterTokenIterator);
|
||||
$parentPhpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$parentPhpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$parentPhpDocNodeTraverser->addPhpDocNodeVisitor($this->parentConnectingPhpDocNodeVisitor);
|
||||
$parentPhpDocNodeTraverser->traverse($phpDocNode);
|
||||
$cloningPhpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$cloningPhpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$cloningPhpDocNodeTraverser->addPhpDocNodeVisitor($this->cloningPhpDocNodeVisitor);
|
||||
$cloningPhpDocNodeTraverser->traverse($phpDocNode);
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
foreach ($this->phpDocNodeVisitors as $phpDocNodeVisitor) {
|
||||
$phpDocNodeTraverser->addPhpDocNodeVisitor($phpDocNodeVisitor);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
|||
namespace Rector\BetterPhpDocParser\PhpDocNodeTraverser;
|
||||
|
||||
use Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
final class ChangedPhpDocNodeTraverserFactory
|
||||
{
|
||||
/**
|
||||
|
@ -16,9 +16,9 @@ final class ChangedPhpDocNodeTraverserFactory
|
|||
{
|
||||
$this->changedPhpDocNodeVisitor = $changedPhpDocNodeVisitor;
|
||||
}
|
||||
public function create() : \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser
|
||||
public function create() : \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser
|
||||
{
|
||||
$changedPhpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$changedPhpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$changedPhpDocNodeTraverser->addPhpDocNodeVisitor($this->changedPhpDocNodeVisitor);
|
||||
return $changedPhpDocNodeTraverser;
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode;
|
|||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Type\SpacingAwareArrayTypeNode;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ArrayTypePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ArrayTypePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode;
|
|||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Type\SpacingAwareCallableTypeNode;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class CallableTypePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class CallableTypePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -5,8 +5,8 @@ namespace Rector\BetterPhpDocParser\PhpDocNodeVisitor;
|
|||
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ChangedPhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ChangedPhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
|
|
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\Type\IntersectionTypeNode;
|
|||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Type\BracketsAwareIntersectionTypeNode;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class IntersectionTypeNodePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class IntersectionTypeNodePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
|||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDoc\VariadicAwareParamTagValueNode;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ParamPhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ParamPhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -14,8 +14,8 @@ use Rector\BetterPhpDocParser\ValueObject\PhpDoc\SpacingAwareTemplateTagValueNod
|
|||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class TemplatePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class TemplatePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -13,8 +13,8 @@ use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
|||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Type\BracketsAwareUnionTypeNode;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class UnionTypeNodePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class UnionTypeNodePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -22,7 +22,7 @@ use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
|||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use Rector\Core\Util\StringUtils;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
/**
|
||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocInfo\PhpDocInfoPrinter\PhpDocInfoPrinterTest
|
||||
*/
|
||||
|
@ -75,7 +75,7 @@ final class PhpDocInfoPrinter
|
|||
private $phpDocInfo;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Symplify\SimplePhpDocParser\PhpDocNodeTraverser
|
||||
* @var \Symplify\Astral\PhpDocParser\PhpDocNodeTraverser
|
||||
*/
|
||||
private $changedPhpDocNodeTraverser;
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\ValueObject;
|
||||
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey as NativePhpDocAttributeKey;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\ValueObject\PhpDocAttributeKey as NativePhpDocAttributeKey;
|
||||
final class PhpDocAttributeKey
|
||||
{
|
||||
/**
|
||||
|
@ -18,7 +18,7 @@ final class PhpDocAttributeKey
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PARENT = \RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::PARENT;
|
||||
public const PARENT = \RectorPrefix20220221\Symplify\Astral\PhpDocParser\ValueObject\PhpDocAttributeKey::PARENT;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
@ -26,5 +26,5 @@ final class PhpDocAttributeKey
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const ORIG_NODE = \RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::ORIG_NODE;
|
||||
public const ORIG_NODE = \RectorPrefix20220221\Symplify\Astral\PhpDocParser\ValueObject\PhpDocAttributeKey::ORIG_NODE;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
|||
namespace Rector\NodeTypeResolver\PhpDoc\PhpDocNodeTraverser;
|
||||
|
||||
use Rector\NodeTypeResolver\PhpDocNodeVisitor\NameImportingPhpDocNodeVisitor;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
final class ImportingPhpDocNodeTraverserFactory
|
||||
{
|
||||
/**
|
||||
|
@ -16,9 +16,9 @@ final class ImportingPhpDocNodeTraverserFactory
|
|||
{
|
||||
$this->nameImportingPhpDocNodeVisitor = $nameImportingPhpDocNodeVisitor;
|
||||
}
|
||||
public function create() : \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser
|
||||
public function create() : \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser
|
||||
{
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser->addPhpDocNodeVisitor($this->nameImportingPhpDocNodeVisitor);
|
||||
return $phpDocNodeTraverser;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
|||
namespace Rector\NodeTypeResolver\PhpDoc\PhpDocNodeTraverser;
|
||||
|
||||
use Rector\NodeTypeResolver\PhpDocNodeVisitor\ClassRenamePhpDocNodeVisitor;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
final class RenamingPhpDocNodeVisitorFactory
|
||||
{
|
||||
/**
|
||||
|
@ -16,9 +16,9 @@ final class RenamingPhpDocNodeVisitorFactory
|
|||
{
|
||||
$this->classRenamePhpDocNodeVisitor = $classRenamePhpDocNodeVisitor;
|
||||
}
|
||||
public function create() : \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser
|
||||
public function create() : \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser
|
||||
{
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser->addPhpDocNodeVisitor($this->classRenamePhpDocNodeVisitor);
|
||||
return $phpDocNodeTraverser;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
|||
namespace Rector\NodeTypeResolver\PhpDoc\PhpDocNodeTraverser;
|
||||
|
||||
use Rector\NodeTypeResolver\PhpDocNodeVisitor\UnderscoreRenamePhpDocNodeVisitor;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
final class UnderscorePhpDocNodeTraverserFactory
|
||||
{
|
||||
/**
|
||||
|
@ -16,9 +16,9 @@ final class UnderscorePhpDocNodeTraverserFactory
|
|||
{
|
||||
$this->underscoreRenamePhpDocNodeVisitor = $underscoreRenamePhpDocNodeVisitor;
|
||||
}
|
||||
public function create() : \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser
|
||||
public function create() : \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser
|
||||
{
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser->addPhpDocNodeVisitor($this->underscoreRenamePhpDocNodeVisitor);
|
||||
return $phpDocNodeTraverser;
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@ use Rector\NodeTypeResolver\ValueObject\OldToNewType;
|
|||
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
|
||||
use Rector\StaticTypeMapper\StaticTypeMapper;
|
||||
use Rector\StaticTypeMapper\ValueObject\Type\ShortenedObjectType;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ClassRenamePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ClassRenamePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
{
|
||||
/**
|
||||
* @var OldToNewType[]
|
||||
|
|
|
@ -20,10 +20,10 @@ use Rector\Core\ValueObject\Application\File;
|
|||
use Rector\PostRector\Collector\UseNodesToAddCollector;
|
||||
use Rector\StaticTypeMapper\StaticTypeMapper;
|
||||
use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
use RectorPrefix20220221\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
||||
use RectorPrefix20220221\Symplify\PackageBuilder\Reflection\ClassLikeExistenceChecker;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class NameImportingPhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
final class NameImportingPhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
{
|
||||
/**
|
||||
* @var PhpParserNode|null
|
||||
|
|
|
@ -10,8 +10,8 @@ use PHPStan\Type\ObjectType;
|
|||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use Rector\Renaming\ValueObject\PseudoNamespaceToNamespace;
|
||||
use Rector\StaticTypeMapper\StaticTypeMapper;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class UnderscoreRenamePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class UnderscoreRenamePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
{
|
||||
/**
|
||||
* @var \Rector\Renaming\ValueObject\PseudoNamespaceToNamespace|null
|
||||
|
|
|
@ -24,7 +24,7 @@ use Rector\NodeTypeResolver\Node\AttributeKey;
|
|||
use ReflectionClass;
|
||||
use RectorPrefix20220221\Symfony\Contracts\Service\Attribute\Required;
|
||||
use RectorPrefix20220221\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
/**
|
||||
* @see \Rector\Tests\CodingStyle\ClassNameImport\ShortNameResolver\ShortNameResolverTest
|
||||
*/
|
||||
|
@ -167,7 +167,7 @@ final class ShortNameResolver
|
|||
if (!$phpDocInfo instanceof \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo) {
|
||||
return null;
|
||||
}
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser->traverseWithCallable($phpDocInfo->getPhpDocNode(), '', function ($node) use(&$shortNames) {
|
||||
if ($node instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode) {
|
||||
$shortName = \trim($node->name, '@');
|
||||
|
|
|
@ -9,7 +9,7 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
|||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode;
|
||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
||||
use Rector\DeadCode\PhpDoc\DeadParamTagValueNodeAnalyzer;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
final class ParamTagRemover
|
||||
{
|
||||
/**
|
||||
|
@ -24,7 +24,7 @@ final class ParamTagRemover
|
|||
public function removeParamTagsIfUseless(\Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo $phpDocInfo, \PhpParser\Node\FunctionLike $functionLike) : bool
|
||||
{
|
||||
$hasChanged = \false;
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser->traverseWithCallable($phpDocInfo->getPhpDocNode(), '', function (\PHPStan\PhpDocParser\Ast\Node $docNode) use($functionLike, $phpDocInfo, &$hasChanged) : ?int {
|
||||
if (!$docNode instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode) {
|
||||
return null;
|
||||
|
@ -41,7 +41,7 @@ final class ParamTagRemover
|
|||
}
|
||||
$phpDocInfo->markAsChanged();
|
||||
$hasChanged = \true;
|
||||
return \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
return \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
});
|
||||
return $hasChanged;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
|||
namespace Rector\Php80\PhpDoc;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
final class PhpDocNodeFinder
|
||||
{
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ final class PhpDocNodeFinder
|
|||
public function findByType(\PHPStan\PhpDocParser\Ast\Node $node, string $nodeType) : array
|
||||
{
|
||||
$foundNodes = [];
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser->traverseWithCallable($node, '', function (\PHPStan\PhpDocParser\Ast\Node $node) use(&$foundNodes, $nodeType) {
|
||||
if (!\is_a($node, $nodeType, \true)) {
|
||||
return null;
|
||||
|
|
|
@ -29,9 +29,9 @@ use Rector\PhpAttribute\Printer\PhpAttributeGroupFactory;
|
|||
use Rector\PhpAttribute\RemovableAnnotationAnalyzer;
|
||||
use Rector\PhpAttribute\UnwrapableAnnotationAnalyzer;
|
||||
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
|
||||
use RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20220221\Webmozart\Assert\Assert;
|
||||
/**
|
||||
* @changelog https://wiki.php.net/rfc/attributes_v2
|
||||
|
@ -158,7 +158,7 @@ CODE_SAMPLE
|
|||
private function processGenericTags(\Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo $phpDocInfo) : array
|
||||
{
|
||||
$attributeGroups = [];
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser->traverseWithCallable($phpDocInfo->getPhpDocNode(), '', function (\PHPStan\PhpDocParser\Ast\Node $docNode) use(&$attributeGroups, $phpDocInfo) : ?int {
|
||||
if (!$docNode instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode) {
|
||||
return null;
|
||||
|
@ -178,7 +178,7 @@ CODE_SAMPLE
|
|||
}
|
||||
$attributeGroups[] = $this->phpAttributeGroupFactory->createFromSimpleTag($annotationToAttribute);
|
||||
$phpDocInfo->markAsChanged();
|
||||
return \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
return \RectorPrefix20220221\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser::NODE_REMOVE;
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '58b8acefc3c3125a4f0d692bc09b3d8d680a5159';
|
||||
public const PACKAGE_VERSION = 'aa1fb8fdef02d9aba7e426f32227559c6a19e1ca';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-02-21 13:11:47';
|
||||
public const RELEASE_DATE = '2022-02-21 12:13:59';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20220221\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
|
|
@ -18,7 +18,6 @@ use RectorPrefix20220221\Symplify\AutowireArrayParameter\DependencyInjection\Com
|
|||
use RectorPrefix20220221\Symplify\ComposerJsonManipulator\ValueObject\ComposerJsonManipulatorConfig;
|
||||
use RectorPrefix20220221\Symplify\PackageBuilder\DependencyInjection\CompilerPass\AutowireInterfacesCompilerPass;
|
||||
use RectorPrefix20220221\Symplify\PackageBuilder\ValueObject\ConsoleColorDiffConfig;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\SimplePhpDocParserConfig;
|
||||
use RectorPrefix20220221\Symplify\Skipper\ValueObject\SkipperConfig;
|
||||
use RectorPrefix20220221\Symplify\SymplifyKernel\ContainerBuilderFactory;
|
||||
use RectorPrefix20220221\Symplify\SymplifyKernel\Contract\LightKernelInterface;
|
||||
|
@ -89,7 +88,6 @@ final class RectorKernel implements \RectorPrefix20220221\Symplify\SymplifyKerne
|
|||
$configFiles[] = __DIR__ . '/../../config/config.php';
|
||||
$configFiles[] = \RectorPrefix20220221\Symplify\Astral\ValueObject\AstralConfig::FILE_PATH;
|
||||
$configFiles[] = \RectorPrefix20220221\Symplify\ComposerJsonManipulator\ValueObject\ComposerJsonManipulatorConfig::FILE_PATH;
|
||||
$configFiles[] = \RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\SimplePhpDocParserConfig::FILE_PATH;
|
||||
$configFiles[] = \RectorPrefix20220221\Symplify\Skipper\ValueObject\SkipperConfig::FILE_PATH;
|
||||
$configFiles[] = \RectorPrefix20220221\Symplify\PackageBuilder\ValueObject\ConsoleColorDiffConfig::FILE_PATH;
|
||||
return $configFiles;
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -4,4 +4,4 @@
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b::getLoader();
|
||||
return ComposerAutoloaderInitc5acab459690c772aad3f151ec2bc973::getLoader();
|
||||
|
|
12
vendor/composer/autoload_classmap.php
vendored
12
vendor/composer/autoload_classmap.php
vendored
|
@ -1278,18 +1278,6 @@ return array(
|
|||
'RectorPrefix20220221\\Symplify\\PackageBuilder\\ValueObject\\MethodName' => $vendorDir . '/symplify/package-builder/src/ValueObject/MethodName.php',
|
||||
'RectorPrefix20220221\\Symplify\\PackageBuilder\\ValueObject\\Option' => $vendorDir . '/symplify/package-builder/src/ValueObject/Option.php',
|
||||
'RectorPrefix20220221\\Symplify\\PackageBuilder\\Yaml\\ParametersMerger' => $vendorDir . '/symplify/package-builder/src/Yaml/ParametersMerger.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\Contract\\PhpDocNodeVisitorInterface' => $vendorDir . '/symplify/simple-php-doc-parser/src/Contract/PhpDocNodeVisitorInterface.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\Exception\\InvalidTraverseException' => $vendorDir . '/symplify/simple-php-doc-parser/src/Exception/InvalidTraverseException.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\PhpDocNodeTraverser' => $vendorDir . '/symplify/simple-php-doc-parser/src/PhpDocNodeTraverser.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\PhpDocNodeVisitor\\AbstractPhpDocNodeVisitor' => $vendorDir . '/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/AbstractPhpDocNodeVisitor.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\PhpDocNodeVisitor\\CallablePhpDocNodeVisitor' => $vendorDir . '/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CallablePhpDocNodeVisitor.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\PhpDocNodeVisitor\\CloningPhpDocNodeVisitor' => $vendorDir . '/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CloningPhpDocNodeVisitor.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\PhpDocNodeVisitor\\ParentConnectingPhpDocNodeVisitor' => $vendorDir . '/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/ParentConnectingPhpDocNodeVisitor.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\SimplePhpDocParser' => $vendorDir . '/symplify/simple-php-doc-parser/src/SimplePhpDocParser.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\StaticFactory\\SimplePhpDocParserStaticFactory' => $vendorDir . '/symplify/simple-php-doc-parser/src/StaticFactory/SimplePhpDocParserStaticFactory.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\ValueObject\\Ast\\PhpDoc\\SimplePhpDocNode' => $vendorDir . '/symplify/simple-php-doc-parser/src/ValueObject/Ast/PhpDoc/SimplePhpDocNode.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\ValueObject\\PhpDocAttributeKey' => $vendorDir . '/symplify/simple-php-doc-parser/src/ValueObject/PhpDocAttributeKey.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\ValueObject\\SimplePhpDocParserConfig' => $vendorDir . '/symplify/simple-php-doc-parser/src/ValueObject/SimplePhpDocParserConfig.php',
|
||||
'RectorPrefix20220221\\Symplify\\Skipper\\Contract\\SkipVoterInterface' => $vendorDir . '/symplify/skipper/src/Contract/SkipVoterInterface.php',
|
||||
'RectorPrefix20220221\\Symplify\\Skipper\\FileSystem\\FnMatchPathNormalizer' => $vendorDir . '/symplify/skipper/src/FileSystem/FnMatchPathNormalizer.php',
|
||||
'RectorPrefix20220221\\Symplify\\Skipper\\Matcher\\FileInfoMatcher' => $vendorDir . '/symplify/skipper/src/Matcher/FileInfoMatcher.php',
|
||||
|
|
1
vendor/composer/autoload_psr4.php
vendored
1
vendor/composer/autoload_psr4.php
vendored
|
@ -27,7 +27,6 @@ return array(
|
|||
'RectorPrefix20220221\\Symplify\\SymplifyKernel\\' => array($vendorDir . '/symplify/symplify-kernel/src'),
|
||||
'RectorPrefix20220221\\Symplify\\SmartFileSystem\\' => array($vendorDir . '/symplify/smart-file-system/src'),
|
||||
'RectorPrefix20220221\\Symplify\\Skipper\\' => array($vendorDir . '/symplify/skipper/src'),
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\' => array($vendorDir . '/symplify/simple-php-doc-parser/src'),
|
||||
'RectorPrefix20220221\\Symplify\\PackageBuilder\\' => array($vendorDir . '/symplify/package-builder/src'),
|
||||
'RectorPrefix20220221\\Symplify\\EasyTesting\\' => array($vendorDir . '/symplify/easy-testing/src'),
|
||||
'RectorPrefix20220221\\Symplify\\EasyParallel\\' => array($vendorDir . '/symplify/easy-parallel/src'),
|
||||
|
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b
|
||||
class ComposerAutoloaderInitc5acab459690c772aad3f151ec2bc973
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,15 +22,15 @@ class ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitc5acab459690c772aad3f151ec2bc973', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitc5acab459690c772aad3f151ec2bc973', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInite84eb9ae4861bb7dc618f8b0420b718b::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitc5acab459690c772aad3f151ec2bc973::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
|
@ -42,12 +42,12 @@ class ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b
|
|||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInite84eb9ae4861bb7dc618f8b0420b718b::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitc5acab459690c772aad3f151ec2bc973::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequiree84eb9ae4861bb7dc618f8b0420b718b($fileIdentifier, $file);
|
||||
composerRequirec5acab459690c772aad3f151ec2bc973($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -59,7 +59,7 @@ class ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequiree84eb9ae4861bb7dc618f8b0420b718b($fileIdentifier, $file)
|
||||
function composerRequirec5acab459690c772aad3f151ec2bc973($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
25
vendor/composer/autoload_static.php
vendored
25
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInite84eb9ae4861bb7dc618f8b0420b718b
|
||||
class ComposerStaticInitc5acab459690c772aad3f151ec2bc973
|
||||
{
|
||||
public static $files = array (
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
|
@ -49,7 +49,6 @@ class ComposerStaticInite84eb9ae4861bb7dc618f8b0420b718b
|
|||
'RectorPrefix20220221\\Symplify\\SymplifyKernel\\' => 45,
|
||||
'RectorPrefix20220221\\Symplify\\SmartFileSystem\\' => 46,
|
||||
'RectorPrefix20220221\\Symplify\\Skipper\\' => 38,
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\' => 49,
|
||||
'RectorPrefix20220221\\Symplify\\PackageBuilder\\' => 45,
|
||||
'RectorPrefix20220221\\Symplify\\EasyTesting\\' => 42,
|
||||
'RectorPrefix20220221\\Symplify\\EasyParallel\\' => 43,
|
||||
|
@ -190,10 +189,6 @@ class ComposerStaticInite84eb9ae4861bb7dc618f8b0420b718b
|
|||
array (
|
||||
0 => __DIR__ . '/..' . '/symplify/skipper/src',
|
||||
),
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src',
|
||||
),
|
||||
'RectorPrefix20220221\\Symplify\\PackageBuilder\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symplify/package-builder/src',
|
||||
|
@ -1657,18 +1652,6 @@ class ComposerStaticInite84eb9ae4861bb7dc618f8b0420b718b
|
|||
'RectorPrefix20220221\\Symplify\\PackageBuilder\\ValueObject\\MethodName' => __DIR__ . '/..' . '/symplify/package-builder/src/ValueObject/MethodName.php',
|
||||
'RectorPrefix20220221\\Symplify\\PackageBuilder\\ValueObject\\Option' => __DIR__ . '/..' . '/symplify/package-builder/src/ValueObject/Option.php',
|
||||
'RectorPrefix20220221\\Symplify\\PackageBuilder\\Yaml\\ParametersMerger' => __DIR__ . '/..' . '/symplify/package-builder/src/Yaml/ParametersMerger.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\Contract\\PhpDocNodeVisitorInterface' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/Contract/PhpDocNodeVisitorInterface.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\Exception\\InvalidTraverseException' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/Exception/InvalidTraverseException.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\PhpDocNodeTraverser' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/PhpDocNodeTraverser.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\PhpDocNodeVisitor\\AbstractPhpDocNodeVisitor' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/AbstractPhpDocNodeVisitor.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\PhpDocNodeVisitor\\CallablePhpDocNodeVisitor' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CallablePhpDocNodeVisitor.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\PhpDocNodeVisitor\\CloningPhpDocNodeVisitor' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CloningPhpDocNodeVisitor.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\PhpDocNodeVisitor\\ParentConnectingPhpDocNodeVisitor' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/ParentConnectingPhpDocNodeVisitor.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\SimplePhpDocParser' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/SimplePhpDocParser.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\StaticFactory\\SimplePhpDocParserStaticFactory' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/StaticFactory/SimplePhpDocParserStaticFactory.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\ValueObject\\Ast\\PhpDoc\\SimplePhpDocNode' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/ValueObject/Ast/PhpDoc/SimplePhpDocNode.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\ValueObject\\PhpDocAttributeKey' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/ValueObject/PhpDocAttributeKey.php',
|
||||
'RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\ValueObject\\SimplePhpDocParserConfig' => __DIR__ . '/..' . '/symplify/simple-php-doc-parser/src/ValueObject/SimplePhpDocParserConfig.php',
|
||||
'RectorPrefix20220221\\Symplify\\Skipper\\Contract\\SkipVoterInterface' => __DIR__ . '/..' . '/symplify/skipper/src/Contract/SkipVoterInterface.php',
|
||||
'RectorPrefix20220221\\Symplify\\Skipper\\FileSystem\\FnMatchPathNormalizer' => __DIR__ . '/..' . '/symplify/skipper/src/FileSystem/FnMatchPathNormalizer.php',
|
||||
'RectorPrefix20220221\\Symplify\\Skipper\\Matcher\\FileInfoMatcher' => __DIR__ . '/..' . '/symplify/skipper/src/Matcher/FileInfoMatcher.php',
|
||||
|
@ -3864,9 +3847,9 @@ class ComposerStaticInite84eb9ae4861bb7dc618f8b0420b718b
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite84eb9ae4861bb7dc618f8b0420b718b::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite84eb9ae4861bb7dc618f8b0420b718b::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite84eb9ae4861bb7dc618f8b0420b718b::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitc5acab459690c772aad3f151ec2bc973::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitc5acab459690c772aad3f151ec2bc973::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitc5acab459690c772aad3f151ec2bc973::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
89
vendor/composer/installed.json
vendored
89
vendor/composer/installed.json
vendored
|
@ -4690,95 +4690,6 @@
|
|||
],
|
||||
"install-path": "..\/symplify\/rule-doc-generator-contracts"
|
||||
},
|
||||
{
|
||||
"name": "symplify\/simple-php-doc-parser",
|
||||
"version": "10.0.25",
|
||||
"version_normalized": "10.0.25.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/symplify\/simple-php-doc-parser.git",
|
||||
"reference": "022f1d783b88fe9c19ebc9dfb7dd78c686b4ea6c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/symplify\/simple-php-doc-parser\/zipball\/022f1d783b88fe9c19ebc9dfb7dd78c686b4ea6c",
|
||||
"reference": "022f1d783b88fe9c19ebc9dfb7dd78c686b4ea6c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.0",
|
||||
"phpstan\/phpdoc-parser": "^1.2",
|
||||
"symfony\/config": "^5.4|^6.0",
|
||||
"symfony\/dependency-injection": "^5.4|^6.0",
|
||||
"symplify\/package-builder": "^10.0.25"
|
||||
},
|
||||
"conflict": {
|
||||
"symplify\/amnesia": "<10.0.25",
|
||||
"symplify\/astral": "<10.0.25",
|
||||
"symplify\/autowire-array-parameter": "<10.0.25",
|
||||
"symplify\/coding-standard": "<10.0.25",
|
||||
"symplify\/composer-json-manipulator": "<10.0.25",
|
||||
"symplify\/config-transformer": "<10.0.25",
|
||||
"symplify\/easy-ci": "<10.0.25",
|
||||
"symplify\/easy-coding-standard": "<10.0.25",
|
||||
"symplify\/easy-parallel": "<10.0.25",
|
||||
"symplify\/easy-testing": "<10.0.25",
|
||||
"symplify\/git-wrapper": "<10.0.25",
|
||||
"symplify\/latte-phpstan-compiler": "<10.0.25",
|
||||
"symplify\/markdown-diff": "<10.0.25",
|
||||
"symplify\/monorepo-builder": "<10.0.25",
|
||||
"symplify\/neon-config-dumper": "<10.0.25",
|
||||
"symplify\/php-config-printer": "<10.0.25",
|
||||
"symplify\/phpstan-extensions": "<10.0.25",
|
||||
"symplify\/phpstan-latte-rules": "<10.0.25",
|
||||
"symplify\/phpstan-rules": "<10.0.25",
|
||||
"symplify\/rule-doc-generator": "<10.0.25",
|
||||
"symplify\/rule-doc-generator-contracts": "<10.0.25",
|
||||
"symplify\/skipper": "<10.0.25",
|
||||
"symplify\/smart-file-system": "<10.0.25",
|
||||
"symplify\/symfony-static-dumper": "<10.0.25",
|
||||
"symplify\/symplify-kernel": "<10.0.25",
|
||||
"symplify\/template-phpstan-compiler": "<10.0.25",
|
||||
"symplify\/vendor-patches": "<10.0.25"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit\/phpunit": "^9.5",
|
||||
"symplify\/easy-testing": "^10.0.25"
|
||||
},
|
||||
"time": "2022-02-20T11:17:20+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "10.1-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https:\/\/packagist.org\/downloads\/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "Service integration of phpstan\/phpdoc-parser, with few extra goodies for practical simple use",
|
||||
"support": {
|
||||
"source": "https:\/\/github.com\/symplify\/simple-php-doc-parser\/tree\/10.0.25"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https:\/\/www.paypal.me\/rectorphp",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https:\/\/github.com\/tomasvotruba",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"abandoned": "symplify\/astral",
|
||||
"install-path": "..\/symplify\/simple-php-doc-parser"
|
||||
},
|
||||
{
|
||||
"name": "symplify\/skipper",
|
||||
"version": "10.1.0",
|
||||
|
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
|
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
|||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20220221\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b', false) && !interface_exists('ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b', false) && !trait_exists('ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b', false)) {
|
||||
spl_autoload_call('RectorPrefix20220221\ComposerAutoloaderInite84eb9ae4861bb7dc618f8b0420b718b');
|
||||
if (!class_exists('ComposerAutoloaderInitc5acab459690c772aad3f151ec2bc973', false) && !interface_exists('ComposerAutoloaderInitc5acab459690c772aad3f151ec2bc973', false) && !trait_exists('ComposerAutoloaderInitc5acab459690c772aad3f151ec2bc973', false)) {
|
||||
spl_autoload_call('RectorPrefix20220221\ComposerAutoloaderInitc5acab459690c772aad3f151ec2bc973');
|
||||
}
|
||||
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
||||
spl_autoload_call('RectorPrefix20220221\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
|
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
|
|||
return \RectorPrefix20220221\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequiree84eb9ae4861bb7dc618f8b0420b718b')) {
|
||||
function composerRequiree84eb9ae4861bb7dc618f8b0420b718b() {
|
||||
return \RectorPrefix20220221\composerRequiree84eb9ae4861bb7dc618f8b0420b718b(...func_get_args());
|
||||
if (!function_exists('composerRequirec5acab459690c772aad3f151ec2bc973')) {
|
||||
function composerRequirec5acab459690c772aad3f151ec2bc973() {
|
||||
return \RectorPrefix20220221\composerRequirec5acab459690c772aad3f151ec2bc973(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
{
|
||||
"name": "symplify\/simple-php-doc-parser",
|
||||
"description": "Service integration of phpstan\/phpdoc-parser, with few extra goodies for practical simple use",
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": ">=8.0",
|
||||
"phpstan\/phpdoc-parser": "^1.2",
|
||||
"symfony\/dependency-injection": "^5.4|^6.0",
|
||||
"symfony\/config": "^5.4|^6.0",
|
||||
"symplify\/package-builder": "^10.0.25"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit\/phpunit": "^9.5",
|
||||
"symplify\/easy-testing": "^10.0.25"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\": "src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"RectorPrefix20220221\\Symplify\\SimplePhpDocParser\\Tests\\": "tests"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "10.1-dev"
|
||||
}
|
||||
},
|
||||
"conflict": {
|
||||
"symplify\/astral": "<10.0.25",
|
||||
"symplify\/composer-json-manipulator": "<10.0.25",
|
||||
"symplify\/easy-coding-standard": "<10.0.25",
|
||||
"symplify\/phpstan-rules": "<10.0.25",
|
||||
"symplify\/easy-testing": "<10.0.25",
|
||||
"symplify\/rule-doc-generator-contracts": "<10.0.25",
|
||||
"symplify\/php-config-printer": "<10.0.25",
|
||||
"symplify\/autowire-array-parameter": "<10.0.25",
|
||||
"symplify\/markdown-diff": "<10.0.25",
|
||||
"symplify\/amnesia": "<10.0.25",
|
||||
"symplify\/phpstan-extensions": "<10.0.25",
|
||||
"symplify\/rule-doc-generator": "<10.0.25",
|
||||
"symplify\/vendor-patches": "<10.0.25",
|
||||
"symplify\/skipper": "<10.0.25",
|
||||
"symplify\/smart-file-system": "<10.0.25",
|
||||
"symplify\/symfony-static-dumper": "<10.0.25",
|
||||
"symplify\/git-wrapper": "<10.0.25",
|
||||
"symplify\/symplify-kernel": "<10.0.25",
|
||||
"symplify\/monorepo-builder": "<10.0.25",
|
||||
"symplify\/config-transformer": "<10.0.25",
|
||||
"symplify\/easy-ci": "<10.0.25",
|
||||
"symplify\/coding-standard": "<10.0.25",
|
||||
"symplify\/latte-phpstan-compiler": "<10.0.25",
|
||||
"symplify\/template-phpstan-compiler": "<10.0.25",
|
||||
"symplify\/phpstan-latte-rules": "<10.0.25",
|
||||
"symplify\/easy-parallel": "<10.0.25",
|
||||
"symplify\/neon-config-dumper": "<10.0.25"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221;
|
||||
|
||||
use PHPStan\PhpDocParser\Lexer\Lexer;
|
||||
use PHPStan\PhpDocParser\Parser\ConstExprParser;
|
||||
use PHPStan\PhpDocParser\Parser\PhpDocParser;
|
||||
use PHPStan\PhpDocParser\Parser\TypeParser;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->defaults()->public()->autowire()->autoconfigure();
|
||||
$services->load('RectorPrefix20220221\Symplify\\SimplePhpDocParser\\', __DIR__ . '/../src')->exclude([__DIR__ . '/../src/PhpDocNodeVisitor/CallablePhpDocNodeVisitor.php']);
|
||||
$services->set(\PHPStan\PhpDocParser\Parser\PhpDocParser::class);
|
||||
$services->set(\PHPStan\PhpDocParser\Lexer\Lexer::class);
|
||||
$services->set(\PHPStan\PhpDocParser\Parser\TypeParser::class);
|
||||
$services->set(\PHPStan\PhpDocParser\Parser\ConstExprParser::class);
|
||||
};
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser\Contract;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
/**
|
||||
* Inspired by https://github.com/nikic/PHP-Parser/blob/master/lib/PhpParser/NodeVisitor.php
|
||||
*/
|
||||
interface PhpDocNodeVisitorInterface
|
||||
{
|
||||
public function beforeTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void;
|
||||
/**
|
||||
* @return int|Node|null
|
||||
*/
|
||||
public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node);
|
||||
/**
|
||||
* @return null|int|\PhpParser\Node|Node[] Replacement node (or special return)
|
||||
*/
|
||||
public function leaveNode(\PHPStan\PhpDocParser\Ast\Node $node);
|
||||
public function afterTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void;
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser\Exception;
|
||||
|
||||
use Exception;
|
||||
final class InvalidTraverseException extends \Exception
|
||||
{
|
||||
}
|
|
@ -1,208 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\Exception\InvalidTraverseException;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CallablePhpDocNodeVisitor;
|
||||
/**
|
||||
* @api
|
||||
*
|
||||
* Mimics
|
||||
* https://github.com/nikic/PHP-Parser/blob/4abdcde5f16269959a834e4e58ea0ba0938ab133/lib/PhpParser/NodeTraverser.php
|
||||
*
|
||||
* @see \Symplify\SimplePhpDocParser\Tests\SimplePhpDocNodeTraverser\PhpDocNodeTraverserTest
|
||||
*/
|
||||
final class PhpDocNodeTraverser
|
||||
{
|
||||
/**
|
||||
* If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes of the current node will not be traversed
|
||||
* for any visitors.
|
||||
*
|
||||
* For subsequent visitors enterNode() will still be called on the current node and leaveNode() will also be invoked
|
||||
* for the current node.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public const DONT_TRAVERSE_CHILDREN = 1;
|
||||
/**
|
||||
* If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns STOP_TRAVERSAL, traversal is aborted.
|
||||
*
|
||||
* The afterTraverse() method will still be invoked.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public const STOP_TRAVERSAL = 2;
|
||||
/**
|
||||
* If NodeVisitor::leaveNode() returns NODE_REMOVE for a node that occurs in an array, it will be removed from the
|
||||
* array.
|
||||
*
|
||||
* For subsequent visitors leaveNode() will still be invoked for the removed node.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public const NODE_REMOVE = 3;
|
||||
/**
|
||||
* If NodeVisitor::enterNode() returns DONT_TRAVERSE_CURRENT_AND_CHILDREN, child nodes of the current node will not
|
||||
* be traversed for any visitors.
|
||||
*
|
||||
* For subsequent visitors enterNode() will not be called as well. leaveNode() will be invoked for visitors that has
|
||||
* enterNode() method invoked.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4;
|
||||
/**
|
||||
* @var bool Whether traversal should be stopped
|
||||
*/
|
||||
private $stopTraversal = \false;
|
||||
/**
|
||||
* @var PhpDocNodeVisitorInterface[]
|
||||
*/
|
||||
private $phpDocNodeVisitors = [];
|
||||
public function addPhpDocNodeVisitor(\RectorPrefix20220221\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface $phpDocNodeVisitor) : void
|
||||
{
|
||||
$this->phpDocNodeVisitors[] = $phpDocNodeVisitor;
|
||||
}
|
||||
public function traverse(\PHPStan\PhpDocParser\Ast\Node $node) : void
|
||||
{
|
||||
foreach ($this->phpDocNodeVisitors as $phpDocNodeVisitor) {
|
||||
$phpDocNodeVisitor->beforeTraverse($node);
|
||||
}
|
||||
$node = $this->traverseNode($node);
|
||||
foreach ($this->phpDocNodeVisitors as $phpDocNodeVisitor) {
|
||||
$phpDocNodeVisitor->afterTraverse($node);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param callable(Node $node): (int|null|Node) $callable
|
||||
*/
|
||||
public function traverseWithCallable(\PHPStan\PhpDocParser\Ast\Node $node, string $docContent, callable $callable) : \PHPStan\PhpDocParser\Ast\Node
|
||||
{
|
||||
$callablePhpDocNodeVisitor = new \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CallablePhpDocNodeVisitor($callable, $docContent);
|
||||
$this->addPhpDocNodeVisitor($callablePhpDocNodeVisitor);
|
||||
$this->traverse($node);
|
||||
return $node;
|
||||
}
|
||||
/**
|
||||
* @template TNode of Node
|
||||
* @param TNode $node
|
||||
* @return TNode
|
||||
*/
|
||||
private function traverseNode(\PHPStan\PhpDocParser\Ast\Node $node) : \PHPStan\PhpDocParser\Ast\Node
|
||||
{
|
||||
$subNodeNames = \array_keys(\get_object_vars($node));
|
||||
foreach ($subNodeNames as $subNodeName) {
|
||||
$subNode =& $node->{$subNodeName};
|
||||
if (\is_array($subNode)) {
|
||||
$subNode = $this->traverseArray($subNode);
|
||||
} elseif ($subNode instanceof \PHPStan\PhpDocParser\Ast\Node) {
|
||||
$breakVisitorIndex = null;
|
||||
$traverseChildren = \true;
|
||||
foreach ($this->phpDocNodeVisitors as $visitorIndex => $phpDocNodeVisitor) {
|
||||
$return = $phpDocNodeVisitor->enterNode($subNode);
|
||||
if ($return !== null) {
|
||||
if ($return instanceof \PHPStan\PhpDocParser\Ast\Node) {
|
||||
$subNode = $return;
|
||||
} elseif ($return === self::DONT_TRAVERSE_CHILDREN) {
|
||||
$traverseChildren = \false;
|
||||
} elseif ($return === self::DONT_TRAVERSE_CURRENT_AND_CHILDREN) {
|
||||
$traverseChildren = \false;
|
||||
$breakVisitorIndex = $visitorIndex;
|
||||
break;
|
||||
} elseif ($return === self::STOP_TRAVERSAL) {
|
||||
$this->stopTraversal = \true;
|
||||
} elseif ($return === self::NODE_REMOVE) {
|
||||
$subNode = null;
|
||||
continue 2;
|
||||
} else {
|
||||
throw new \RectorPrefix20220221\Symplify\SimplePhpDocParser\Exception\InvalidTraverseException('enterNode() returned invalid value of type ' . \gettype($return));
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($traverseChildren) {
|
||||
$subNode = $this->traverseNode($subNode);
|
||||
if ($this->stopTraversal) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach ($this->phpDocNodeVisitors as $visitorIndex => $phpDocNodeVisitor) {
|
||||
$phpDocNodeVisitor->leaveNode($subNode);
|
||||
if ($breakVisitorIndex === $visitorIndex) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $node;
|
||||
}
|
||||
/**
|
||||
* @param array<Node|mixed> $nodes
|
||||
* @return array<Node|mixed>
|
||||
*/
|
||||
private function traverseArray(array $nodes) : array
|
||||
{
|
||||
foreach ($nodes as $key => &$node) {
|
||||
// can be string or something else
|
||||
if (!$node instanceof \PHPStan\PhpDocParser\Ast\Node) {
|
||||
continue;
|
||||
}
|
||||
$traverseChildren = \true;
|
||||
$breakVisitorIndex = null;
|
||||
foreach ($this->phpDocNodeVisitors as $visitorIndex => $phpDocNodeVisitor) {
|
||||
$return = $phpDocNodeVisitor->enterNode($node);
|
||||
if ($return !== null) {
|
||||
if ($return instanceof \PHPStan\PhpDocParser\Ast\Node) {
|
||||
$node = $return;
|
||||
} elseif ($return === self::DONT_TRAVERSE_CHILDREN) {
|
||||
$traverseChildren = \false;
|
||||
} elseif ($return === self::DONT_TRAVERSE_CURRENT_AND_CHILDREN) {
|
||||
$traverseChildren = \false;
|
||||
$breakVisitorIndex = $visitorIndex;
|
||||
break;
|
||||
} elseif ($return === self::STOP_TRAVERSAL) {
|
||||
$this->stopTraversal = \true;
|
||||
} elseif ($return === self::NODE_REMOVE) {
|
||||
// remove node
|
||||
unset($nodes[$key]);
|
||||
continue 2;
|
||||
} else {
|
||||
throw new \RectorPrefix20220221\Symplify\SimplePhpDocParser\Exception\InvalidTraverseException('enterNode() returned invalid value of type ' . \gettype($return));
|
||||
}
|
||||
}
|
||||
}
|
||||
// should traverse node childrens properties?
|
||||
if ($traverseChildren) {
|
||||
$node = $this->traverseNode($node);
|
||||
if ($this->stopTraversal) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach ($this->phpDocNodeVisitors as $visitorIndex => $phpDocNodeVisitor) {
|
||||
$return = $phpDocNodeVisitor->leaveNode($node);
|
||||
if ($return !== null) {
|
||||
if ($return instanceof \PHPStan\PhpDocParser\Ast\Node) {
|
||||
$node = $return;
|
||||
} elseif (\is_array($return)) {
|
||||
$doNodes[] = [$key, $return];
|
||||
break;
|
||||
} elseif ($return === self::NODE_REMOVE) {
|
||||
$doNodes[] = [$key, []];
|
||||
break;
|
||||
} elseif ($return === self::STOP_TRAVERSAL) {
|
||||
$this->stopTraversal = \true;
|
||||
break 2;
|
||||
} else {
|
||||
throw new \RectorPrefix20220221\Symplify\SimplePhpDocParser\Exception\InvalidTraverseException('leaveNode() returned invalid value of type ' . \gettype($return));
|
||||
}
|
||||
}
|
||||
if ($breakVisitorIndex === $visitorIndex) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $nodes;
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface;
|
||||
/**
|
||||
* Inspired by https://github.com/nikic/PHP-Parser/blob/master/lib/PhpParser/NodeVisitorAbstract.php
|
||||
*/
|
||||
abstract class AbstractPhpDocNodeVisitor implements \RectorPrefix20220221\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface
|
||||
{
|
||||
public function beforeTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void
|
||||
{
|
||||
}
|
||||
/**
|
||||
* @return int|Node|null
|
||||
*/
|
||||
public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @return null|int|\PhpParser\Node|Node[] Replacement node (or special return)
|
||||
*/
|
||||
public function leaveNode(\PHPStan\PhpDocParser\Ast\Node $node)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public function afterTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
final class CallablePhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
{
|
||||
/**
|
||||
* @var callable(Node, string|null): (int|null|Node)
|
||||
*/
|
||||
private $callable;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $docContent;
|
||||
/**
|
||||
* @param callable(Node $callable, string|null $docContent): (int|null|Node) $callable
|
||||
*/
|
||||
public function __construct(callable $callable, ?string $docContent)
|
||||
{
|
||||
$this->docContent = $docContent;
|
||||
$this->callable = $callable;
|
||||
}
|
||||
/**
|
||||
* @return int|Node|null
|
||||
*/
|
||||
public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node)
|
||||
{
|
||||
$callable = $this->callable;
|
||||
return $callable($node, $this->docContent);
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
/**
|
||||
* @api
|
||||
*
|
||||
* Mirrors
|
||||
* https://github.com/nikic/PHP-Parser/blob/d520bc9e1d6203c35a1ba20675b79a051c821a9e/lib/PhpParser/NodeVisitor/CloningVisitor.php
|
||||
*/
|
||||
final class CloningPhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
{
|
||||
public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : \PHPStan\PhpDocParser\Ast\Node
|
||||
{
|
||||
$clonedNode = clone $node;
|
||||
$clonedNode->setAttribute(\RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::ORIG_NODE, $node);
|
||||
return $clonedNode;
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
/**
|
||||
* @api
|
||||
*
|
||||
* Mimics https://github.com/nikic/PHP-Parser/blob/master/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
|
||||
*
|
||||
* @see \Symplify\SimplePhpDocParser\Tests\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitorTest
|
||||
*/
|
||||
final class ParentConnectingPhpDocNodeVisitor extends \RectorPrefix20220221\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
{
|
||||
/**
|
||||
* @var Node[]
|
||||
*/
|
||||
private $stack = [];
|
||||
public function beforeTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void
|
||||
{
|
||||
$this->stack = [$node];
|
||||
}
|
||||
public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : \PHPStan\PhpDocParser\Ast\Node
|
||||
{
|
||||
if ($this->stack !== []) {
|
||||
$parentNode = $this->stack[\count($this->stack) - 1];
|
||||
$node->setAttribute(\RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::PARENT, $parentNode);
|
||||
}
|
||||
$this->stack[] = $node;
|
||||
return $node;
|
||||
}
|
||||
/**
|
||||
* @return null|int|\PhpParser\Node|Node[] Replacement node (or special return
|
||||
*/
|
||||
public function leaveNode(\PHPStan\PhpDocParser\Ast\Node $node)
|
||||
{
|
||||
\array_pop($this->stack);
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser;
|
||||
|
||||
use PhpParser\Comment\Doc;
|
||||
use PhpParser\Node;
|
||||
use PHPStan\PhpDocParser\Lexer\Lexer;
|
||||
use PHPStan\PhpDocParser\Parser\PhpDocParser;
|
||||
use PHPStan\PhpDocParser\Parser\TokenIterator;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\Ast\PhpDoc\SimplePhpDocNode;
|
||||
/**
|
||||
* @see \Symplify\SimplePhpDocParser\Tests\SimplePhpDocParser\SimplePhpDocParserTest
|
||||
*/
|
||||
final class SimplePhpDocParser
|
||||
{
|
||||
/**
|
||||
* @var \PHPStan\PhpDocParser\Parser\PhpDocParser
|
||||
*/
|
||||
private $phpDocParser;
|
||||
/**
|
||||
* @var \PHPStan\PhpDocParser\Lexer\Lexer
|
||||
*/
|
||||
private $lexer;
|
||||
public function __construct(\PHPStan\PhpDocParser\Parser\PhpDocParser $phpDocParser, \PHPStan\PhpDocParser\Lexer\Lexer $lexer)
|
||||
{
|
||||
$this->phpDocParser = $phpDocParser;
|
||||
$this->lexer = $lexer;
|
||||
}
|
||||
public function parseNode(\PhpParser\Node $node) : ?\RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\Ast\PhpDoc\SimplePhpDocNode
|
||||
{
|
||||
$docComment = $node->getDocComment();
|
||||
if (!$docComment instanceof \PhpParser\Comment\Doc) {
|
||||
return null;
|
||||
}
|
||||
return $this->parseDocBlock($docComment->getText());
|
||||
}
|
||||
public function parseDocBlock(string $docBlock) : \RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\Ast\PhpDoc\SimplePhpDocNode
|
||||
{
|
||||
$tokens = $this->lexer->tokenize($docBlock);
|
||||
$tokenIterator = new \PHPStan\PhpDocParser\Parser\TokenIterator($tokens);
|
||||
$phpDocNode = $this->phpDocParser->parse($tokenIterator);
|
||||
return new \RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\Ast\PhpDoc\SimplePhpDocNode($phpDocNode->children);
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser\StaticFactory;
|
||||
|
||||
use PHPStan\PhpDocParser\Lexer\Lexer;
|
||||
use PHPStan\PhpDocParser\Parser\ConstExprParser;
|
||||
use PHPStan\PhpDocParser\Parser\PhpDocParser;
|
||||
use PHPStan\PhpDocParser\Parser\TypeParser;
|
||||
use RectorPrefix20220221\Symplify\SimplePhpDocParser\SimplePhpDocParser;
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
final class SimplePhpDocParserStaticFactory
|
||||
{
|
||||
public static function create() : \RectorPrefix20220221\Symplify\SimplePhpDocParser\SimplePhpDocParser
|
||||
{
|
||||
$phpDocParser = new \PHPStan\PhpDocParser\Parser\PhpDocParser(new \PHPStan\PhpDocParser\Parser\TypeParser(), new \PHPStan\PhpDocParser\Parser\ConstExprParser());
|
||||
return new \RectorPrefix20220221\Symplify\SimplePhpDocParser\SimplePhpDocParser($phpDocParser, new \PHPStan\PhpDocParser\Lexer\Lexer());
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject\Ast\PhpDoc;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
||||
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
|
||||
/**
|
||||
* @noRector final on purpose, so it can be extended by 3rd party
|
||||
*/
|
||||
class SimplePhpDocNode extends \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode
|
||||
{
|
||||
public function getParam(string $desiredParamName) : ?\PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode
|
||||
{
|
||||
$desiredParamNameWithDollar = '$' . \ltrim($desiredParamName, '$');
|
||||
foreach ($this->getParamTagValues() as $paramTagValueNode) {
|
||||
if ($paramTagValueNode->parameterName !== $desiredParamNameWithDollar) {
|
||||
continue;
|
||||
}
|
||||
return $paramTagValueNode;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function getParamType(string $desiredParamName) : ?\PHPStan\PhpDocParser\Ast\Type\TypeNode
|
||||
{
|
||||
$paramTagValueNode = $this->getParam($desiredParamName);
|
||||
if (!$paramTagValueNode instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode) {
|
||||
return null;
|
||||
}
|
||||
return $paramTagValueNode->type;
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject;
|
||||
|
||||
final class PhpDocAttributeKey
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PARENT = 'parent';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const ORIG_NODE = 'orig_node';
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220221\Symplify\SimplePhpDocParser\ValueObject;
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
final class SimplePhpDocParserConfig
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const FILE_PATH = __DIR__ . '/../../config/config.php';
|
||||
}
|
Loading…
Reference in New Issue
Block a user