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
11 changes: 0 additions & 11 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,6 @@ parameters:
message: '#Cannot call method (.*?)\(\) on (.*?)\\ProcessPool\|null#'
path: src/Parallel/Application/ParallelFileProcessor.php

-
identifier: missingType.callable
message: '#Method Rector\\Util\\ArrayParametersMerger\:\:mergeLeftToRightWithCallable\(\) has parameter \$mergeCallback with no signature specified for callable#'
path: src/Util/ArrayParametersMerger.php

# required generics on interface array, not helpful
-
identifier: missingType.generics
Expand All @@ -205,12 +200,6 @@ parameters:
identifier: offsetAccess.nonArray
path: src/PhpParser/NodeTraverser/RectorNodeTraverser.php

# known non-empty class method
-
identifier: offsetAccess.notFound
message: '#Offset 0 might not exist on array<PhpParser\\Node\\Stmt>\|null#'
path: rules/DeadCode/Rector/ClassMethod/RemoveParentDelegatingConstructorRector.php

-
identifier: offsetAccess.notFound
message: '#Offset float\|int\|string might not exist on string#'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ private function matchParentConstructorCallArgs(Stmt $stmt): ?array

private function isParameterAndArgCountAndOrderIdentical(ClassMethod $classMethod): bool
{
if ($classMethod->stmts === null || ! isset($classMethod->stmts[0])) {
return false;
}

$soleStmt = $classMethod->stmts[0];

$parentCallArgs = $this->matchParentConstructorCallArgs($soleStmt);
Expand Down
1 change: 1 addition & 0 deletions src/Util/ArrayParametersMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function merge(mixed $left, mixed $right): mixed
/**
* @param array<int|string, mixed> $left
* @param array<int|string, mixed> $right
* @param callable(mixed, mixed): mixed $mergeCallback
* @return mixed[]
*/
private function mergeLeftToRightWithCallable(array $left, array $right, callable $mergeCallback): array
Expand Down
Loading