getName() === 'pathinfo'; } public function getTypeFromStaticMethodCall( MethodReflection $methodReflection, Node\Expr\StaticCall $methodCall, Scope $scope ): Type { $argsCount = count($methodCall->getArgs()); if ($argsCount === 0) { return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType(); } if ($argsCount === 1) { $stringType = new StringType(); $builder = ConstantArrayTypeBuilder::createFromConstantArray( new ConstantArrayType( [new ConstantStringType('dirname'), new ConstantStringType('basename'), new ConstantStringType('filename')], [$stringType, $stringType, $stringType], ), ); $builder->setOffsetValueType(new ConstantStringType('extension'), $stringType, true); return $builder->getArray(); } return new StringType(); } }