mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Handle positional argument
This commit is contained in:
parent
2217f5e118
commit
55843b5ac8
@ -50,9 +50,9 @@ class PdoStatementReturnTypeProvider implements MethodReturnTypeProviderInterfac
|
||||
$call_args = $event->getCallArgs();
|
||||
$fetch_mode = 0;
|
||||
|
||||
foreach($call_args as $call_arg) {
|
||||
$arg_name = $call_arg->name->name;
|
||||
if (!isset($arg_name) || $arg_name === "mode") {
|
||||
foreach ($call_args as $call_arg) {
|
||||
$arg_name = $call_arg->name;
|
||||
if (!isset($arg_name) || $arg_name->name === "mode") {
|
||||
$first_arg_type = $source->getNodeTypeProvider()->getType($call_arg->value);
|
||||
if ($first_arg_type->isSingleIntLiteral()) {
|
||||
$fetch_mode = $first_arg_type->getSingleIntLiteral()->value;
|
||||
|
Loading…
Reference in New Issue
Block a user