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

Add SimpleXmlElementXpathMethodReturnTypeExtension #428

Merged
merged 1 commit into from
Jan 24, 2021

Conversation

VincentLanglet
Copy link
Contributor

No description provided.

$result = null;
foreach (TypeUtils::getConstantStrings($argType) as $constantString) {
set_error_handler(null);
$newResult = $xmlElement->xpath($constantString->getValue());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about @ here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work, but some randoms tests are failing...

@VincentLanglet VincentLanglet marked this pull request as ready for review January 20, 2021 09:31
return new ConstantBooleanType(false);
}

return new ArrayType(new MixedType(), new StaticType(\SimpleXMLElement::class));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 2nd argument shouldn't be new StaticType, but $scope->getType($methodCall->var) instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done ! :)

@ondrejmirtes
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants