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

UnionIterableType: fix getClass method #51

Merged
merged 4 commits into from
Dec 27, 2016

Conversation

pepakriz
Copy link
Contributor

No description provided.

{
foreach ($this->otherTypes as $otherType) {
if ($otherType->getClass() !== null) {
return $otherType->getClass();
Copy link
Member

Choose a reason for hiding this comment

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

I'd like it to return null if there are multiple other types with getClass() !== null, not the first one.

@@ -105,7 +105,7 @@ public function canAccessProperties(): bool

public function canCallMethods(): bool
{
return $this->class !== 'stdClass';
return strtolower($this->class) !== strtolower('stdClass');
Copy link
Member

Choose a reason for hiding this comment

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

please write stdclass :)

@pepakriz
Copy link
Contributor Author

PR Updated

@ondrejmirtes ondrejmirtes merged commit a159109 into phpstan:master Dec 27, 2016
@ondrejmirtes
Copy link
Member

Thanks, good job! 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants