Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PhpParser\Node;
use PhpParser\Node\Expr\Variable;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

/**
* @see \Rector\Tests\TypeDeclaration\Rector\RenameSimpleRectorTest
Expand Down
4 changes: 2 additions & 2 deletions e2e/parallel-unfinished-jobs/utils/ExitWorkerRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\CodeSample\CodeSample;
use Rector\RuleDoc\RuleDefinition;

/**
* Ends the worker process on exit_worker(), like a worker that dies before reporting its files
Expand Down
5 changes: 0 additions & 5 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,6 @@ parameters:
identifier: offsetAccess.nonArray
path: src/PhpParser/NodeTraverser/RectorNodeTraverser.php

-
identifier: offsetAccess.notFound
message: '#Offset float\|int\|string might not exist on string#'
path: rules/Php70/EregToPcreTransformer.php

# phpstan internalls
- identifier: phpstanApi.class
- identifier: phpstanApi.classConstant
Expand Down
6 changes: 3 additions & 3 deletions rules/Php70/EregToPcreTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function transform(string $content, bool $ignorecase): string
/**
* Recursively converts ERE into PCRE, starting at the position $i.
*
* @return float[]|int[]|string[]
* @return array{string, int}
*/
private function _ere2pcre(string $content, int $i): array
{
Expand Down Expand Up @@ -223,7 +223,7 @@ private function processBracket(string $content, int $i, int $l, array &$r, int
}

/**
* @return float[]|int[]|string[]
* @return array{string, int}
*/
private function processSquareBracket(string $s, int $i, int $l, string $cls, bool $start): array
{
Expand Down Expand Up @@ -313,7 +313,7 @@ private function processCurlyBracket(string $s, int $i, array &$r, int $rr): int
}

/**
* @return int[]|string[]
* @return array{string, int}
*/
private function processCharacterClass(string $content, int $i, string $cls): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function createArrayFromValues(array $values): array

/**
* Mimics https://github.com/doctrine/annotations/blob/c66f06b7c83e9a2a7523351a9d5a4b55f885e574/lib/Doctrine/Common/Annotations/DocParser.php#L1354-L1385
* @return array<null|mixed, mixed>
* @return array{mixed, mixed}
*/
private function resolveArrayItem(BetterTokenIterator $tokenIterator, Node $currentPhpNode): array
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Configuration/Source/DeprecatedRectorStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use PhpParser\Node\Stmt\Class_;
use Rector\Configuration\Deprecation\Contract\DeprecatedInterface;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\CodeSample\CodeSample;
use Rector\RuleDoc\RuleDefinition;

final class DeprecatedRectorStub extends AbstractRector implements DeprecatedInterface
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Configuration/Source/RemoveDoubleAssignRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PhpParser\Node;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

/**
* Dummy rector with same class name as an official one
Expand Down
4 changes: 2 additions & 2 deletions tests/Console/Command/Source/ComposerBoundRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use Rector\Rector\AbstractRector;
use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface;
use Rector\VersionBonding\ValueObject\ComposerPackageConstraint;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\CodeSample\CodeSample;
use Rector\RuleDoc\RuleDefinition;

final class ComposerBoundRector extends AbstractRector implements ComposerPackageConstraintInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Scalar\String_;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class SetArrayArgValueRector extends AbstractRector
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Scalar\String_;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class SetArrayAttributeValueRector extends AbstractRector
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use PhpParser\Node\Stmt\Expression;
use Rector\PHPStan\ScopeFetcher;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class AnotherExpressionRector extends AbstractRector
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Rector\BetterPhpDocParser\ValueObject\Type\FullyQualifiedIdentifierTypeNode;
use Rector\Comments\NodeDocBlock\DocBlockUpdater;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class AddFullyQualifiedIdentifierDocblockRector extends AbstractRector
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Issues/IndexedStmt/Source/ChangeLastIndex1Rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use PhpParser\Node\Stmt\Expression;
use Rector\Contract\PhpParser\Node\StmtsAwareInterface;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class ChangeLastIndex1Rector extends AbstractRector
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Issues/IndexedStmt/Source/RemoveIndex1Rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use PhpParser\Node\Stmt\Expression;
use PhpParser\NodeVisitor;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class RemoveIndex1Rector extends AbstractRector
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
use Rector\Tests\Issues\Issue9388\Source\AnnotationToAttribute\AttributeDecorator;
use Rector\ValueObject\PhpVersionFeature;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\CodeSample\CodeSample;
use Rector\RuleDoc\RuleDefinition;

final class ExtbaseAnnotationToAttributeRector extends AbstractRector implements MinPhpVersionInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation\CurlyListNode;
use Rector\Comments\NodeDocBlock\DocBlockUpdater;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class PartialUpdateTestRector extends AbstractRector
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use PhpParser\Node\Attribute;
use PhpParser\Node\Name\FullyQualified;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class SomeAttributeTargetRector extends AbstractRector
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PhpParser\Node;
use PhpParser\Node\Stmt\If_;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class ReturnEmptyStmtsRector extends AbstractRector
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Rector/RectorRunner/Source/ReturnNullRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use PhpParser\Node;
use PhpParser\Node\Stmt\Class_;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\CodeSample\CodeSample;
use Rector\RuleDoc\RuleDefinition;

final class ReturnNullRector extends AbstractRector
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PhpParser\Node;
use PhpParser\Node\Stmt\Class_;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class NoChangeRector extends AbstractRector
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Rector\Rector\AbstractRector;
use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface;
use Rector\VersionBonding\ValueObject\ComposerPackageConstraint;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class ComposerPackageConstraintRector extends AbstractRector implements ComposerPackageConstraintInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Rector\Rector\AbstractRector;
use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface;
use Rector\VersionBonding\ValueObject\ComposerPackageConstraint;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class ComposerPackageConstraintsRector extends AbstractRector implements ComposerPackageConstraintInterface
{
Expand Down
2 changes: 1 addition & 1 deletion tests/VersionBonding/Fixture/NoInterfaceRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use PhpParser\Node;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class NoInterfaceRector extends AbstractRector
{
Expand Down
2 changes: 1 addition & 1 deletion tests/VersionBonding/Fixture/PolyfillPhp83Rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Rector\ValueObject\PolyfillPackage;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
use Rector\VersionBonding\Contract\RelatedPolyfillInterface;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\RuleDoc\RuleDefinition;

final class PolyfillPhp83Rector extends AbstractRector implements MinPhpVersionInterface, RelatedPolyfillInterface
{
Expand Down
Loading