Skip to content

Pretty much compatible ReflectionMethod#58

Merged
Ocramius merged 4 commits intomasterfrom
compat-reflectionmethod
Jul 10, 2015
Merged

Pretty much compatible ReflectionMethod#58
Ocramius merged 4 commits intomasterfrom
compat-reflectionmethod

Conversation

@asgrim
Copy link
Copy Markdown
Member

@asgrim asgrim commented Jul 10, 2015

Created new issue for getPrototype() cuz there's some janky logic there - see #57 plus we need to finish ReflectionClass first.

This resolves the ReflectionMethod item on #7.

@GeeH
Copy link
Copy Markdown
Collaborator

GeeH commented Jul 10, 2015

Does getInterfaces() work?

On Fri, 10 Jul 2015 at 13:33 James Titcumb notifications@github.com wrote:

Created new issue for getPrototype() cuz there's some janky logic there -
see #57 #57 plus we
need to finish ReflectionClass first.

This resolves the ReflectionMethod item on #7

#7.

You can view, comment on, or merge this pull request online at:

#58
Commit Summary

  • Added ReflectionMethod->getModifiers()
  • Added incomplete implementation of ReflectionMethod->getPrototype()
  • Updated compatibility.md

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#58.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

$val = ($this->isStatic() & \ReflectionMethod::IS_STATIC)
    | ($this->isPublic() & \ReflectionMethod::IS_PUBLIC)
    | ($this->isProtected() & \ReflectionMethod::IS_PROTECTED)
    | ($this->isPrivate() & \ReflectionMethod::IS_PRIVATE)
    | ($this->isAbstract() & \ReflectionMethod::IS_ABSTRACT)
    | ($this->isFinal() & \ReflectionMethod::IS_FINAL)
    | ($this->isStatic() & \ReflectionMethod::IS_STATIC)
    | ($this->isStatic() & \ReflectionMethod::IS_STATIC);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Example is broken btw. true & 1 === 1, true & 2 === 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

$val = ($this->isStatic() ? 0 : \ReflectionMethod::IS_STATIC)
    | ($this->isPublic() ? 0 : \ReflectionMethod::IS_PUBLIC)
    | ($this->isProtected() ? 0 : \ReflectionMethod::IS_PROTECTED)
    | ($this->isPrivate() ? 0 : \ReflectionMethod::IS_PRIVATE)
    | ($this->isAbstract() ? 0 : \ReflectionMethod::IS_ABSTRACT)
    | ($this->isFinal() ? 0 : \ReflectionMethod::IS_FINAL)
    | ($this->isStatic() ? 0 : \ReflectionMethod::IS_STATIC)
    | ($this->isStatic() ? 0 : \ReflectionMethod::IS_STATIC);

So yeah, ternaries -.-

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That.. also doesn't work.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Alright, guess I'll just be ok with the current approach.

@asgrim
Copy link
Copy Markdown
Member Author

asgrim commented Jul 10, 2015

@GeeH getInterfaces() does not yet work - I thought you were implementing it? ;)

Ocramius added a commit that referenced this pull request Jul 10, 2015
Pretty much compatible ReflectionMethod
@Ocramius Ocramius merged commit b0a5aad into master Jul 10, 2015
@Ocramius Ocramius deleted the compat-reflectionmethod branch July 10, 2015 14:39
@Ocramius
Copy link
Copy Markdown
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants