Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rector] Enable RemoveUnusedPublicMethodParameterRector #1131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 1 addition & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPublicMethodParameterRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
Expand Down Expand Up @@ -48,6 +47,7 @@
__DIR__ . '/src/Prototype/src/NodeVisitors/LocateProperties.php',
__DIR__ . '/src/Prototype/src/NodeVisitors/RemoveTrait.php',
__DIR__ . '/src/Logger/src/ListenerRegistry.php',
__DIR__ . '/src/Stempler/src/Transform/Merge/ExtendsParent.php',
],
RemoveExtraParametersRector::class => [
__DIR__ . '/src/Boot/src/BootloadManager/AbstractBootloadManager.php',
Expand All @@ -58,8 +58,6 @@

// to be enabled later after upgrade to 1.2.4 merged
// to easier to review
RemoveAlwaysTrueIfConditionRector::class,
RemoveUnusedPublicMethodParameterRector::class,
RemoveEmptyClassMethodRector::class,
RemoveUnusedPromotedPropertyRector::class,
RemoveUselessParamTagRector::class,
Expand Down
2 changes: 1 addition & 1 deletion src/Filters/src/Attribute/NestedArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function getValue(InputInterface $input, \ReflectionProperty $property):
return $this->input->getValue($input, $property);
}

public function getSchema(\ReflectionProperty $property): array
public function getSchema(): array
{
if ($this->prefix) {
return [$this->class, $this->prefix];
Expand Down
2 changes: 1 addition & 1 deletion src/Filters/src/Attribute/NestedFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(
) {
}

public function getSchema(\ReflectionProperty $property): string|array
public function getSchema(): string|array
{
if ($this->prefix) {
return [$this->class, $this->prefix];
Expand Down
2 changes: 1 addition & 1 deletion src/Filters/src/Model/Schema/AttributeMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function map(FilterInterface $filter, InputInterface $input): array
}
}

$schema[$property->getName()] = $attribute->getSchema($property);
$schema[$property->getName()] = $attribute->getSchema();
} elseif ($attribute instanceof NestedArray) {
$values = $attribute->getValue($input, $property);
$propertyValues = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Streams/src/StreamWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function stream_eof(): bool
/**
* Open pre-mocked StreamInterface by it's unique uri.
*/
public function stream_open(string $path, string $mode, int $options, ?string &$opened_path): bool
public function stream_open(string $path, string $mode): bool
{
if (!isset(self::$uris[$path])) {
return false;
Expand Down
Loading