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
6 changes: 0 additions & 6 deletions phpstan-deprecated.neon
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# deprecated code kept temporarily, ignores to drop once the deprecated API is removed
parameters:
ignoreErrors:
# deprecated, to be removed
-
message: '#^Unused Rector\\Set\\Contract\\SetInterface\:\:(.*?)$#'
identifier: shipmonk.deadMethod
path: src/Set/Contract/SetInterface.php

-
message: '#^Unused Rector\\Arguments\\ValueObject\\ReplaceArgumentDefaultValue\:\:(.*?)$#'
identifier: shipmonk.deadMethod
Expand Down
9 changes: 0 additions & 9 deletions rules/Arguments/NodeAnalyzer/ArgumentAddingScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,10 @@

final readonly class ArgumentAddingScope
{
/**
* @api
*/
public const string SCOPE_PARENT_CALL = 'parent_call';

/**
* @api
*/
public const string SCOPE_METHOD_CALL = 'method_call';

/**
* @api
*/
public const string SCOPE_CLASS_METHOD = 'class_method';

public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
*/
final class EncapsedStringsToSprintfRector extends AbstractRector implements ConfigurableRectorInterface, DeprecatedInterface
{
/**
* @api
*/
public const string ALWAYS = 'always';

/**
Expand Down
36 changes: 0 additions & 36 deletions rules/CodingStyle/ValueObject/ObjectMagicMethods.php

This file was deleted.

3 changes: 0 additions & 3 deletions rules/DeadCode/PhpDoc/TagRemover/VarTagRemover.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ public function removeVarTagIfUseless(PhpDocInfo $phpDocInfo, Property|ClassCons
return true;
}

/**
* @api generic
*/
public function removeVarTag(Node $node): bool
{
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node);
Expand Down
1 change: 0 additions & 1 deletion rules/Naming/Naming/UseImportsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public function resolve(): array
}

/**
* @api
* @return Use_[]
*/
public function resolveBareUses(): array
Expand Down
1 change: 0 additions & 1 deletion rules/Php72/NodeFactory/AnonymousFunctionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public function __construct(
}

/**
* @api
* @param Param[] $params
* @param Stmt[] $stmts
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,10 @@
*/
final class ClassPropertyAssignToConstructorPromotionRector extends AbstractRector implements MinPhpVersionInterface, ConfigurableRectorInterface
{
/**
* @api
*/
public const string INLINE_PUBLIC = 'inline_public';

/**
* @api
*/
public const string RENAME_PROPERTY = 'rename_property';

/**
* @api
*/
public const string ALLOW_MODEL_BASED_CLASSES = 'allow_model_based_classes';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
*/
final class AddSensitiveParameterAttributeRector extends AbstractRector implements ConfigurableRectorInterface, MinPhpVersionInterface, DeprecatedInterface
{
/**
* @api
*/
public const string SENSITIVE_PARAMETERS = 'sensitive_parameters';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
*/
final class NestedFuncCallsToPipeOperatorRector extends AbstractRector implements MinPhpVersionInterface, ConfigurableRectorInterface, DeprecatedInterface
{
/**
* @api
*/
public const string MINIMUM_DEPTH = 'minimum_depth';

/**
Expand Down
3 changes: 0 additions & 3 deletions rules/Renaming/ValueObject/RenameAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

namespace Rector\Renaming\ValueObject;

/**
* @api
*/
final readonly class RenameAttribute
{
public function __construct(
Expand Down
3 changes: 0 additions & 3 deletions rules/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
*/
final class DisallowedEmptyRuleFixerRector extends AbstractRector implements ConfigurableRectorInterface, DeprecatedInterface
{
/**
* @api
*/
public const string TREAT_AS_NON_EMPTY = 'treat_as_non_empty';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
use Webmozart\Assert\Assert;

/**
* @api used in rector-doctrine
* @see \Rector\Tests\Transform\Rector\Attribute\AttributeKeyToClassConstFetchRector\AttributeKeyToClassConstFetchRectorTest
*/
final class AttributeKeyToClassConstFetchRector extends AbstractRector implements ConfigurableRectorInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@
*/
final class TypedPropertyFromAssignsRector extends AbstractRector implements MinPhpVersionInterface, ConfigurableRectorInterface
{
/**
* @api
*/
public const string INLINE_PUBLIC = 'inline_public';

/**
Expand Down
3 changes: 0 additions & 3 deletions src/BetterPhpDocParser/PhpDocInfo/PhpDocInfoFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ public function createFromNode(Node $node): ?PhpDocInfo
return $phpDocInfo;
}

/**
* @api downgrade
*/
public function createEmpty(Node $node): PhpDocInfo
{
$phpDocNode = new PhpDocNode([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,6 @@ public function isAllowed(TypeNode $typeNode): bool
return in_array((string) $typeNode, self::ALLOWED_IDENTIFIER_TYPENODE_TYPES, true);
}

/**
* @api downgrade
*/
public function changeVarTypeNode(Stmt $stmt, PhpDocInfo $phpDocInfo, TypeNode $typeNode): void
{
$existingVarTagValueNode = $phpDocInfo->getVarTagValueNode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public function resolveAnnotationMethodCall(BetterTokenIterator $tokenIterator,
}

/**
* @api tests
* @see https://github.com/doctrine/annotations/blob/c66f06b7c83e9a2a7523351a9d5a4b55f885e574/lib/Doctrine/Common/Annotations/DocParser.php#L1215-L1224
* @return CurlyListNode|string|array<mixed>|ConstExprNode|DoctrineAnnotationTagValueNode|StringNode
*/
Expand Down
1 change: 0 additions & 1 deletion src/Bootstrap/ExtensionConfigResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
final class ExtensionConfigResolver
{
/**
* @api
* @return string[]
*/
public function provide(): array
Expand Down
1 change: 0 additions & 1 deletion src/Bridge/SetRectorsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Webmozart\Assert\Assert;

/**
* @api
* Utils class to ease building bridges by 3rd-party tools
*
* @see \Rector\Tests\Bridge\SetRectorsResolverTest
Expand Down
3 changes: 0 additions & 3 deletions src/Caching/CacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ public function __construct(
) {
}

/**
* @api config factory
*/
public function create(): Cache
{
$cacheDirectory = SimpleParameterProvider::provideStringParameter(Option::CACHE_DIR);
Expand Down
3 changes: 0 additions & 3 deletions src/Caching/Detector/ChangedFilesDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ public function clear(): void
$this->cache->clear();
}

/**
* @api
*/
public function setFirstResolvedConfigFileInfo(string $filePath): void
{
// the first config is core to all → if it was changed, just invalidate it
Expand Down
3 changes: 0 additions & 3 deletions src/Composer/InstalledPackageResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ public function __construct(
Assert::directory($this->projectDirectory);
}

/**
* @api used in tests to resolve the versions from a standalone "composer.json"
*/
public function changeComposerJsonFilePath(?string $composerJsonFilePath): void
{
$this->composerJsonFilePath = $composerJsonFilePath;
Expand Down
1 change: 0 additions & 1 deletion src/Configuration/ConfigurationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public function __construct(
}

/**
* @api used in tests
* @param string[] $paths
*/
public function createForTests(array $paths): Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
namespace Rector\Configuration\Deprecation\Contract;

/**
* @api
*
* Marker interface that should be implemented by all deprecated rules and services.
* It helps to notify user about the deprecation on the fly, before they get removed.
*/
Expand Down
5 changes: 0 additions & 5 deletions src/Configuration/Parameter/SimpleParameterProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
use Rector\Skipper\FileSystem\PathNormalizer;
use Webmozart\Assert\Assert;

/**
* @api
*/
final class SimpleParameterProvider
{
/**
Expand Down Expand Up @@ -154,7 +151,6 @@ public static function provideBoolParameter(string $name, ?bool $default = null)
}

/**
* @api
* Strict hash for cache invalidation. Ignored and directionally compared parameters are left
* out, so only a real change to an output-affecting parameter drops the cache.
*/
Expand Down Expand Up @@ -183,7 +179,6 @@ public static function hashForCacheInvalidation(): string
}

/**
* @api
* @return array{rules: mixed[], sets: mixed[], skip: mixed[]}
*/
public static function provideCacheDirectionalParameters(): array
Expand Down
3 changes: 0 additions & 3 deletions src/Console/ExitCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

use Symfony\Component\Console\Command\Command;

/**
* @api
*/
final class ExitCode
{
public const int SUCCESS = Command::SUCCESS;
Expand Down
3 changes: 0 additions & 3 deletions src/Console/Style/SymfonyStyleFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ public function __construct(
) {
}

/**
* @api
*/
public function create(): RectorStyle
{
$_SERVER['argv'] ??= [];
Expand Down
3 changes: 0 additions & 3 deletions src/DependencyInjection/LazyContainerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ final class LazyContainerFactory
ClassReflectionFactory::class,
];

/**
* @api used as next rectorConfig factory
*/
public function create(): RectorConfig
{
$rectorConfig = new RectorConfig();
Expand Down
1 change: 0 additions & 1 deletion src/FamilyTree/Reflection/FamilyRelationsAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public function __construct(
}

/**
* @api
* @return string[]
*/
public function getClassLikeAncestorNames(Class_|Interface_|Name $classOrName): array
Expand Down
1 change: 0 additions & 1 deletion src/NodeCollector/BinaryOpConditionsCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ final class BinaryOpConditionsCollector
* Similarly, for right-associative operations (e.g. `a ?? b ?? c`), the result produced by
* the implicit parenthesization (`[a, b ?? c]`) might not match the expectations.
*
* @api
* @param class-string<BinaryOp> $binaryOpClass
* @return array<int, Expr>
*/
Expand Down
3 changes: 0 additions & 3 deletions src/NodeManipulator/ClassInsertManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ public function __construct(
) {
}

/**
* @api
*/
public function addAsFirstMethod(Class_ $class, Property|ClassConst|ClassMethod $addedStmt): void
{
$scope = $class->getAttribute(AttributeKey::SCOPE);
Expand Down
5 changes: 0 additions & 5 deletions src/NodeNameResolver/NodeNameResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ public function getName(Node|string $node): ?string
return (string) $node->name;
}

/**
* @api
*/
public function areNamesEqual(Node $firstNode, Node $secondNode): bool
{
$secondResolvedName = $this->getName($secondNode);
Expand All @@ -141,8 +138,6 @@ public function areNamesEqual(Node $firstNode, Node $secondNode): bool
}

/**
* @api
*
* @param Name[]|Node[] $nodes
* @return string[]
*/
Expand Down
6 changes: 0 additions & 6 deletions src/NodeNestingScope/ContextAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@

final class ContextAnalyzer
{
/**
* @api
*/
public function isInLoop(Node $node): bool
{
return $node->getAttribute(AttributeKey::IS_IN_LOOP_OR_SWITCH) === true;
}

/**
* @api
*/
public function isInIf(Node $node): bool
{
return $node->getAttribute(AttributeKey::IS_IN_IF) === true;
Expand Down
Loading
Loading