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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Analyser/ArgumentsNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,10 @@ public static function reorderArgs(ParametersAcceptor $parametersAcceptor, array
null,
);
} elseif (array_key_exists($arg->name->toString(), $argumentPositions)) {
$argName = $arg->name->toString();
// order named args into the position the signature expects them
$attributes = $arg->getAttributes();
$attributes[self::ORIGINAL_ARG_ATTRIBUTE] = $arg;
$reorderedArgs[$argumentPositions[$argName]] = new Arg(
$reorderedArgs[$argumentPositions[$arg->name->toString()]] = new Arg(
$arg->value,
$arg->byRef,
$arg->unpack,
Expand Down
4 changes: 2 additions & 2 deletions src/Fixable/PhpPrinterIndentationDetectorVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use PhpParser\Node;
use PhpParser\NodeVisitor;
use PhpParser\NodeVisitorAbstract;
use function array_is_list;
use function count;
use function in_array;
use function is_array;
use function preg_match;
use function preg_match_all;
use function property_exists;
Expand Down Expand Up @@ -37,7 +37,7 @@ public function enterNode(Node $node): ?int
return null;
}

if (!is_array($node->stmts) || count($node->stmts) === 0) {
if (!array_is_list($node->stmts) || count($node->stmts) === 0) {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Type/Php/StrTokFunctionReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
return null;
}

$delimiterType = $scope->getType($functionCall->getArgs()[0]->value);
$delimiterType = $scope->getType($args[0]->value);
$isEmptyString = (new ConstantStringType(''))->isSuperTypeOf($delimiterType);
if ($isEmptyString->yes()) {
return new ConstantBooleanType(false);
Expand Down
Loading